/* ============================================================
   TAP2SIP — gestionale
   ============================================================ */

.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px; }
.login-card { width: 100%; max-width: 380px; padding: 38px 32px; text-align: center; }
.login-card h1 { font-family: var(--f-display); font-weight: 600; font-size: 20px; margin: 14px 0 4px; }
.login-card p.sub { color: var(--grigio); font-size: 13px; }
.login-card form { margin-top: 22px; display: grid; gap: 12px; text-align: left; }
.login-error { color: var(--rosso); font-size: 12.5px; min-height: 16px; margin-top: 10px; }
.login-hint { font-size: 12px; color: var(--grigio); margin-top: 16px; line-height: 1.7; }
.login-hint a { color: inherit; }

.topbar {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; gap: 18px;
  padding: 12px 22px;
  background: #101214;                     /* opaca: niente testo su testo */
  border-bottom: 1px solid var(--linea);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
}
.tabs { display: flex; gap: 4px; flex-wrap: wrap; }
.tab {
  position: relative; background: none; border: 1px solid transparent; border-radius: 8px;
  color: var(--grigio); font-family: var(--f-ui); font-weight: 500; font-size: 13px;
  padding: 9px 13px; cursor: pointer;
}
.tab:hover { color: var(--crema); }
.tab.active { color: var(--rame-chiaro); background: var(--pannello-2); border-color: var(--linea); }
.tab .badge {
  display: inline-block; min-width: 18px; text-align: center;
  background: var(--rame); color: var(--carbone); font-size: 11px; font-weight: 700;
  border-radius: 99px; padding: 1px 5px; margin-left: 6px;
}
.tab .badge.rosso { background: var(--rosso); color: #fff; }

.admin-main { max-width: 1160px; margin: 0 auto; padding: 28px 20px 90px; }
.section-title { font-family: var(--f-display); font-weight: 600; font-size: 22px; }
.section-sub { color: var(--grigio); font-size: 13.5px; line-height: 1.65; margin: 6px 0 22px; max-width: 720px; }
.subhead { font-family: var(--f-display); font-weight: 600; font-size: 16px; margin: 26px 0 12px; }

/* KPI */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin-bottom: 24px; }
.stat { padding: 18px 16px; }
.stat .value { font-family: var(--f-display); font-weight: 600; font-size: 27px; color: var(--rame-chiaro); line-height: 1.1; }
.stat .label { font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--grigio); margin-top: 7px; }
.stat .delta { font-size: 11.5px; margin-top: 4px; color: var(--grigio); }

/* barre */
.bars { padding: 18px; }
.bar-row { display: grid; grid-template-columns: minmax(110px, 160px) 1fr 70px; align-items: center; gap: 12px; margin-bottom: 9px; }
.bar-row .name { font-size: 13px; color: var(--crema); text-align: right; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar-track { height: 9px; background: var(--pannello-2); border-radius: 3px; overflow: hidden; }
.bar-fill { height: 100%; background: linear-gradient(90deg, #8a5228, var(--rame)); border-radius: 3px; }
.bar-fill.verde { background: linear-gradient(90deg, #4c6b48, var(--verde)); }
.bar-row .count { font-size: 12px; color: var(--grigio); }

/* tabelle */
.table-wrap { overflow-x: auto; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 13.5px; }
table.tbl th {
  font-weight: 600; font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--grigio); text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--linea);
  white-space: nowrap;
}
table.tbl td { padding: 10px 12px; border-bottom: 1px solid #1e2226; color: var(--crema); vertical-align: middle; }
table.tbl td.dim { color: var(--grigio); }
table.tbl tr:last-child td { border-bottom: none; }

.q-label { font-size: 11px; font-weight: 600; border-radius: 6px; padding: 3px 8px; white-space: nowrap; }
.q-star { background: #2c3a2b; color: var(--verde); }
.q-cavallo { background: #3a3222; color: #d9b869; }
.q-enigma { background: #253039; color: #7fa6c4; }
.q-rivedere { background: #3a2422; color: var(--rosso); }

/* ordini */
.orders-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.order-card { padding: 14px; }
.order-card .head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 8px; }
.order-card .head b { font-family: var(--f-display); font-size: 17px; }
.order-card ul { list-style: none; font-size: 13.5px; color: var(--crema); display: grid; gap: 4px; }
.order-card .time { font-size: 11.5px; color: var(--grigio); }
.order-card .actions { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.status-pill { font-size: 11px; font-weight: 600; padding: 3px 9px; border-radius: 99px; }
.st-nuovo { background: var(--rame); color: var(--carbone); }
.st-preparazione { background: #253039; color: #7fa6c4; }
.st-servito { background: #2c3a2b; color: var(--verde); }

.batch-step { padding: 14px 16px; margin-bottom: 10px; display: flex; gap: 14px; align-items: flex-start; }
.batch-step .n {
  font-family: var(--f-display); font-weight: 700; font-size: 18px; color: var(--rame-chiaro);
  border: 1px solid var(--rame-20); border-radius: 8px; min-width: 34px; height: 34px;
  display: flex; align-items: center; justify-content: center;
}
.batch-step .bottle { font-weight: 600; }
.batch-step .items { color: var(--grigio); font-size: 13.5px; margin-top: 3px; line-height: 1.6; }

.qr-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.qr-card { padding: 14px; text-align: center; }
.qr-card img { width: 110px; height: 110px; background: #fff; border-radius: 6px; padding: 5px; }
.qr-card .t { font-family: var(--f-display); font-weight: 600; margin-top: 8px; }

/* drink & ingredienti */
.list-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 14px; }
.edit-card { padding: 16px; }
.edit-card .head-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 10px; }
.edit-card .head-row h3 { font-family: var(--f-display); font-weight: 600; font-size: 17px; }
.edit-card .grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.edit-card .grid3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; }
.edit-card .row { margin-top: 10px; }
.edit-card .foot { display: flex; gap: 8px; margin-top: 14px; flex-wrap: wrap; align-items: center; }
.edit-card.inactive { opacity: 0.55; }
.edit-card img.thumb { width: 100%; height: 120px; object-fit: cover; border-radius: 7px; background: var(--pannello-2); margin-bottom: 10px; }
.bottle-thumb { width: 46px; height: 62px; object-fit: contain; background: var(--pannello-2); border-radius: 6px; }

.recipe-rows { display: grid; gap: 8px; margin-top: 8px; }
.recipe-row { display: grid; grid-template-columns: 1fr 84px 34px; gap: 8px; align-items: center; }
.recipe-row button { width: 32px; height: 38px; border-radius: 7px; border: 1px solid var(--linea); background: var(--pannello-2); color: var(--rosso); cursor: pointer; }

.calc-box { background: var(--pannello-2); border: 1px solid var(--linea); border-radius: 8px; padding: 12px 14px; font-size: 13px; line-height: 1.7; margin-top: 12px; }
.calc-box b { color: var(--rame-chiaro); }

.price-hist { display: grid; gap: 6px; margin-top: 8px; }
.price-hist .ph-row { display: grid; grid-template-columns: 1fr 1fr 34px; gap: 8px; align-items: center; }
.price-hist .ph-row button { width: 32px; height: 38px; border-radius: 7px; border: 1px solid var(--linea); background: var(--pannello-2); color: var(--rosso); cursor: pointer; }

.checks { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 10px; }
.checks label { display: flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--grigio); cursor: pointer; }
.checks input[type="checkbox"] { width: 15px; height: 15px; accent-color: #c9793f; }

.stock-alert td { background: rgba(208, 104, 90, 0.07); }
.days-ok { color: var(--verde); }
.days-warn { color: #d9b869; }
.days-bad { color: var(--rosso); font-weight: 600; }

.settings-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 14px; }
.settings-card { padding: 20px 18px; }
.settings-card h3 { font-family: var(--f-display); font-weight: 600; font-size: 16px; margin-bottom: 12px; }
.settings-card p { font-size: 13px; color: var(--grigio); line-height: 1.65; margin-bottom: 12px; }
.settings-card .row { margin-top: 10px; }
.msg { font-size: 12.5px; margin-top: 10px; min-height: 15px; }
.msg.ok { color: var(--verde); }
.msg.err { color: var(--rosso); }

.toast {
  position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%) translateY(16px);
  background: var(--pannello); border: 1px solid var(--rame); border-radius: 9px;
  color: var(--crema); font-size: 13px; font-weight: 500; padding: 11px 20px;
  opacity: 0; pointer-events: none; transition: opacity 0.25s, transform 0.25s; z-index: 80;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

.add-bar { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 18px; }

@media (max-width: 640px) {
  .admin-main { padding: 20px 12px 80px; }
  .edit-card .grid3 { grid-template-columns: 1fr 1fr; }
}

/* ---------- v2: KDS, snack & merch, identità, magazzino ---------- */

select {
  width: 100%; background: var(--pannello-2); border: 1px solid var(--linea);
  border-radius: 8px; color: var(--crema); font-family: var(--f-ui);
  font-size: 14px; padding: 10px 12px;
}
select:focus { outline: none; border-color: var(--rame); }
input[type="color"] { width: 100%; background: var(--pannello-2); border: 1px solid var(--linea); border-radius: 8px; cursor: pointer; }

.kds-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.oc-var {
  display: inline-block; font-size: 11px; font-weight: 600; color: var(--carbone);
  background: var(--rame); border-radius: 5px; padding: 1px 7px; margin-left: 6px; vertical-align: 1px;
}
.oc-note { display: inline-block; font-size: 12px; color: #d9b869; margin-left: 6px; font-style: italic; }

/* modalità banco: schermo pieno, caratteri grandi, zero distrazioni */
.kds .topbar, .kds .tabs-wrap { display: none; }
.kds .admin-main { max-width: none; padding: 18px; }
.kds .order-card { font-size: 17px; }
.kds .order-card ul { font-size: 17px; }
.kds .order-card .head b { font-size: 22px; }
.kds .oc-note { font-size: 15px; }
.kds .orders-grid { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.kds .btn--small { padding: 12px 18px; font-size: 15px; }

.idn-preview { padding: 6px; }
.add-bar { display: flex; gap: 10px; margin-bottom: 16px; flex-wrap: wrap; }
.edit-card .thumb { width: 100%; height: 120px; object-fit: cover; border-radius: 8px; margin-bottom: 10px; }
.checks label { white-space: nowrap; }

/* ---------- v3: palmare, codici tavolo, offline, mobile ---------- */

#offline-banner {
  position: fixed; top: 0; left: 0; right: 0; z-index: 999;
  background: #d9b869; color: #101214; font-weight: 600; font-size: 13px;
  text-align: center; padding: 7px 12px;
}

.tcode-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin-top: 12px; }
.tcode-card {
  background: var(--pannello-2); border: 1px solid var(--linea); border-radius: 10px;
  padding: 12px; display: grid; gap: 6px; justify-items: center; text-align: center;
}
.tcode-t { font-size: 12px; color: var(--grigio); text-transform: uppercase; letter-spacing: .08em; }
.tcode-c { font-family: var(--f-display); font-size: 26px; font-weight: 700; letter-spacing: 4px; color: var(--rame-chiaro); }

#admin-overlay:empty { display: none; }
#admin-overlay { position: fixed; inset: 0; z-index: 200; background: rgba(10, 11, 13, .8); backdrop-filter: blur(4px); overflow-y: auto; padding: 14px; }
.palm {
  max-width: 640px; margin: 0 auto; background: var(--pannello); border: 1px solid var(--linea);
  border-radius: 16px; padding: 18px; display: grid; gap: 14px;
}
.palm-head { display: flex; justify-content: space-between; align-items: center; }
.palm-head h2 { font-family: var(--f-display); font-size: 20px; }
.palm .close { background: none; border: none; color: var(--grigio); font-size: 28px; cursor: pointer; line-height: 1; }
.palm-tables { display: grid; grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); gap: 10px; }
.palm-table {
  aspect-ratio: 1; font-family: var(--f-display); font-size: 22px; font-weight: 700;
  background: var(--pannello-2); border: 1px solid var(--linea); border-radius: 12px;
  color: var(--crema); cursor: pointer;
}
.palm-table:hover { border-color: var(--rame); color: var(--rame-chiaro); }
.palm-pick { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.palm-item {
  background: var(--pannello-2); border: 1px solid var(--linea); border-radius: 99px;
  color: var(--crema); font-family: var(--f-ui); font-size: 14px; padding: 10px 14px; cursor: pointer;
}
.palm-item:hover { border-color: var(--rame); }
.palm-item .p-price { color: var(--rame-chiaro); font-weight: 600; margin-left: 4px; }
.palm-cart { display: grid; gap: 10px; border-top: 1px solid var(--linea); padding-top: 12px; }
.palm-line .pl-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; font-size: 15px; }
.palm-line .qty { display: flex; align-items: center; gap: 8px; }
.palm-line .qty button {
  width: 32px; height: 32px; border-radius: 8px; border: 1px solid var(--linea);
  background: var(--pannello-2); color: var(--crema); font-size: 17px; cursor: pointer;
}
.palm-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; border-top: 1px solid var(--linea); padding-top: 14px; }
.palm-tot { font-family: var(--f-display); font-size: 24px; font-weight: 700; color: var(--rame-chiaro); }

/* gestionale dal telefono: il palmare in tasca */
@media (max-width: 720px) {
  .tabs { overflow-x: auto; flex-wrap: nowrap; scrollbar-width: none; }
  .tabs::-webkit-scrollbar { display: none; }
  .tabs .tab { white-space: nowrap; }
  .admin-main { padding: 14px 10px; }
  .orders-grid, .list-grid, .settings-grid, .stat-grid { grid-template-columns: 1fr !important; }
  .table-wrap { overflow-x: auto; }
  .palm { padding: 14px; }
  .kds-top { align-items: flex-start; }
}

/* ---------- v6: guida e supporto ---------- */

.help-btn {
  width: 32px; height: 32px; border-radius: 50%; flex-shrink: 0;
  background: var(--pannello-2); border: 1px solid var(--linea);
  color: var(--rame-chiaro); font-family: var(--f-display); font-weight: 700;
  font-size: 16px; cursor: pointer;
}
.help-btn:hover { border-color: var(--rame); }

.help {
  max-width: 880px; margin: 0 auto; background: var(--pannello);
  border: 1px solid var(--linea); border-radius: 16px;
  display: flex; flex-direction: column; max-height: calc(100vh - 40px);
}
.help-head {
  display: flex; align-items: center; gap: 12px; padding: 16px 18px;
  border-bottom: 1px solid var(--linea);
}
.help-head h2 { font-family: var(--f-display); font-size: 20px; margin-right: auto; white-space: nowrap; }
.help-head input[type="search"] { max-width: 240px; }
.help-head .close { background: none; border: none; color: var(--grigio); font-size: 26px; cursor: pointer; line-height: 1; }
.help-body { display: flex; overflow: hidden; flex: 1; }
.help-toc {
  width: 210px; flex-shrink: 0; border-right: 1px solid var(--linea);
  padding: 12px; display: flex; flex-direction: column; gap: 4px; overflow-y: auto;
}
.help-toc-btn {
  text-align: left; background: none; border: none; color: var(--grigio);
  font-family: var(--f-ui); font-size: 13.5px; padding: 8px 10px;
  border-radius: 8px; cursor: pointer;
}
.help-toc-btn:hover { background: var(--pannello-2); color: var(--crema); }
.help-content { padding: 18px 22px; overflow-y: auto; flex: 1; }
.help-sec { margin-bottom: 26px; scroll-margin-top: 10px; }
.help-sec h3 { font-family: var(--f-display); font-size: 18px; margin-bottom: 8px; color: var(--crema); }
.help-sec p { font-size: 13.5px; line-height: 1.65; color: var(--grigio); margin-bottom: 8px; }
.help-sec p b { color: var(--crema); font-weight: 600; }

@media (max-width: 720px) {
  .help-toc { display: none; }
  .help-head input[type="search"] { max-width: 130px; }
}

/* hidden vince su qualsiasi display: il baco della doppia schermata */
[hidden] { display: none !important; }

/* ---------- v7: elenchi + sottopagine, tavoli ---------- */
.rowlist { display: grid; gap: 8px; }
.rowitem {
  display: flex; justify-content: space-between; align-items: center; gap: 14px;
  padding: 13px 16px;
}
.rowitem .ri-main { display: grid; gap: 2px; min-width: 0; }
.rowitem .ri-main b { font-family: var(--f-display); font-size: 16px; }
.rowitem .ri-main .dim { font-size: 12.5px; }
.rowitem .ri-side { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.pill { font-size: 11px; font-weight: 600; border-radius: 99px; padding: 3px 10px; white-space: nowrap; }
.pill--on { color: var(--verde); border: 1px solid rgba(147, 176, 127, 0.4); }
.pill--off { color: var(--grigio); border: 1px solid var(--linea); }
.subpage-head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.rowlist .edit-card { max-width: 760px; }
.sess-row { display: flex; justify-content: space-between; align-items: center; gap: 14px; padding: 13px 16px; margin-bottom: 8px; }
.sess-row .sr-main { display: grid; gap: 2px; }
.sess-row .sr-side { display: flex; align-items: center; gap: 12px; }
.sess-row .sr-tot { font-family: var(--f-display); font-weight: 600; color: var(--rame-chiaro); }
.qr-url { font-size: 10px; color: var(--grigio); word-break: break-all; margin-top: 4px; }
@media (max-width: 720px) {
  .rowitem, .sess-row { flex-direction: column; align-items: flex-start; }
  .rowitem .ri-side, .sess-row .sr-side { width: 100%; justify-content: space-between; }
}

/* ---------- v8: navigazione laterale ---------- */
.admin-shell { display: flex; min-height: calc(100vh - 57px); }
.sidenav {
  width: 212px; flex-shrink: 0; padding: 14px 10px;
  border-right: 1px solid var(--linea); background: #101214;
  position: sticky; top: 57px; height: calc(100vh - 57px); overflow-y: auto;
}
.sidenav .tabs { display: flex; flex-direction: column; gap: 3px; }
.sidenav .tab {
  text-align: left; width: 100%; border-radius: 9px; padding: 11px 13px;
  font-size: 14px; border: none; background: none; color: var(--grigio);
  cursor: pointer; display: flex; align-items: center; gap: 9px;
}
.sidenav .tab:hover { background: var(--pannello-2); color: var(--crema); }
.sidenav .tab.active { background: var(--pannello-2); color: var(--rame-chiaro); font-weight: 600; }
.sidenav .tab--big { border: 1px solid var(--linea); margin: 6px 0; }
.admin-main { flex: 1; min-width: 0; }
.nav-burger {
  display: none; background: none; border: 1px solid var(--linea); border-radius: 9px;
  color: var(--crema); font-size: 18px; padding: 6px 12px; cursor: pointer;
}
.nav-backdrop { position: fixed; inset: 0; z-index: 59; background: rgba(0,0,0,.55); }
@media (max-width: 900px) {
  .nav-burger { display: block; }
  .sidenav {
    position: fixed; left: 0; top: 0; bottom: 0; height: 100vh; z-index: 60;
    transform: translateX(-105%); transition: transform .22s ease;
    box-shadow: 12px 0 40px rgba(0,0,0,.5); padding-top: 20px;
  }
  .sidenav.open { transform: none; }
  .admin-shell { display: block; }
}

/* ---------- v10: KDS professionale, chiaro/scuro ---------- */
body.kds .sidenav, body.kds .nav-burger { display: none; }
body.kds .admin-main { padding: 14px 16px; min-height: 100vh; }
body.kds.kds-light .admin-main { background: #eef0f2; }
body.kds.kds-light .section-title { color: #1c1e21; }
body.kds.kds-light .btn--ghost { border-color: #c8ccd2; color: #3a3f46; background: #fff; }

.kgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(255px, 1fr)); gap: 12px; align-items: start; }
.kcard {
  border-radius: 12px; overflow: hidden; cursor: pointer; user-select: none;
  background: var(--pannello); box-shadow: 0 2px 10px rgba(0,0,0,.25);
}
body.kds-light .kcard { background: #fff; box-shadow: 0 1px 6px rgba(0,0,0,.12); }
.kcard:active { transform: scale(.985); }

.khead {
  display: flex; align-items: center; gap: 10px; padding: 9px 13px;
  color: #16181b; font-weight: 700;
}
.khead--g { background: #7fbf7f; }
.khead--y { background: #e6c25e; }
.khead--r { background: #e07a6b; animation: kpulse 1.6s ease infinite; }
.khead--ok { background: #c9d3cb; }
.khead--off { background: #cfcfcf; text-decoration: line-through; }
@keyframes kpulse { 50% { filter: brightness(1.12); } }
.kt { font-family: var(--f-display); font-size: 24px; }
.kstatus { font-size: 10.5px; text-transform: uppercase; letter-spacing: .12em; opacity: .8; }
.kage { margin-left: auto; font-size: 17px; font-weight: 800; }

.kbody { padding: 10px 14px 6px; font-size: 16.5px; }
body.kds-light .kbody { color: #1c1e21; }
.kit { padding: 3px 0; line-height: 1.35; }
.kit b { color: var(--rame-chiaro); }
body.kds-light .kit b { color: #b05f1f; }
.kvar { color: #b08a2e; font-weight: 600; }
.knote { color: #c0564a; font-size: 14px; font-weight: 600; }
.khint { padding: 4px 14px 10px; font-size: 10.5px; color: #8a8f96; text-align: right; }
.kfoot {
  display: block; width: 100%; border: none; cursor: pointer;
  padding: 10px; font-weight: 600; background: rgba(127, 191, 127, .18); color: inherit;
}
body.kds-light .kfoot { background: #eef4ee; color: #2c5a2c; }
.kdone { opacity: .92; cursor: default; }
.kds-empty { font-family: var(--f-display); font-size: 30px; text-align: center; padding: 60px 0; color: var(--grigio); }
body.kds-light .kds-empty { color: #7d838b; }
.kallday {
  position: sticky; bottom: 0; margin-top: 16px; padding: 10px 14px;
  background: #101214; border-top: 1px solid var(--linea);
  display: flex; gap: 18px; flex-wrap: wrap; font-size: 15px;
}
body.kds-light .kallday { background: #fff; border-top: 1px solid #d8dce1; color: #1c1e21; }
.kallday b { color: var(--rame-chiaro); font-size: 18px; }
body.kds-light .kallday b { color: #b05f1f; }
.kds-helpbox {
  position: fixed; inset: 0; z-index: 80; display: flex;
  align-items: center; justify-content: center; background: rgba(0,0,0,.55);
}
.kds-helpbox p { line-height: 1.7; }

/* ---------- (vecchio blocco v8 sostituito) ---------- */

/* ---------- v10: mappa sala (ripristino) ---------- */
.fp-wrap { position: relative; border-radius: 12px; overflow: hidden; max-width: 760px; }
.fp-wrap img { width: 100%; display: block; opacity: .9; }
.fp-dot {
  position: absolute; width: 40px; height: 40px; border-radius: 50%;
  transform: translate(-50%, -50%); border: 2px solid #6fae6f;
  background: rgba(16, 18, 20, .88); color: var(--crema);
  font-weight: 700; font-size: 15px; cursor: pointer; touch-action: none;
}
.fp-dot--open { border-color: var(--rame); background: rgba(201, 121, 63, .82); }
.fp-wrap--edit .fp-dot { border-style: dashed; cursor: grab; }

/* ---------- v11: KDS avanzato ---------- */
.kds-stats { margin: -6px 0 12px; font-size: 13.5px; color: var(--grigio); }
body.kds-light .kds-stats { color: #5b616a; }
.kds-stats b { color: var(--rame-chiaro); }
body.kds-light .kds-stats b { color: #b05f1f; }

.kcard--rush { outline: 3px solid #7a63d8; outline-offset: -1px; }
.krush {
  background: #7a63d8; color: #fff; font-size: 10px; font-weight: 800;
  letter-spacing: .14em; padding: 2px 8px; border-radius: 20px;
}
.kcard--hold { opacity: .55; }
.khead--h { background: #b9bfc7; }

.kmeta { font-size: 11.5px; font-weight: 700; opacity: .75; }

.kit { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; cursor: pointer; border-radius: 8px; padding: 4px 6px; }
.kit:active { background: rgba(127,127,127,.12); }
.kchk { font-size: 15px; color: #6fae6f; }
.kit--done { opacity: .45; }
.kit--done > b, .kit--done { text-decoration: line-through; }
.kit .knote { flex-basis: 100%; text-decoration: none; }
.kit--hi { background: rgba(201, 121, 63, .22); box-shadow: inset 0 0 0 2px var(--rame); }
body.kds-light .kit--hi { background: #ffe9d6; }

.kbar { display: flex; align-items: center; gap: 6px; padding: 4px 10px 10px; }
.kico {
  border: 1px solid rgba(127,127,127,.35); background: none; border-radius: 9px;
  width: 40px; height: 34px; cursor: pointer; color: inherit; font-size: 14px;
}
body.kds-light .kico { background: #f4f5f7; color: #3a3f46; }
.kbar .khint { margin-left: auto; padding: 0; }

.kallday { gap: 8px; }
.kad {
  border: 1px solid rgba(127,127,127,.35); background: none; color: inherit;
  border-radius: 20px; padding: 5px 13px; cursor: pointer; font-size: 14.5px;
}
.kad b { color: var(--rame-chiaro); font-size: 17px; }
body.kds-light .kad { background: #f4f5f7; }
body.kds-light .kad b { color: #b05f1f; }
.kad--on { border-color: var(--rame); box-shadow: inset 0 0 0 1px var(--rame); }

/* ---------- v12: refresh moderno del gestionale ---------- */
.card, .settings-card, .rowitem { border-radius: 16px; box-shadow: 0 1px 0 rgba(255,255,255,.03), 0 8px 24px rgba(0,0,0,.18); }
.btn { border-radius: 11px; }
.section-title { letter-spacing: -.01em; }
.section-sub { max-width: 720px; }
.pill { border-radius: 20px; font-weight: 600; }
.tbl th { font-size: 10.5px; text-transform: uppercase; letter-spacing: .12em; }
.tbl td, .tbl th { padding: 9px 12px; }
.tbl tr:hover td { background: rgba(255,255,255,.025); }
input, select, textarea { border-radius: 10px; }
.subhead { letter-spacing: -.005em; }
.rowitem { transition: transform .1s, box-shadow .1s; }
.rowitem:hover { transform: translateY(-1px); }
