/* Z Motor · gestionale mobile staff */

:root {
  /* colori */
  --brand: #be1522;
  --brand-ink: #9b0f1b;
  --brand-soft: rgba(190, 21, 34, .09);
  --ink: #1b1d22;
  --ink-2: #4a4e57;
  --ink-3: #868b95;
  --line: rgba(27, 29, 34, .08);
  --bg: #f7f2ef;
  --surface: #fff;
  --danger: #3b3c3c;
  --ok: #1f9d55;
  --whatsapp: #1fae54;

  /* stati */
  --st-richiesta: #e07a06;
  --st-confermata: #2d7dd2;
  --st-lavorazione: #7b4fd0;
  --st-completata: #1f9d55;
  --st-annullata: #8a8f99;

  /* card */
  --card: rgba(255, 255, 255, .75);
  --card-border: rgba(255, 255, 255, .7);
  --blur: 12px;
  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 1px 2px rgba(60, 30, 30, .05), 0 8px 24px rgba(80, 40, 40, .07);
  --shadow-lg: 0 -8px 40px rgba(40, 20, 20, .18);

  /* misure */
  --gutter: 16px;
  --gap: 12px;
  --btn-h: 46px;
  --fs: 15px;
  --fs-sm: 13px;
  --fs-xs: 11.5px;
  --fs-input: 16px;
  --frame: 480px;
  --tabbar-h: 62px;
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --font: "Nunito", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --ease: cubic-bezier(.2, .8, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  overscroll-behavior-y: none;
  color-scheme: light;
}

html, body, button, a, input, select, textarea, label {
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: var(--fs);
  line-height: 1.4;
  overflow-x: hidden;
}

body.locked { overflow: hidden; }

button { font: inherit; color: inherit; cursor: pointer; }
button:disabled { cursor: default; opacity: .55; }
a { color: inherit; text-decoration: none; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--st-confermata); outline-offset: 2px; }

input, select, textarea {
  font: inherit;
  font-size: var(--fs-input); /* sotto i 16px iOS zooma */
  color: var(--ink);
}

.yr { opacity: .55; }

/* ------------------------------------------------ sfondo */

.blobs { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.blobs i { position: absolute; border-radius: 50%; filter: blur(60px); opacity: .55; }
.blobs i:nth-child(1) { width: 340px; height: 340px; top: -120px; right: -90px; background: #f3a0a6; }
.blobs i:nth-child(2) { width: 300px; height: 300px; top: 38%; left: -150px; background: #fbd38d; opacity: .45; }
.blobs i:nth-child(3) { width: 320px; height: 320px; bottom: -120px; right: -60px; background: #a9c9f0; opacity: .45; }

/* ------------------------------------------------ cornice */

.app {
  position: relative;
  max-width: var(--frame);
  margin: 0 auto;
  min-height: 100vh;
  min-height: 100dvh;
  padding-top: var(--safe-t);
  padding-bottom: calc(var(--tabbar-h) + var(--safe-b) + 20px);
}

@media (min-width: 520px) {
  .app {
    background: rgba(255, 255, 255, .28);
    box-shadow: 0 0 0 1px rgba(27, 29, 34, .05), 0 20px 60px rgba(60, 30, 30, .08);
  }
}

.view { padding: 0 var(--gutter); }

/* ------------------------------------------------ barra di caricamento */

.progress {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  height: calc(3px + var(--safe-t));
  padding-top: var(--safe-t);
  pointer-events: none; opacity: 0; transition: opacity .2s;
}
.progress.on { opacity: 1; }
.progress i {
  display: block; height: 3px; width: 40%;
  background: linear-gradient(90deg, transparent, var(--brand), transparent);
  animation: progress 1s var(--ease) infinite;
}
@keyframes progress { from { transform: translateX(-100%); } to { transform: translateX(250%); } }

/* ------------------------------------------------ trascina per aggiornare */

.ptr {
  position: fixed; z-index: 40; left: 50%; top: calc(var(--safe-t) + 6px);
  width: 38px; height: 38px; margin-left: -19px; border-radius: 50%;
  background: var(--surface); box-shadow: var(--shadow);
  display: grid; place-items: center; color: var(--brand); font-weight: 900;
  transform: translateY(-60px); opacity: 0; pointer-events: none;
}
.ptr.ready .ptr-icon { transform: rotate(180deg); }
.ptr-icon { transition: transform .2s; }
.ptr.spin .ptr-icon { animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ------------------------------------------------ intestazioni */

.hdr { padding: 18px 0 14px; }
.hdr-row { display: flex; align-items: center; gap: var(--gap); }
.hdr-row > div { min-width: 0; flex: 1; }
.brandmark { font-weight: 900; font-style: italic; letter-spacing: -.02em; color: var(--brand); font-size: var(--fs-sm); }
.hdr h1 { margin: 2px 0 0; font-size: 26px; line-height: 1.15; font-weight: 900; letter-spacing: -.02em; }
.hdr .sub { margin: 2px 0 0; color: var(--ink-3); font-weight: 700; font-size: var(--fs-sm); }
.avatar {
  flex: 0 0 auto; width: 42px; height: 42px; border-radius: 50%;
  display: grid; place-items: center; font-weight: 900; font-size: 14px;
  background: var(--brand-soft); color: var(--brand-ink); border: 0;
}

.sec { margin: 22px 0 8px; display: flex; align-items: baseline; gap: 8px; }
.sec h2 { margin: 0; font-size: var(--fs-sm); font-weight: 900; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-2); }
.sec .count { font-size: var(--fs-sm); font-weight: 800; color: var(--ink-3); }
.sec .sec-act { margin-left: auto; }

/* ------------------------------------------------ card */

.card {
  background: var(--card);
  -webkit-backdrop-filter: blur(var(--blur));
  backdrop-filter: blur(var(--blur));
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  min-width: 0;
  overflow: hidden;
}

/* ------------------------------------------------ avvisi */

.alerts { display: grid; gap: 8px; }
.alert {
  display: flex; align-items: center; gap: 10px; width: 100%;
  min-height: var(--btn-h); padding: 10px 14px; border: 0; text-align: left;
  font-weight: 800; font-size: 14px;
}
.alert .ic { flex: 0 0 auto; font-size: 18px; }
.alert .tx { flex: 1; min-width: 0; }
.alert .chev { flex: 0 0 auto; color: var(--ink-3); }
.alert.warn { background: rgba(255, 237, 213, .85); color: #8a4500; border-color: rgba(224, 122, 6, .18); }

/* ------------------------------------------------ numeri chiave */

.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 14px; }
.stat { border: 0; padding: 12px; text-align: left; min-height: 92px; display: flex; flex-direction: column; justify-content: space-between; }
.stat .v { font-size: 30px; line-height: 1; font-weight: 900; letter-spacing: -.02em; }
.stat .l { font-size: 12px; font-weight: 800; color: var(--ink-2); line-height: 1.2; overflow-wrap: anywhere; }
.stat.hot .v { color: var(--st-richiesta); }
.stat:active, .row:active, .alert:active, .menu-item:active { transform: scale(.985); }

/* ------------------------------------------------ prossimo appuntamento */

.next { display: block; width: 100%; border: 0; text-align: left; padding: 14px 16px; position: relative; }
.next::before { content: ""; position: absolute; left: 0; top: 14px; bottom: 14px; width: 4px; border-radius: 0 4px 4px 0; background: var(--brand); }
.next-top { display: flex; align-items: center; gap: 8px; font-size: var(--fs-sm); font-weight: 800; color: var(--ink-3); }
.next-top .when { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.next-top .rel { flex-shrink: 0; color: var(--brand); }
.next-main { display: flex; align-items: center; gap: 12px; margin-top: 6px; }
.next-time { flex: 0 0 auto; font-size: 30px; font-weight: 900; letter-spacing: -.02em; line-height: 1; }
.next-who { flex: 1; min-width: 0; }
.next-who .name { font-weight: 900; font-size: 17px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.next-who .meta { font-size: var(--fs-sm); color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ------------------------------------------------ righe */

.list { display: block; }
.row {
  display: flex; align-items: center; gap: var(--gap);
  width: 100%; min-height: 64px; padding: 11px 14px;
  background: none; border: 0; text-align: left;
  transition: transform .12s, background-color .2s;
}
.row + .row, .row + .row-wrap, .row-wrap + .row-wrap, .row-wrap + .row { border-top: 1px solid var(--line); }
.row-wrap { display: flex; align-items: center; padding-right: 10px; }
.row-wrap > .row { flex: 1; min-width: 0; padding-right: 8px; }

.when { flex: 0 0 52px; text-align: center; line-height: 1.1; }
.when .t { font-size: 16px; font-weight: 900; letter-spacing: -.01em; }
.when .dur { display: block; font-size: var(--fs-xs); color: var(--ink-3); font-weight: 700; margin-top: 2px; }
.when .dd { display: block; font-size: 19px; font-weight: 900; }
.when .mm { display: block; font-size: var(--fs-xs); font-weight: 800; color: var(--ink-2); white-space: nowrap; margin-top: 1px; }

.main { flex: 1 1 auto; min-width: 0; }
.l1 { display: flex; align-items: center; gap: 8px; min-width: 0; }
.l1 .name { flex: 1 1 auto; min-width: 0; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.l2 { display: flex; align-items: center; gap: 6px; min-width: 0; margin-top: 2px; font-size: var(--fs-sm); color: var(--ink-2); }
.l2 .meta { flex: 1 1 0%; min-width: 7em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tags { flex: 0 1 auto; min-width: 0; display: flex; gap: 4px; overflow: hidden; }
.tag {
  flex-shrink: 0; font-size: var(--fs-xs); font-weight: 800; line-height: 1;
  padding: 4px 6px; border-radius: 6px; background: rgba(27, 29, 34, .06); color: var(--ink-2); white-space: nowrap;
}
.tag.new { background: var(--brand-soft); color: var(--brand-ink); }
.tag.warn { background: rgba(224, 122, 6, .12); color: #8a4500; }
.tag.web { background: rgba(45, 125, 210, .1); color: #1d5ea6; }
.chev { flex: 0 0 auto; color: var(--ink-3); font-weight: 900; }
.row.dim { opacity: .62; }

.row-acts { flex: 0 0 auto; display: flex; gap: 6px; }
.icon-btn {
  width: var(--btn-h); height: var(--btn-h); border-radius: 14px; border: 0;
  display: grid; place-items: center; font-size: 19px; font-weight: 900;
}
.icon-btn.ok { background: rgba(31, 157, 85, .13); color: var(--ok); }
.icon-btn.no { background: rgba(27, 29, 34, .07); color: var(--danger); }
.icon-btn.wa { background: rgba(31, 174, 84, .12); color: var(--whatsapp); }
.icon-btn.ghost { background: transparent; color: var(--ink-2); }

.ini {
  flex: 0 0 auto; width: 42px; height: 42px; border-radius: 50%;
  display: grid; place-items: center; font-weight: 900; font-size: 14px;
  background: var(--brand-soft); color: var(--brand-ink);
}

/* ------------------------------------------------ pillole di stato */

.pill {
  flex-shrink: 0; display: inline-flex; align-items: center; height: 22px; padding: 0 9px;
  border-radius: 999px; font-size: var(--fs-xs); font-weight: 900; white-space: nowrap;
}
.pill.richiesta { background: rgba(224, 122, 6, .13); color: #a35500; }
.pill.confermata { background: rgba(45, 125, 210, .13); color: #1d5ea6; }
.pill.in_lavorazione { background: rgba(123, 79, 208, .13); color: #5b33a8; }
.pill.completata { background: rgba(31, 157, 85, .13); color: #157341; }
.pill.annullata { background: rgba(138, 143, 153, .15); color: var(--st-annullata); text-decoration: line-through; }
.pill.nuova { background: rgba(224, 122, 6, .13); color: #a35500; }
.pill.in_gestione { background: rgba(45, 125, 210, .13); color: #1d5ea6; }
.pill.chiusa { background: rgba(31, 157, 85, .13); color: #157341; }

/* ------------------------------------------------ separatori di giorno */

.dsep { display: flex; align-items: baseline; gap: 8px; margin: 20px 4px 8px; font-size: var(--fs-sm); font-weight: 900; color: var(--ink-2); }
.dsep .rel { color: var(--brand); }
.dsep .n { margin-left: auto; color: var(--ink-3); font-weight: 800; }
.part { padding: 8px 14px 6px; font-size: var(--fs-xs); font-weight: 900; letter-spacing: .05em; text-transform: uppercase; color: var(--ink-3); border-top: 1px solid var(--line); }
.part:first-child { border-top: 0; }
.part + .row { border-top: 0; }

/* ------------------------------------------------ pulsanti */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: var(--btn-h); padding: 0 18px; border-radius: 14px; border: 1px solid transparent;
  font-size: 16px; font-weight: 800; white-space: nowrap; text-align: center;
  transition: transform .12s, opacity .2s;
}
.btn:active { transform: scale(.98); }
.btn-block { display: flex; width: 100%; }
.btn-primary { background: var(--brand); color: #fff; box-shadow: 0 6px 16px rgba(190, 21, 34, .25); }
.btn-secondary { background: var(--surface); color: var(--ink); border-color: var(--line); }
.btn-danger { background: var(--surface); color: var(--danger); border-color: rgba(59, 60, 60, .25); }
.btn-danger-solid { background: var(--danger); color: #fff; }
.btn-ghost { background: transparent; color: var(--brand-ink); padding: 0 10px; }
.btn-small { min-height: 36px; padding: 0 12px; font-size: 14px; border-radius: 10px; }
.btn-wa { background: var(--whatsapp); color: #fff; }
.btn-call { background: var(--brand); color: #fff; }
.btn.busy { opacity: .6; pointer-events: none; }

/* ------------------------------------------------ giornata */

.daynav {
  position: sticky; top: calc(var(--safe-t) + 8px); z-index: 5;
  display: flex; align-items: center; gap: 6px; padding: 6px;
  margin-top: 8px;
}
.daynav .icon-btn { background: rgba(27, 29, 34, .05); font-size: 22px; }
.daypick { position: relative; flex: 1; min-width: 0; min-height: var(--btn-h); display: grid; place-items: center; text-align: center; border-radius: 12px; }
.daypick .lbl { font-weight: 900; font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; padding: 0 4px; }
.daypick .rel { font-size: var(--fs-xs); font-weight: 800; color: var(--brand); }
.daypick input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; border: 0; cursor: pointer; }
.daypick input::-webkit-calendar-picker-indicator { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.day-summary { display: flex; gap: 6px; flex-wrap: wrap; margin: 12px 2px 0; }
.day-summary .pill { height: 24px; }

/* ------------------------------------------------ agenda */

.toolbar { display: flex; gap: 8px; align-items: center; }
.seg { flex: 1 1 auto; display: flex; padding: 4px; gap: 4px; border-radius: 14px; background: rgba(27, 29, 34, .06); min-width: 0; }
.seg button { flex: 1; min-height: 38px; border: 0; border-radius: 10px; background: transparent; font-weight: 800; color: var(--ink-2); white-space: nowrap; }
.seg button[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 4px rgba(0, 0, 0, .08); }
.select {
  flex: 0 1 auto; min-width: 0; max-width: 46%; height: var(--btn-h); padding: 0 34px 0 14px;
  border-radius: 14px; border: 1px solid var(--line); background: var(--surface);
  font-weight: 800; appearance: none; -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5 6 6.5 11 1.5' fill='none' stroke='%23868b95' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center;
  text-overflow: ellipsis;
}
.filter-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.fchip {
  display: inline-flex; align-items: center; gap: 6px; max-width: 100%; min-height: 36px; padding: 0 6px 0 12px;
  border-radius: 999px; border: 0; background: var(--brand-soft); color: var(--brand-ink); font-weight: 800; font-size: 14px;
}
.fchip b { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: rgba(190, 21, 34, .12); }
.more { margin: 16px 0 4px; }

/* ------------------------------------------------ contatti */

.searchbar { position: sticky; top: calc(var(--safe-t) + 8px); z-index: 5; display: flex; align-items: center; gap: 8px; padding: 6px 6px 6px 14px; }
.searchbar svg { flex: 0 0 auto; width: 18px; height: 18px; stroke: var(--ink-3); fill: none; stroke-width: 2.2; }
.searchbar input { flex: 1; min-width: 0; height: 40px; border: 0; background: transparent; outline: none; }
.searchbar .icon-btn { width: 40px; height: 40px; }

/* ------------------------------------------------ stati vuoti / errore / caricamento */

.empty { text-align: center; padding: 30px 20px; color: var(--ink-2); }
.empty .em { font-size: 36px; line-height: 1; }
.empty h3 { margin: 10px 0 4px; font-size: 16px; font-weight: 900; color: var(--ink); }
.empty p { margin: 0 auto; max-width: 30ch; font-size: 14px; color: var(--ink-3); font-weight: 600; overflow-wrap: anywhere; }
.empty .btn { margin-top: 14px; }
.empty.compact { padding: 18px 16px; }
.empty.err h3 { color: var(--danger); }

.sk { display: flex; align-items: center; gap: 12px; padding: 14px; }
.sk + .sk { border-top: 1px solid var(--line); }
.sk i, .sk-block {
  display: block; border-radius: 8px;
  background: linear-gradient(90deg, rgba(27, 29, 34, .06) 25%, rgba(27, 29, 34, .11) 37%, rgba(27, 29, 34, .06) 63%);
  background-size: 400% 100%; animation: shimmer 1.3s ease infinite;
}
.sk .a { width: 44px; height: 36px; flex: 0 0 auto; }
.sk .b { flex: 1; height: 36px; }
.sk-block { height: 92px; border-radius: var(--radius); }
@keyframes shimmer { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }

/* ------------------------------------------------ tab bar */

.tabbar {
  position: fixed; z-index: 30; bottom: 0; left: 50%; transform: translateX(-50%);
  width: min(100%, var(--frame));
  display: grid; grid-template-columns: repeat(5, minmax(0, 1fr));
  height: calc(var(--tabbar-h) + var(--safe-b)); padding-bottom: var(--safe-b);
  background: rgba(255, 255, 255, .86);
  -webkit-backdrop-filter: blur(18px) saturate(1.4); backdrop-filter: blur(18px) saturate(1.4);
  border-top: 1px solid var(--line);
}
.tab {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  border: 0; background: none; color: var(--ink-3); font-size: 11px; font-weight: 800; min-width: 0;
}
.tab span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tab svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.tab svg .fill { fill: currentColor; stroke: none; }
.tab[aria-current="page"] { color: var(--brand); }
.tab[aria-current="page"] svg path:first-child { fill: var(--brand-soft); }
.badge {
  position: absolute; top: 6px; left: calc(50% + 6px);
  min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px;
  background: var(--brand); color: #fff; font-size: 11px; font-weight: 900; line-height: 18px; text-align: center;
  box-shadow: 0 0 0 2px #fff;
}

/* ------------------------------------------------ pannelli dal basso */

.sheets { position: fixed; inset: 0; z-index: 60; pointer-events: none; }
.sheet-layer { position: fixed; inset: 0; pointer-events: auto; }
.backdrop { position: absolute; inset: 0; background: rgba(25, 15, 15, .38); opacity: 0; transition: opacity .28s; }
.sheet {
  position: absolute; bottom: 0; left: 50%;
  width: min(100%, var(--frame)); max-height: 90vh; max-height: 90dvh;
  display: flex; flex-direction: column;
  background: rgba(255, 255, 255, .96);
  -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px);
  border-radius: 24px 24px 0 0; box-shadow: var(--shadow-lg);
  transform: translate(-50%, 100%); transition: transform .32s var(--ease);
  will-change: transform;
}
.sheet-layer.open .backdrop { opacity: 1; }
.sheet-layer.open .sheet { transform: translate(-50%, 0); }
.sheet-layer.dragging .sheet { transition: none; }
.grab { flex: 0 0 auto; display: grid; place-items: center; height: 22px; cursor: grab; touch-action: none; }
.grab i { width: 40px; height: 5px; border-radius: 3px; background: rgba(27, 29, 34, .18); }
.sheet-head { flex: 0 0 auto; display: flex; align-items: flex-start; gap: 10px; padding: 0 var(--gutter) 10px; touch-action: none; }
.sheet-head .tt { flex: 1; min-width: 0; }
.sheet-head h2 {
  margin: 0; font-size: 20px; line-height: 1.2; font-weight: 900; letter-spacing: -.01em;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere;
}
.sheet-head .st { margin-top: 3px; font-size: var(--fs-sm); color: var(--ink-3); font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sheet-head .icon-btn { width: 38px; height: 38px; border-radius: 50%; background: rgba(27, 29, 34, .06); font-size: 15px; }
.sheet-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; padding: 0 var(--gutter) 16px; }
.sheet-foot { flex: 0 0 auto; display: grid; gap: 8px; padding: 12px var(--gutter) calc(12px + var(--safe-b)); border-top: 1px solid var(--line); }
.sheet-foot.two { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.sheet-foot .btn { min-width: 0; padding: 6px 12px; white-space: normal; line-height: 1.15; }
.sheet .card { background: rgba(255, 255, 255, .9); box-shadow: 0 1px 3px rgba(0, 0, 0, .05); border-color: var(--line); }
.sheet .sec { margin-top: 18px; }

/* dettagli */
.kv { display: flex; align-items: flex-start; gap: 12px; padding: 12px 14px; min-width: 0; }
.kv + .kv { border-top: 1px solid var(--line); }
.kv .k { flex: 0 0 92px; color: var(--ink-3); font-weight: 800; font-size: var(--fs-sm); padding-top: 1px; }
.kv .v { flex: 1; min-width: 0; font-weight: 700; overflow-wrap: anywhere; }
.kv .v small { display: block; color: var(--ink-3); font-weight: 700; }
.linkish { color: var(--brand-ink); font-weight: 800; background: none; border: 0; padding: 0; text-align: left; }
.hero { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.hero .pill { height: 26px; font-size: 13px; padding: 0 12px; }
.contact-btns { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px; margin: 4px 0 6px; }
.contact-btns .btn { min-width: 0; padding: 6px 10px; white-space: normal; line-height: 1.15; }
.note-box { width: 100%; min-height: 84px; resize: vertical; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); background: #fff; }
.note-save { display: flex; justify-content: flex-end; margin-top: 8px; }

/* menu "Altro" */
.menu-item { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 56px; padding: 8px 14px; border: 0; background: none; text-align: left; font-weight: 800; font-size: 16px; }
.menu-item + .menu-item { border-top: 1px solid var(--line); }
.menu-item .mi { flex: 0 0 auto; width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: rgba(27, 29, 34, .05); font-size: 18px; }
.menu-item .ml { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.menu-item .mb { flex: 0 0 auto; min-width: 22px; height: 22px; padding: 0 7px; border-radius: 11px; background: var(--brand); color: #fff; font-size: 12px; font-weight: 900; line-height: 22px; text-align: center; }
.menu-item.out { color: var(--danger); }

/* feedback / aggiornamenti */
.fb { padding: 12px 14px; width: 100%; border: 0; background: none; text-align: left; display: block; }
.fb + .fb { border-top: 1px solid var(--line); }
.fb-top { display: flex; align-items: center; gap: 8px; min-width: 0; }
.fb-top .name { flex: 1; min-width: 0; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fb-top .dt { flex-shrink: 0; font-size: var(--fs-sm); color: var(--ink-3); font-weight: 700; }
.stars { color: #e0a106; letter-spacing: 1px; font-size: 14px; flex-shrink: 0; }
.fb p { margin: 4px 0 0; color: var(--ink-2); font-size: 14px; overflow-wrap: anywhere; }
.fb.unread { background: rgba(190, 21, 34, .045); }
.fb.unread .name::before { content: ""; display: inline-block; width: 8px; height: 8px; margin-right: 6px; border-radius: 50%; background: var(--brand); vertical-align: 1px; }

/* moduli */
.form { display: grid; gap: 12px; padding-top: 4px; }
.field { display: grid; gap: 5px; min-width: 0; }
.field label { font-size: var(--fs-sm); font-weight: 800; color: var(--ink-2); }
.field input, .field select, .field textarea {
  width: 100%; min-width: 0; height: var(--btn-h); padding: 0 12px; border-radius: 12px;
  border: 1px solid rgba(27, 29, 34, .14); background: #fff; outline: none;
}
.field textarea { height: auto; min-height: 90px; padding: 10px 12px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus, .note-box:focus { border-color: var(--st-confermata); box-shadow: 0 0 0 3px rgba(45, 125, 210, .15); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.form-err { padding: 10px 12px; border-radius: 12px; background: rgba(190, 21, 34, .08); color: var(--brand-ink); font-weight: 800; font-size: 14px; overflow-wrap: anywhere; }
.switch { display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 8px 14px; }
.switch + .switch { border-top: 1px solid var(--line); }
.switch .sl { flex: 1; min-width: 0; font-weight: 800; }
.switch .sl small { display: block; color: var(--ink-3); font-weight: 600; font-size: var(--fs-sm); }
.switch input { appearance: none; -webkit-appearance: none; flex: 0 0 auto; width: 50px; height: 30px; border-radius: 15px; background: rgba(27, 29, 34, .18); position: relative; transition: background .2s; margin: 0; }
.switch input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .2); transition: transform .2s; }
.switch input:checked { background: var(--ok); }
.switch input:checked::after { transform: translateX(20px); }
.switch select { flex: 0 1 auto; max-width: 50%; height: 40px; border-radius: 10px; border: 1px solid var(--line); background: #fff; padding: 0 10px; }

/* conferma */
.confirm-text { font-size: 16px; font-weight: 700; color: var(--ink-2); margin: 0 0 4px; overflow-wrap: anywhere; }

/* veicolo */
.veh-ic { flex: 0 0 auto; width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; font-size: 20px; background: rgba(27, 29, 34, .05); }
.targa { flex-shrink: 0; font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 12px; font-weight: 700; padding: 2px 6px; border-radius: 5px; border: 1px solid rgba(27, 29, 34, .2); background: #fff; letter-spacing: .04em; }
.warn-tx { color: #a35500; font-weight: 800; }

/* ------------------------------------------------ login */

.login { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; padding: calc(var(--safe-t) + 24px) var(--gutter) calc(var(--safe-b) + 24px); overflow-y: auto; }
.login-card { width: min(100%, 400px); padding: 24px 20px; }
.login .logo { font-size: 34px; font-weight: 900; font-style: italic; letter-spacing: -.03em; color: var(--brand); line-height: 1; }
.login h1 { margin: 6px 0 2px; font-size: 20px; font-weight: 900; }
.login .sub { margin: 0 0 18px; color: var(--ink-3); font-weight: 700; font-size: 14px; }
.login .btn { margin-top: 4px; }
.login .foot { margin-top: 16px; font-size: 12px; color: var(--ink-3); font-weight: 700; text-align: center; }

/* ------------------------------------------------ toast */

.toast {
  position: fixed; z-index: 90; left: 50%; bottom: calc(var(--tabbar-h) + var(--safe-b) + 12px);
  width: max-content; max-width: calc(min(100vw, var(--frame)) - 2 * var(--gutter));
  padding: 12px 16px; border-radius: 14px; background: rgba(27, 29, 34, .94); color: #fff;
  font-weight: 800; font-size: 14px; box-shadow: 0 8px 24px rgba(0, 0, 0, .2); overflow-wrap: anywhere;
  transform: translate(-50%, 20px); opacity: 0; pointer-events: none; transition: transform .25s var(--ease), opacity .25s;
}
.toast.on { transform: translate(-50%, 0); opacity: 1; }
.toast.err::before { content: "⚠️ "; }
/* con un pannello aperto il toast scende dall'alto, così non copre i pulsanti in fondo */
body.sheet-open .toast { bottom: auto; top: calc(var(--safe-t) + 12px); transform: translate(-50%, -20px); }
body.sheet-open .toast.on { transform: translate(-50%, 0); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* ------------------------------------------------ pagina cliente */

body.cliente .app { padding-bottom: calc(var(--safe-b) + 28px); }
body.cliente .toast { bottom: calc(var(--safe-b) + 16px); }
body.cliente.sheet-open .toast { bottom: auto; }
.c-appt { padding: 14px 16px; }
.c-appt + .c-appt { margin-top: 10px; }
.c-top { display: flex; align-items: center; gap: 8px; min-width: 0; }
.c-top .pill { height: 26px; font-size: 13px; padding: 0 12px; }
.c-top .rel { margin-left: auto; flex-shrink: 0; font-size: var(--fs-sm); font-weight: 900; color: var(--brand); }
.c-when { display: flex; align-items: baseline; gap: 10px; margin-top: 10px; min-width: 0; }
.c-when .t { flex-shrink: 0; font-size: 30px; font-weight: 900; letter-spacing: -.02em; line-height: 1; }
.c-when .d { min-width: 0; font-weight: 800; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.c-what { margin-top: 8px; font-weight: 800; font-size: 16px; overflow-wrap: anywhere; }
.c-veh { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 2px; font-size: var(--fs-sm); font-weight: 700; color: var(--ink-2); }
.c-msg { margin: 12px 0 0; padding: 10px 12px; border-radius: 12px; background: rgba(27, 29, 34, .045); font-size: 14px; font-weight: 700; color: var(--ink-2); }
.c-msg.confermata { background: rgba(45, 125, 210, .08); color: #1d5ea6; }
.c-msg.richiesta { background: rgba(224, 122, 6, .09); color: #8a4500; }
.c-msg.in_lavorazione { background: rgba(123, 79, 208, .09); color: #5b33a8; }
.c-msg.completata { background: rgba(31, 157, 85, .09); color: #157341; }
.c-note { margin: 10px 0 0; font-size: var(--fs-sm); font-weight: 700; color: #8a4500; overflow-wrap: anywhere; }
.c-acts { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px; margin-top: 12px; }
.c-acts .btn { min-width: 0; padding: 6px 10px; font-size: 15px; white-space: normal; line-height: 1.15; }
.c-acts .btn:only-child { grid-column: 1 / -1; }
.c-cta { padding: 16px; }
.c-cta h3 { margin: 0; font-size: 17px; font-weight: 900; overflow-wrap: anywhere; }
.c-cta p { margin: 4px 0 12px; font-size: 14px; font-weight: 600; color: var(--ink-2); overflow-wrap: anywhere; }
.c-cta .c-note { margin-top: 10px; margin-bottom: 0; }
.c-list { margin: 0 0 12px; padding-left: 20px; font-size: 14px; font-weight: 700; color: var(--ink); }
.c-list li + li { margin-top: 4px; }
.c-ref { padding: 10px 14px; font-size: 14px; font-weight: 700; color: var(--ink-2); overflow-wrap: anywhere; }
.c-ref b { color: var(--ink); }
.legal { margin: 22px 8px 0; text-align: center; font-size: 12px; font-weight: 700; color: var(--ink-3); overflow-wrap: anywhere; }

.choices { display: flex; flex-wrap: wrap; gap: 8px; }
.choice { position: relative; display: inline-flex; max-width: 100%; }
.choice input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; pointer-events: none; }
.choice span {
  display: inline-flex; align-items: center; min-height: var(--btn-h); max-width: 100%; padding: 6px 16px;
  border-radius: 14px; border: 1px solid rgba(27, 29, 34, .14); background: #fff; font-weight: 800; cursor: pointer;
}
.choice input:checked + span { border-color: var(--brand); background: var(--brand-soft); color: var(--brand-ink); }
.choice input:focus-visible + span { outline: 2px solid var(--st-confermata); outline-offset: 2px; }
.stars-in { display: flex; justify-content: center; gap: 6px; }
.stars-in button { flex: 0 1 52px; min-width: 0; height: 52px; border: 0; border-radius: 14px; background: rgba(27, 29, 34, .05); font-size: 28px; color: #c9ccd2; }
.stars-in button[aria-pressed="true"] { color: #e0a106; background: rgba(224, 161, 6, .13); }

/* ------------------------------------------------ link cliente e ricontatti (staff) */

.msg-preview { padding: 12px 14px; font-size: 14px; font-weight: 600; color: var(--ink-2); white-space: pre-wrap; overflow-wrap: anywhere; }
.ric { padding: 12px 14px; }
.ric + .ric { margin-top: 10px; }
.ric.done { opacity: .6; }
.ric .fb-top .linkish { flex: 1; min-width: 0; text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 16px; }
.ric-what { margin-top: 4px; font-weight: 800; overflow-wrap: anywhere; }
.ric-what span { color: var(--ink-3); }
.ric-appt { display: block; width: 100%; margin-top: 6px; padding: 8px 10px; border: 0; border-radius: 10px; background: rgba(27, 29, 34, .05); text-align: left; font-size: 14px; font-weight: 700; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ric-note { margin: 6px 0 0; font-size: 14px; font-style: italic; color: var(--ink-2); overflow-wrap: anywhere; }
.ric-acts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin-top: 10px; }
.ric-acts .btn { min-width: 0; padding: 6px 8px; font-size: 15px; white-space: normal; line-height: 1.15; }
.ric-done { margin-top: 8px; font-size: var(--fs-sm); font-weight: 800; color: var(--ok); }

/* ------------------------------------------------ moduli appuntamento e cliente */

.hdr-acts { flex: 0 0 auto; display: flex; align-items: center; gap: 8px; }
.hdr-row > .hdr-acts { min-width: 0; flex: 0 0 auto; }
.hero-edit { margin-left: auto; }
.field-row.three { grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) minmax(0, 1fr); }
.picker { display: grid; gap: 6px; }
.picker > .btn { justify-self: start; }
.picked { display: flex; align-items: center; gap: 10px; min-height: var(--btn-h); padding: 4px 6px 4px 8px; border-radius: 12px; border: 1px solid rgba(27, 29, 34, .14); background: #fff; min-width: 0; }
.picked .ini { width: 34px; height: 34px; font-size: 12px; }
.picked b { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.combo { position: relative; }
.combo input { width: 100%; height: var(--btn-h); padding: 0 12px; border-radius: 12px; border: 1px solid rgba(27, 29, 34, .14); background: #fff; outline: none; }
.combo input:focus { border-color: var(--st-confermata); box-shadow: 0 0 0 3px rgba(45, 125, 210, .15); }
.combo-list { margin-top: 6px; background: #fff !important; }
.combo-item { display: block; width: 100%; min-height: var(--btn-h); padding: 8px 12px; border: 0; background: none; text-align: left; }
.combo-item + .combo-item { border-top: 1px solid var(--line); }
.combo-item:hover, .combo-item:focus-visible { background: var(--brand-soft); }
.combo-item b, .combo-item small { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.combo-item small { color: var(--ink-3); font-weight: 700; font-size: var(--fs-sm); }
.combo-empty { padding: 12px; font-size: 14px; font-weight: 700; color: var(--ink-3); }
.list-page .fb { padding: 14px 18px; }
.muted { color: var(--ink-3); }

/* ------------------------------------------------ telefono / desktop */

@media (max-width: 1023.98px) {
  .desk-only { display: none !important; }
}

@media (min-width: 1024px) {
  .staff { --side-w: 248px; }
  .staff .mob-only { display: none !important; }
  .staff .app { max-width: none; margin: 0; padding: 0 0 48px var(--side-w); background: none; box-shadow: none; }
  .staff .view { max-width: 1440px; margin: 0 auto; padding: 0 32px; }
  .staff .hdr { padding: 28px 0 18px; }
  .staff .hdr h1 { font-size: 30px; }

  /* barra laterale */
  .staff .tabbar {
    top: 0; bottom: 0; left: 0; transform: none; width: var(--side-w); height: auto;
    display: flex; flex-direction: column; gap: 2px; padding: 22px 14px calc(18px + var(--safe-b));
    background: rgba(255, 255, 255, .72); border-top: 0; border-right: 1px solid var(--line); overflow-y: auto;
  }
  .staff .side-brand { padding: 0 12px 20px; font-size: 24px; font-weight: 900; font-style: italic; letter-spacing: -.03em; color: var(--brand); }
  .staff .side-brand small { font-size: 13px; font-style: normal; font-weight: 800; color: var(--ink-3); letter-spacing: 0; margin-left: 4px; }
  .staff .tab { flex: 0 0 auto; flex-direction: row; justify-content: flex-start; gap: 12px; height: 46px; padding: 0 12px; border-radius: 12px; font-size: 15px; color: var(--ink-2); }
  .staff .tab:hover { background: rgba(27, 29, 34, .04); }
  .staff .tab svg { width: 22px; height: 22px; flex: 0 0 auto; }
  .staff .tab[aria-current="page"] { background: var(--brand-soft); color: var(--brand-ink); }
  .staff .tab .badge { position: static; margin-left: auto; box-shadow: none; }
  .staff .side-sep { height: 1px; margin: 10px 12px; background: var(--line); }
  .staff .side-foot { margin-top: auto; display: flex; flex-direction: column; gap: 4px; padding-top: 16px; }
  .side-act { display: flex; align-items: center; gap: 10px; min-height: 42px; padding: 0 12px; white-space: nowrap; font-size: 14px; border: 0; border-radius: 12px; background: none; font-weight: 800; color: var(--ink-2); text-align: left; }
  .side-act:hover { background: rgba(27, 29, 34, .04); }
  .side-act .plus { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 7px; background: var(--brand); color: #fff; font-weight: 900; }
  .side-act kbd { margin-left: auto; font: 800 11px var(--font); padding: 2px 6px; border-radius: 6px; border: 1px solid var(--line); color: var(--ink-3); }
  .side-act.out { color: var(--ink-3); }
  .side-user { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 0; border-radius: 14px; background: rgba(27, 29, 34, .04); text-align: left; min-width: 0; }
  .side-user .avatar { width: 36px; height: 36px; font-size: 13px; }
  .side-user .who { min-width: 0; }
  .side-user b, .side-user small { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .side-user small { color: var(--ink-3); font-weight: 700; font-size: 12px; }

  /* Oggi: tre colonne */
  .staff .dash { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1.15fr) minmax(0, 1.15fr); gap: 24px; align-items: start; }
  .staff .stats { gap: 8px; }
  .staff .stat { padding: 12px 10px; }
  .staff .stat .l { overflow-wrap: normal; font-size: 11.5px; }
  .staff .dcol > .sec:first-child { margin-top: 0; }
  .staff .dcol > .alerts + .stats { margin-top: 14px; }

  /* richieste: tabella */
  .tbl-card { overflow: hidden; }
  .tbl { width: 100%; border-collapse: collapse; table-layout: fixed; font-size: 14px; }
  .tbl th { padding: 0; text-align: left; border-bottom: 1px solid var(--line); font-size: 12px; font-weight: 900; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-3); }
  .tbl th > span, .tbl th button { display: flex; align-items: center; gap: 4px; width: 100%; padding: 12px 10px; border: 0; background: none; font: inherit; color: inherit; letter-spacing: inherit; text-transform: inherit; text-align: left; }
  .tbl th button { cursor: pointer; }
  .tbl th button:hover, .tbl th[aria-sort="ascending"] button, .tbl th[aria-sort="descending"] button { color: var(--brand-ink); }
  .tbl td { padding: 10px; border-bottom: 1px solid var(--line); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; vertical-align: middle; }
  .tbl td.strong { font-weight: 800; }
  .tbl tbody tr { cursor: pointer; }
  .tbl tbody tr:hover, .tbl tbody tr:focus-visible { background: rgba(190, 21, 34, .035); outline: none; }
  .tbl tbody tr:last-child td { border-bottom: 0; }
  .tbl tr.dim td { opacity: .6; }
  .tbl .tags { flex-wrap: wrap; height: 22px; overflow: hidden; } /* le etichette che non stanno intere vanno a capo, nascoste */
  .tbl .tag { max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
  #view-richieste .more { display: flex; margin: 16px auto 0; }

  /* contatti: elenco + scheda */
  .cgrid { display: grid; grid-template-columns: minmax(300px, 400px) minmax(0, 1fr); gap: 24px; align-items: start; }
  .cgrid .searchbar { top: 16px; }
  .pane { position: sticky; top: 16px; display: flex; flex-direction: column; max-height: calc(100vh - 32px); background: rgba(255, 255, 255, .86); }
  .pane > .empty { margin: auto; padding: 60px 20px; }
  .pane-head { flex: 0 0 auto; padding: 20px 22px 12px; }
  .pane-head h2 { margin: 0; font-size: 22px; font-weight: 900; overflow-wrap: anywhere; }
  .pane-head .st { margin-top: 2px; font-size: var(--fs-sm); font-weight: 700; color: var(--ink-3); }
  .pane-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 0 22px 22px; }
  .pane .card { background: rgba(255, 255, 255, .92); box-shadow: 0 1px 3px rgba(0, 0, 0, .05); border-color: var(--line); }
  .row[aria-current="true"] { background: var(--brand-soft); }

  /* ricontatti in griglia */
  .ric-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(380px, 1fr)); gap: 16px; align-items: start; }
  .ric-grid .ric + .ric { margin-top: 0; }

  /* pannelli: a destra, a tutta altezza; le conferme al centro */
  .staff .sheet { left: auto; right: 0; top: 0; bottom: 0; width: 500px; height: 100%; max-height: none; border-radius: 24px 0 0 24px; transform: translateX(105%); }
  .staff .sheet-layer.open .sheet { transform: none; }
  .staff .backdrop { background: rgba(25, 15, 15, .22); }
  .staff .sheet .grab { display: none; }
  .staff .sheet-head { padding-top: 22px; touch-action: auto; }
  .staff .sheet-body { padding: 0 22px 22px; }
  .staff .sheet-head, .staff .sheet-foot { padding-left: 22px; padding-right: 22px; }
  .staff .sheet.dialog { top: 50%; left: 50%; right: auto; bottom: auto; width: 460px; height: auto; max-height: 80vh; border-radius: 22px; opacity: 0; transform: translate(-50%, -50%) scale(.96); transition: transform .18s var(--ease), opacity .18s; }
  .staff .sheet-layer.open .sheet.dialog { opacity: 1; transform: translate(-50%, -50%); }
  .staff .toast { left: calc(50% + var(--side-w) / 2); bottom: 28px; }
  .staff.sheet-open .toast { left: 50%; }
  .staff .ptr { display: none; }
}

/* ------------------------------------------------ richieste */

.seg-wide { margin-bottom: 10px; }
.seg-n { display: inline-block; min-width: 20px; margin-left: 4px; padding: 0 6px; border-radius: 10px; background: rgba(27, 29, 34, .08); font-size: 12px; line-height: 20px; }
.seg button[aria-pressed="true"] .seg-n { background: var(--brand); color: #fff; }
.rich-tools { margin-bottom: 4px; }
.rich-tools .searchbar { position: static; flex: 1 1 auto; min-width: 0; }
.rich-tools .select { flex: 0 0 auto; }
.sec-hint { margin-left: auto; font-size: 12px; font-weight: 700; color: var(--ink-3); }
.stat-note { margin: 8px 4px 0; font-size: var(--fs-sm); font-weight: 700; color: var(--ink-3); }
.quote { font-style: italic; }
.timeline { list-style: none; margin: 0; padding: 4px 0; }
.ev { display: flex; gap: 10px; padding: 10px 14px; min-width: 0; }
.ev + .ev { border-top: 1px solid var(--line); }
.ev-ic { flex: 0 0 auto; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: rgba(27, 29, 34, .05); font-size: 14px; }
.ev.cli .ev-ic { background: rgba(31, 174, 84, .12); }
.ev-main { flex: 1; min-width: 0; }
.ev-top { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.ev-top b { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ev-top .dt { flex-shrink: 0; font-size: 12px; font-weight: 700; color: var(--ink-3); }
.ev p { margin: 2px 0 0; font-size: 14px; color: var(--ink-2); overflow-wrap: anywhere; }
.note-add { margin-top: 12px; }

@media (min-width: 1024px) {
  .staff #view-richieste .seg-wide { max-width: 520px; }
  .staff .rich-tools { max-width: 760px; }
  .staff #view-richieste .tbl-card { margin-top: 12px; }
}

/* pagina cliente: "Cosa ti serve?" */
.c-tiles { display: grid; gap: 10px; }
.c-tile { display: flex; align-items: center; gap: 14px; width: 100%; min-height: 72px; padding: 12px 16px; border: 0; text-align: left; }
.c-tile:active { transform: scale(.985); }
.c-tile:disabled { opacity: .5; }
.c-tile-ic { flex: 0 0 auto; width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; font-size: 24px; background: var(--brand-soft); }
.c-tile-tx { flex: 1; min-width: 0; }
.c-tile-tx b { display: block; font-size: 17px; font-weight: 900; }
.c-tile-tx small { display: block; font-size: 13px; font-weight: 700; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.field select { appearance: auto; }
.c-appt .c-veh { display: block; overflow-wrap: anywhere; }

/* le etichette che non stanno intere vanno a capo e restano nascoste: mai tagliate a metà */
.row .tags { flex-wrap: wrap; height: 20px; }
.tbl td .muted { display: block; overflow: hidden; text-overflow: ellipsis; }
.tbl td .tags { flex-wrap: wrap; height: 22px; }
.row .tag { max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
