/* =============================================
   GESTIONALE COMMESSE — Main Stylesheet
   ============================================= */

@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@300;400;500;600;700&family=DM+Mono:wght@400;500&display=swap');

:root {
  --bg:          #0f1117;
  --bg2:         #161b27;
  --bg3:         #1e2535;
  --border:      #2a3045;
  --accent:      #4f7cff;
  --accent-dim:  #4f7cff22;
  --accent2:     #00d4aa;
  --text:        #e8ecf4;
  --text-dim:    #7b8aaa;
  --danger:      #ff4f6d;
  --success:     #00d4aa;
  --warning:     #ffb547;
  --sidebar-w:   260px;
  --radius:      10px;
  --shadow:      0 4px 24px rgba(0,0,0,0.4);
}

html.theme-light {
  --bg:          #f0f2f5;
  --bg2:         #ffffff;
  --bg3:         #e8ecf0;
  --border:      #d1d9e6;
  --accent:      #3b6de6;
  --accent-dim:  #3b6de622;
  --accent2:     #00b894;
  --text:        #1a202c;
  --text-dim:    #64748b;
  --danger:      #e53e3e;
  --success:     #00b894;
  --warning:     #e8a317;
  --shadow:      0 4px 24px rgba(0,0,0,0.08);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  font-size: 14px;
}

/* ---- LAYOUT ---- */
.layout {
  display: flex;
  min-height: 100vh;
}

.main-content {
  margin-left: var(--sidebar-w);
  flex: 1;
  padding: 32px;
  min-height: 100vh;
  min-width: 0; /* consente a flex-child di restringersi; attiva overflow-x interni (preview-table, table-wrap) */
}

/* ---- SIDEBAR ---- */
.sidebar {
  width: var(--sidebar-w);
  background: var(--bg2);
  border-right: 1px solid var(--border);
  position: fixed;
  top: 0; left: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  z-index: 100;
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 24px 20px;
  border-bottom: 1px solid var(--border);
}

.logo-icon {
  width: 38px; height: 38px;
  background: var(--accent);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
  color: #fff;
}

.logo-title { display: block; font-weight: 700; font-size: 15px; letter-spacing: -0.3px; }
.logo-sub   { display: block; font-size: 11px; color: var(--text-dim); }
.logo-version { display: block; font-size: 10px; color: var(--text-dim); opacity: 0.6; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; margin-top: 2px; letter-spacing: 0.3px; }
.logo-text  { flex: 1; min-width: 0; }

.sidebar-nav {
  flex: 1;
  padding: 16px 12px;
  overflow-y: auto;
}

.nav-section-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--text-dim);
  padding: 12px 8px 6px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 8px;
  color: var(--text-dim);
  text-decoration: none;
  font-weight: 500;
  transition: all 0.15s;
  margin-bottom: 2px;
}

.nav-item:hover { background: var(--bg3); color: var(--text); }
.nav-item.active { background: var(--accent-dim); color: var(--accent); }
.nav-icon { font-size: 16px; width: 20px; text-align: center; }

.sidebar-footer {
  padding: 16px 12px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 10px;
}

.user-avatar {
  width: 34px; height: 34px;
  background: var(--accent);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 13px;
  flex-shrink: 0;
  overflow: hidden;
}

.user-details { flex: 1; overflow: hidden; }
.user-name  { display: block; font-weight: 600; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-role  { display: block; font-size: 11px; color: var(--text-dim); }

.logout-btn {
  color: var(--text-dim);
  font-size: 18px;
  text-decoration: none;
  padding: 4px;
  transition: color 0.15s;
  flex-shrink: 0;
}
.logout-btn:hover { color: var(--danger); }

/* Sidebar collapse button */
.sidebar-collapse-btn {
  background: var(--bg3); border: 1px solid var(--border);
  color: var(--text-dim); width: 28px; height: 28px;
  border-radius: 6px; cursor: pointer; font-size: 11px;
  display: flex; align-items: center; justify-content: center;
  transition: background .15s, color .15s; flex-shrink: 0;
  margin-left: auto;
}
.sidebar-collapse-btn:hover { background: var(--accent); color: #fff; border-color: var(--accent); }

/* ---- SIDEBAR COLLAPSED STATE ---- */
.sidebar, .main-content { transition: width .25s ease, margin-left .25s ease; }

html.sidebar-collapsed .sidebar { width: 64px; overflow: hidden; }
html.sidebar-collapsed .main-content { margin-left: 64px; }

html.sidebar-collapsed .logo-text,
html.sidebar-collapsed .nav-section-label,
html.sidebar-collapsed .nav-arrow,
html.sidebar-collapsed .nav-item > span:not(.nav-icon),
html.sidebar-collapsed .nav-subitems,
html.sidebar-collapsed .user-details,
html.sidebar-collapsed .logout-btn,
html.sidebar-collapsed .theme-toggle { display: none; }

html.sidebar-collapsed .sidebar-logo { padding: 20px 0; justify-content: center; }
html.sidebar-collapsed .sidebar-nav { padding: 12px 6px; overflow-x: hidden; overflow-y: auto; }
html.sidebar-collapsed .nav-item { justify-content: center; padding: 10px 0; gap: 0; }
html.sidebar-collapsed .nav-icon { font-size: 18px; width: auto; }
html.sidebar-collapsed .sidebar-footer { justify-content: center; padding: 12px 6px; gap: 6px; flex-direction: column; align-items: center; }
html.sidebar-collapsed .user-info { display: none; }
html.sidebar-collapsed .sidebar-collapse-btn { width: 36px; height: 36px; font-size: 13px; margin-left: 2px; }

/* Tooltip on hover when collapsed */
html.sidebar-collapsed .nav-item { position: relative; }
html.sidebar-collapsed .nav-item::after {
  content: attr(data-tip);
  position: absolute; left: 100%; top: 50%; transform: translateY(-50%);
  background: var(--bg); border: 1px solid var(--border); color: var(--text);
  padding: 5px 10px; border-radius: 6px; font-size: 12px; white-space: nowrap;
  pointer-events: none; opacity: 0; transition: opacity .15s;
  margin-left: 8px; z-index: 200;
}
html.sidebar-collapsed .nav-item:hover::after { opacity: 1; }

/* ---- PAGE HEADER ---- */
.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
}

.page-title { font-size: 22px; font-weight: 700; letter-spacing: -0.5px; }
.page-subtitle { font-size: 13px; color: var(--text-dim); margin-top: 2px; }

/* ---- CARD ---- */
.card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}

/* ---- TABLE ---- */
.table-wrap { overflow-x: auto; }

table {
  width: 100%;
  border-collapse: collapse;
}

thead th {
  text-align: left;
  padding: 10px 14px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--text-dim);
  border-bottom: 1px solid var(--border);
}

tbody td {
  padding: 13px 14px;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  vertical-align: middle;
}

tbody tr:last-child td { border-bottom: none; }
tbody tr:hover td { background: var(--bg3); }

/* ---- BADGE ---- */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
}

.badge-green  { background: #00d4aa22; color: var(--success); }
.badge-red    { background: #ff4f6d22; color: var(--danger); }
.badge-blue   { background: var(--accent-dim); color: var(--accent); }
.badge-yellow { background: #ffb54722; color: var(--warning); }

/* ---- BUTTONS ---- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 18px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  transition: all 0.15s;
  text-decoration: none;
}

.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: #3d6ae0; }

.btn-danger { background: #ff4f6d22; color: var(--danger); border: 1px solid #ff4f6d44; }
.btn-danger:hover { background: var(--danger); color: #fff; }

.btn-ghost { background: transparent; color: var(--text-dim); border: 1px solid var(--border); }
.btn-ghost:hover { background: var(--bg3); color: var(--text); }

.btn-sm { padding: 5px 12px; font-size: 12px; }

/* ---- FORMS ---- */
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group.full { grid-column: 1 / -1; }

label { font-size: 12px; font-weight: 600; color: var(--text-dim); }

input, select, textarea {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 14px;
  color: var(--text);
  font-family: inherit;
  font-size: 14px;
  transition: border-color 0.15s;
  outline: none;
  width: 100%;
}

/* Rimuove le frecce spin dal type=number quando si usa la classe .no-spinner */
input.no-spinner::-webkit-outer-spin-button,
input.no-spinner::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
input.no-spinner { -moz-appearance: textfield; appearance: textfield; }

/* Badge tipo documento (Fattura / Ricevuta) usati in elenco_spese.php e spese.php */
.badge-tipo-fattura  { background:#e0e7ff; color:#4338ca; }
.badge-tipo-ricevuta { background:#fce7f3; color:#be185d; }

input:focus, select:focus, textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-dim);
}

select option { background: var(--bg2); }

/* ---- MODAL ---- */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  z-index: 200;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(4px);
}

.modal-overlay.open { display: flex; overflow-y: auto; padding: 24px 0; }

.modal {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 28px;
  width: 100%;
  max-width: 520px;
  max-height: calc(100vh - 48px);
  overflow-y: auto;
  margin: auto;
  animation: slideUp 0.2s ease;
}

@keyframes slideUp {
  from { transform: translateY(20px); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 22px;
}

.modal-title { font-size: 18px; font-weight: 700; }

.modal-close {
  background: none; border: none; cursor: pointer;
  color: var(--text-dim); font-size: 22px;
  transition: color 0.15s;
}
.modal-close:hover { color: var(--text); }

.modal-footer {
  display: flex; gap: 10px; justify-content: flex-end;
  margin-top: 24px; padding-top: 20px;
  border-top: 1px solid var(--border);
}

/* ---- POPOVER DETTAGLIO ---- */
.dettaglio-popover {
  display: none;
  position: fixed;
  z-index: 300;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.45);
  min-width: 320px;
  max-width: 560px;
  max-height: 340px;
  overflow: hidden;
  animation: slideUp 0.15s ease;
}
.dettaglio-popover.open { display: block; }
.dettaglio-popover-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  font-size: 12px;
  font-weight: 700;
}
.dettaglio-popover-body {
  overflow-y: auto;
  max-height: 280px;
  padding: 6px 0;
}
.dettaglio-popover-body table {
  width: 100%;
  font-size: 11px;
  border-collapse: collapse;
}
.dettaglio-popover-body th {
  padding: 4px 10px;
  font-weight: 600;
  color: var(--text-dim);
  text-align: left;
  position: sticky;
  top: 0;
  background: var(--bg2);
}
.dettaglio-popover-body td {
  padding: 4px 10px;
  border-top: 1px solid var(--border);
}
.dettaglio-popover-body tr:first-child td { border-top: none; }
.clickable-amount {
  cursor: pointer;
  text-decoration: underline dotted;
  text-underline-offset: 3px;
}
.clickable-amount:hover {
  color: var(--accent);
}

/* ---- ALERTS ---- */
.alert {
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 13px;
  margin-bottom: 20px;
  font-weight: 500;
}

.alert-danger  { background: #ff4f6d22; color: var(--danger);  border: 1px solid #ff4f6d44; }
.alert-success { background: #00d4aa22; color: var(--success); border: 1px solid #00d4aa44; }

/* ---- LOGIN PAGE ---- */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  background-image:
    radial-gradient(ellipse at 20% 50%, #4f7cff12 0%, transparent 60%),
    radial-gradient(ellipse at 80% 20%, #00d4aa0a 0%, transparent 50%);
}

.login-box {
  width: 100%;
  max-width: 400px;
  padding: 20px;
}

.login-logo {
  text-align: center;
  margin-bottom: 32px;
}

.login-logo-icon {
  width: 56px; height: 56px;
  background: var(--accent);
  border-radius: 16px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 26px;
  margin-bottom: 14px;
  box-shadow: 0 8px 32px #4f7cff44;
}

.login-logo h1 { font-size: 22px; font-weight: 700; letter-spacing: -0.5px; }
.login-logo p  { font-size: 13px; color: var(--text-dim); margin-top: 4px; }

.login-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 32px;
}

.login-card .form-group { margin-bottom: 16px; }
.login-card .btn-primary { width: 100%; justify-content: center; padding: 12px; font-size: 15px; }
.login-footer { text-align: center; font-size: 12px; color: var(--text-dim); margin-top: 20px; }

/* ---- STATS ---- */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 28px;
}

.stat-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.stat-icon {
  width: 46px; height: 46px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
}

.stat-value { font-size: 26px; font-weight: 700; line-height: 1; margin-bottom: 4px; }
.stat-label { font-size: 12px; color: var(--text-dim); font-weight: 500; }

/* ---- FILTERS BAR (unified) ---- */
.filters-bar, .search-bar {
  display: flex; gap: 10px; margin-bottom: 18px;
  flex-wrap: wrap; align-items: center;
}
.filters-bar input[type="text"],
.filters-bar input[type="search"],
.search-bar input[type="text"],
.search-bar input[type="search"] {
  flex: 1; min-width: 160px; max-width: 280px;
  padding: 8px 12px; font-size: 13px;
}
.filters-bar select,
.search-bar select {
  min-width: 130px; max-width: 200px;
  padding: 8px 12px; font-size: 13px;
}
.filters-bar input[type="date"] {
  width: 140px; padding: 8px 10px; font-size: 13px;
}
.filters-bar .filter-label {
  font-size: 11px; color: var(--text-dim); font-weight: 600;
  display: flex; flex-direction: column; gap: 3px;
}

/* Pagination (unified) */
.pagination {
  display: flex; gap: 6px; margin-top: 20px;
  align-items: center; flex-wrap: wrap;
}

/* ---- MISC ---- */
.mono { font-family: 'DM Mono', monospace; }
.text-dim { color: var(--text-dim); }
.mt-4 { margin-top: 4px; }
.flex { display: flex; }
.gap-2 { gap: 8px; }
.items-center { align-items: center; }

/* ---- LIGHT THEME OVERRIDES ---- */
html.theme-light .modal-overlay { background: rgba(0,0,0,0.3); }
html.theme-light .badge-green  { background: #00b89418; }
html.theme-light .badge-red    { background: #e53e3e18; }
html.theme-light .badge-blue   { background: #3b6de618; }
html.theme-light .badge-yellow { background: #e8a31718; }
html.theme-light .alert-success { background: #00b89412; border-color: #00b89444; }
html.theme-light .alert-danger  { background: #e53e3e12; border-color: #e53e3e44; }
html.theme-light .sidebar { box-shadow: 2px 0 8px rgba(0,0,0,0.06); }
html.theme-light .card { box-shadow: 0 1px 4px rgba(0,0,0,0.06); }

/* ---- INPUT/TEXTAREA/SELECT READONLY o DISABLED ---- */
/* Visivamente si distinguono (bg piu scuro/chiaro che si confonde col modal, bordo piu debole) */
/* ma testo pienamente leggibile, niente cursore I-beam o pointer */
input[readonly],
textarea[readonly],
select[disabled] {
  background: var(--bg) !important;
  border-color: color-mix(in srgb, var(--border) 55%, transparent) !important;
  color: var(--text) !important;
  cursor: default !important;
  opacity: 1 !important;
  caret-color: transparent;
}
input[readonly]:hover,
textarea[readonly]:hover,
select[disabled]:hover {
  border-color: color-mix(in srgb, var(--border) 55%, transparent) !important;
  cursor: default !important;
}
input[readonly]:focus,
textarea[readonly]:focus {
  border-color: color-mix(in srgb, var(--border) 55%, transparent) !important;
  box-shadow: none !important;
}

/* ---- SEARCHABLE SELECT (dropdown con filtro + gruppi) ---- */
.ss-wrap { position: relative; display: block; width: 100%; min-width: 140px; }
.ss-trigger { width: 100%; min-height: 34px; padding: 0; font-size: 12px; background: var(--bg); border: 1px solid var(--border); border-radius: 6px; color: var(--text); text-align: left; cursor: pointer; font-family: inherit; display: flex; align-items: stretch; box-sizing: border-box; }
.ss-trigger:hover { border-color: var(--accent); }
.ss-label-wrap { flex: 1; min-width: 0; overflow: hidden; display: flex; align-items: center; padding: 6px 0 6px 10px; }
.ss-label { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 12px; line-height: 1.3; }
.ss-arrow { flex-shrink: 0; display: flex; align-items: center; justify-content: center; width: 24px; color: var(--text-dim); font-size: 11px; background: var(--bg); border-left: 1px solid var(--border); }
.ss-pop { display: none; position: fixed; top: 0; left: 0; min-width: 280px; max-width: min(600px, 90vw); background: var(--bg2); border: 1px solid var(--border); border-radius: 8px; box-shadow: 0 8px 24px rgba(0,0,0,0.3); z-index: 9999; max-height: 400px; flex-direction: column; overflow: hidden; }
.ss-pop.open { display: flex; }
.ss-search { width: 100%; padding: 10px 12px; font-size: 12px; border: none; border-bottom: 1px solid var(--border); background: var(--bg3); color: var(--text); outline: none; box-sizing: border-box; }
.ss-list { overflow: auto; flex: 1; min-width: 0; }
.ss-inner { display: inline-block; min-width: 100%; box-sizing: border-box; }
.ss-group { border-bottom: 1px solid var(--border); display: block; }
.ss-group-hdr { padding: 10px 12px; font-size: 11px; font-weight: 700; cursor: pointer; display: flex; align-items: center; gap: 8px; background: var(--bg3); text-transform: uppercase; letter-spacing: 0.4px; color: var(--text-dim); user-select: none; white-space: nowrap; }
.ss-group-hdr:hover { background: var(--bg); color: var(--text); }
.ss-chevron { transition: transform 0.15s; font-size: 9px; color: var(--accent); flex-shrink: 0; }
.ss-group.open .ss-chevron { transform: rotate(90deg); }
.ss-count { margin-left: auto; font-size: 9px; background: var(--bg); padding: 2px 6px; border-radius: 10px; color: var(--text-dim); flex-shrink: 0; }
.ss-group-body { display: none; }
.ss-group.open .ss-group-body { display: block; }
.ss-item { display: block; white-space: nowrap; padding: 8px 12px 8px 20px; font-size: 12px; cursor: pointer; color: var(--text); border-top: 1px solid var(--border); }
.ss-item:hover { background: var(--accent); color: #fff; }
html.theme-light input, html.theme-light select, html.theme-light textarea {
  background: var(--bg2); border-color: var(--border); color: var(--text);
}
html.theme-light .stat-card { box-shadow: 0 1px 4px rgba(0,0,0,0.06); }

/* Theme toggle */
.theme-toggle {
  background: var(--bg3);
  border: 1px solid var(--border);
  color: var(--text-dim);
  width: 34px; height: 34px;
  border-radius: 8px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px;
  transition: background .15s, color .15s;
  flex-shrink: 0;
}
.theme-toggle:hover { background: var(--accent); color: #fff; border-color: var(--accent); }

/* ===== Budget Tabs ===== */
.budget-tabs-bar {
  display: flex; gap: 4px; margin-bottom: 16px;
  border-bottom: 2px solid var(--border); padding-bottom: 0;
}
.budget-tab {
  padding: 8px 16px; border: none; background: none;
  color: var(--text-dim); font-size: 12px; font-weight: 600;
  cursor: pointer; border-bottom: 2px solid transparent;
  margin-bottom: -2px; transition: all .15s;
}
.budget-tab:hover { color: var(--text); }
.budget-tab.active { color: var(--accent); border-bottom-color: var(--accent); }

.budget-tab-panel { display: none; }
.budget-tab-panel.active { display: block; }

/* Delta colors */
.delta-positive { color: var(--success) !important; }
.delta-negative { color: var(--danger) !important; }
.delta-warning  { color: var(--warning) !important; }

/* Timeline */
.timeline-item {
  border: 1px solid var(--border); border-radius: 8px;
  margin-bottom: 8px; overflow: hidden;
}
.timeline-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 14px; cursor: pointer; transition: background .15s;
}
.timeline-header:hover { background: var(--bg3); }
.timeline-arrow { font-size: 12px; color: var(--text-dim); transition: transform .2s; }
.timeline-item.expanded .timeline-arrow { transform: rotate(90deg); }
.timeline-body {
  display: none; padding: 0 14px 12px; border-top: 1px solid var(--border);
}
.timeline-item.expanded .timeline-body { display: block; padding-top: 10px; }

/* Budget cat row in modal */
.budget-cat-row {
  display: flex; align-items: center; gap: 10px;
  padding: 7px 10px; border-radius: 6px;
  transition: background .1s;
  min-height: 36px;
}
.budget-cat-row:hover { background: var(--bg3); }
.budget-cat-row + .budget-cat-row { border-top: 1px solid var(--border); }

/* Turni detail accordion */
.manodopera-row { transition: background .1s; }
.manodopera-row:hover { background: var(--bg3); }
.manodopera-row .acc-arrow {
  display: inline-block; font-size: 10px; color: var(--text-dim);
  transition: transform .2s; margin-left: 4px;
}
.manodopera-row.open .acc-arrow { transform: rotate(90deg); }
.turni-detail-row { display: none; }
.turni-detail-row.turni-visible { display: table-row; }
.turni-detail-row td { background: var(--bg3); }
