.table { width: 100%; border-collapse: collapse; }
.table th, .table td { padding: 10px; border-bottom: 1px solid #e5e7eb; text-align: left; vertical-align: top; }
.table tbody tr { cursor: pointer; }
.table tbody tr:hover { background: #f9fafb; }

button {
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid #d1d5db;
  background: #fff;
  cursor: pointer;
}
button:hover { background: #f9fafb; }

input, select, textarea {
  padding: 10px;
  border: 1px solid #d1d5db;
  border-radius: 10px;
  width: 100%;
  background: #fff;
}

.alloc-row {
  display: grid;
  grid-template-columns: 1.6fr 0.45fr 1fr auto;
  gap: 8px;
  margin-bottom: 8px;
}

.badge {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 12px;
  line-height: 1.2;
  border: 1px solid transparent;
}

.badge--ok {
  background: #ecfdf5;
  color: #065f46;
  border-color: #a7f3d0;
}

.badge--warn {
  background: #fff7ed;
  color: #9a3412;
  border-color: #fdba74;
}

.badge--danger {
  background: #fef2f2;
  color: #991b1b;
  border-color: #fca5a5;
}

.badge--info {
  background: #f5f3ff;
  color: #6d28d9;
  border-color: #c4b5fd;
}

.mono { font-variant-numeric: tabular-nums; }
.muted { color: #6b7280; }


.warning-box {
  margin-top: 12px;
  padding: 12px;
  border-radius: 12px;
  background: #fff7ed;
  border: 1px solid #fdba74;
  color: #9a3412;
}

.inline-check {
  display: inline-flex;
  gap: 8px;
  align-items: center;
}

.inline-check input {
  width: auto;
}



.manual-context-grid{
  grid-template-columns: repeat(4, minmax(180px, 1fr)) !important;
}
.manual-operativi-grid{
  grid-template-columns: repeat(6, minmax(120px, 1fr)) !important;
  align-items: end;
}
.manual-summary-grid{
  grid-template-columns: minmax(220px, 280px) !important;
}
.manual-operativi-grid .checkbox-line{
  display:flex;
  align-items:flex-end;
  height:100%;
}
@media (max-width: 1100px){
  .manual-context-grid{
    grid-template-columns: repeat(2, minmax(180px, 1fr)) !important;
  }
  .manual-operativi-grid{
    grid-template-columns: repeat(3, minmax(120px, 1fr)) !important;
  }
}
@media (max-width: 700px){
  .manual-context-grid,
  .manual-operativi-grid,
  .manual-summary-grid{
    grid-template-columns: 1fr !important;
  }
}




.alloc-header,
.alloc-row{
  display:grid;
  grid-template-columns: minmax(220px,2fr) 110px 90px 110px 110px minmax(180px,1.3fr) 52px;
  gap:8px;
  align-items:center;
}

.alloc-header{
  margin-bottom:8px;
  font-weight:700;
}

.alloc-row{
  margin-bottom:8px;
}

.alloc-row .is-disabled{
  opacity:.55;
}

.alloc-row .remove-row{
  min-width:42px;
}

@media (max-width: 1100px){
  .alloc-header{
    display:none;
  }

  .alloc-row{
    grid-template-columns: 1fr 1fr;
    padding:10px;
    border:1px solid #dbe3ef;
    border-radius:12px;
    margin-bottom:10px;
    background:#fff;
  }

  .alloc-row > *{
    min-width:0;
  }
}




/* ============================= */
/* MANUALE CONSOLIDATO (PULITO) */
/* ============================= */

/* === Registro Ore v2 · Manuale riga compatta Ore/Fascia === */

.manual-dip-row--compact-editor{
  padding: 12px !important;
}

.manual-dip-row-head--compact{
  display:grid !important;
  grid-template-columns: minmax(260px, 420px) auto 1fr !important;
  gap: 12px !important;
  align-items:end !important;
  margin-bottom: 12px !important;
}

.manual-person-wrap label{
  display:block;
  font-size:12px;
  font-weight:700;
  color:#64748b;
  margin-bottom:4px;
}

.manual-mode-toggle{
  display:inline-flex;
  align-items:center;
  gap:4px;
  padding:4px;
  border:1px solid #dbe4ee;
  border-radius:999px;
  background:#f8fafc;
}

.manual-mode-btn{
  min-width:38px;
  height:34px;
  padding:0 10px;
  border-radius:999px;
  font-size:16px;
  line-height:1;
}

.manual-mode-btn.is-active{
  background:#fff;
  border-color:#cbd5e1;
  box-shadow:0 1px 4px rgba(15,23,42,.08);
}

.manual-row-actions{
  display:flex;
  justify-content:flex-end;
  align-items:center;
  gap:10px;
}

.manual-dip-row-grid--one-line{
  display:grid !important;
  grid-template-columns: 105px 95px 80px 105px 105px 85px 85px 90px !important;
  gap:8px !important;
  align-items:end !important;
}

.manual-dip-row-grid--one-line label{
  display:block;
  font-size:12px !important;
  font-weight:700;
  color:#64748b;
  margin-bottom:4px !important;
}

.manual-dip-row-grid--one-line input,
.manual-dip-row-grid--one-line select{
  padding:8px 10px !important;
  font-size:13px !important;
  min-width:0 !important;
}

.manual-dip-row-grid--one-line .span-full{
  grid-column:1 / -1 !important;
}

.manual-dip-row-grid--one-line .manual-row-inline-check-wrap{
  padding-bottom:8px !important;
}

.manual-dip-row-grid--one-line .manual-row-inline-check{
  min-height:34px !important;
  margin:0 !important;
  white-space:nowrap !important;
}

@media (max-width: 1250px){
  .manual-dip-row-grid--one-line{
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 760px){
  .manual-dip-row-head--compact{
    grid-template-columns: 1fr !important;
  }

  .manual-row-actions{
    justify-content:flex-start;
  }

  .manual-dip-row-grid--one-line{
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 560px){
  .manual-dip-row-grid--one-line{
    grid-template-columns: 1fr !important;
  }
}




/* === Registro Ore v2 · Manuale step4 minimo toggle in cella === */

.manual-mode-select-hidden{
  display:none !important;
}

.manual-mode-toggle--cell{
  width:100%;
  height:38px;
  max-width:105px;
}

.manual-mode-toggle--cell .manual-mode-btn{
  flex:1;
  min-width:0;
  height:30px;
}




/* === Registro Ore v2 · Manuale ticket toggle finale === */

.manual-dip-row-grid--one-line .manual-row-inline-check-wrap{
  height:38px;
  min-height:38px;
  padding-bottom:0 !important;
  align-items:end !important;
}

.manual-dip-row-grid--one-line .manual-row-inline-check{
  height:38px !important;
  min-height:38px !important;
  display:inline-flex !important;
  align-items:center !important;
  gap:8px !important;
  padding:0 10px !important;
  border:1px solid #d1d5db;
  border-radius:10px;
  background:#fff;
  font-weight:700;
  color:#64748b;
}

.manual-dip-row-grid--one-line .manual-row-inline-check input{
  width:16px !important;
  height:16px !important;
  accent-color:#7c3aed;
}




/* === Registro Ore v2 · Manuale palette livelli scuri === */


/* livello 1: inbox generale manuale */
.manual-editor-shell{
  background: linear-gradient(180deg, #e8eef6 0%, #dfe7f1 100%) !important;
  border: 1px solid #cbd5e1 !important;
  box-shadow: 0 10px 28px rgba(15,23,42,.10) !important;
}

/* livello 2: blocchi interni */
.manual-editor-shell .detail-block{
  background: linear-gradient(180deg, #f1f5f9 0%, #eaf0f7 100%) !important;
  border: 1px solid #d5dde8 !important;
  border-radius: 14px !important;
}

/* livello 3: singola persona/dipendente */
.manual-dip-row{
  background: linear-gradient(180deg, #f8fafc 0%, #f2f6fb 100%) !important;
  border: 1px solid #dbe4ee !important;
  box-shadow: 0 2px 8px rgba(15,23,42,.06) !important;
}

/* intestazione dipendente */
.manual-dip-row-head--compact{
  background: #eef4fb !important;
  border: 1px solid #d5e0ec !important;
}

/* riga operativa */
.manual-dip-row-grid--one-line{
  background: #f6f9fd !important;
  border: 1px solid #e0e8f2 !important;
}

/* campi: sempre bianchi */
.manual-editor-shell input,
.manual-editor-shell select,
.manual-editor-shell textarea{
  background: #ffffff !important;
  border-color: #cbd5e1 !important;
}

/* testi label più leggibili */
.manual-editor-shell label{
  color: #334155 !important;
  font-weight: 700 !important;
}

/* titolo sezioni */
.manual-editor-shell .section-title-row h3,
.manual-editor-shell .section-title-row strong{
  color: #0f172a !important;
}

/* totale ore più evidente */
.manual-row-total{
  background: #ede9fe !important;
  border-color: #c4b5fd !important;
  color: #5b21b6 !important;
}

/* riepilogo: mantiene ok/errore ma più leggibile */
.manual-save-row.ok{
  background: linear-gradient(180deg, #dcfce7 0%, #ecfdf5 100%) !important;
  border-color: #86efac !important;
}

.manual-save-row.err{
  background: linear-gradient(180deg, #fee2e2 0%, #fef2f2 100%) !important;
  border-color: #fca5a5 !important;
}


/* === Registro Ore v2 · UI globale step 1 === */

/* pannelli più coerenti con il Manuale */
.panel{
  border: 1px solid #dbe4ee;
  box-shadow: 0 6px 18px rgba(15,23,42,.06);
}

.panel-head{
  padding-bottom: 10px;
  border-bottom: 1px solid #e5edf6;
  margin-bottom: 14px;
}

.panel-head h2,
.section-title-row h3{
  margin: 0;
  color: #0f172a;
}

.panel-meta,
.muted{
  color: #64748b;
}

/* blocchi interni */
.detail-block{
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 12px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
}

/* form più leggibili */
label{
  font-size: 13px;
  font-weight: 700;
  color: #334155;
}

input,
select,
textarea{
  border-color: #cbd5e1;
  background: #fff;
}

input:focus,
select:focus,
textarea:focus{
  outline: none;
  border-color: #c4b5fd;
  box-shadow: 0 0 0 3px rgba(59,130,246,.12);
}

/* bottoni più coerenti */
button{
  font-weight: 700;
  color: #334155;
  border-color: #cbd5e1;
}

button:hover{
  background: #f1f5f9;
}

/* tabelle leggermente più morbide */
.table th{
  color: #475569;
  font-size: 13px;
  background: #f8fafc;
}

.table td{
  color: #1f2937;
}

.table tbody tr:hover{
  background: #f1f5f9;
}

/* badge uniformati */
.badge{
  font-weight: 700;
}


/* === Registro Ore v2 · Operativo UI step 2A === */

/* tabella giornate più leggibile */
#giornate-table{
  border-collapse: separate;
  border-spacing: 0 6px;
}

#giornate-table thead th{
  border-bottom: 0;
  padding: 8px 10px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .02em;
}

#giornate-table tbody tr{
  background: #fff;
  box-shadow: 0 1px 4px rgba(15,23,42,.05);
}

#giornate-table tbody tr:hover{
  background: #f8fbff;
  box-shadow: 0 2px 8px rgba(15,23,42,.08);
}

#giornate-table tbody td{
  border-bottom: 1px solid #e5edf6;
  padding: 10px;
  vertical-align: middle;
}

#giornate-table tbody td:first-child{
  border-left: 1px solid #e5edf6;
  border-radius: 10px 0 0 10px;
  font-weight: 800;
  color: #5b21b6;
}

#giornate-table tbody td:last-child{
  border-right: 1px solid #e5edf6;
  border-radius: 0 10px 10px 0;
}

/* dettaglio giornata più coerente */
#detail .detail-meta{
  padding: 12px;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
}

#detail .detail-meta strong{
  color: #64748b;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .02em;
}

#detail .detail-meta span{
  color: #0f172a;
  font-weight: 700;
}

/* operativi più compatti e coerenti */
#detail .operativi-grid{
  gap: 10px;
}

#detail .checkbox-line{
  min-height: 38px;
}

/* allocazioni più leggibili */
#allocazioni{
  display: grid;
  gap: 8px;
}

#allocazioni .alloc-row{
  margin-bottom: 0;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 8px;
  box-shadow: 0 1px 4px rgba(15,23,42,.04);
}

#allocazioni .alloc-row:hover{
  background: #f8fbff;
}


/* === Registro Ore v2 · Operativo UI step 2B selected row === */

/* compatibile con varie classi usate o future */
#giornate-table tbody tr.selected,
#giornate-table tbody tr.is-selected,
#giornate-table tbody tr.active,
#giornate-table tbody tr.is-active,
#giornate-table tbody tr[aria-selected="true"]{
  background: #f5f3ff !important;
  box-shadow: 0 3px 12px rgba(37,99,235,.16) !important;
}

#giornate-table tbody tr.selected td:first-child,
#giornate-table tbody tr.is-selected td:first-child,
#giornate-table tbody tr.active td:first-child,
#giornate-table tbody tr.is-active td:first-child,
#giornate-table tbody tr[aria-selected="true"] td:first-child{
  border-left: 4px solid #7c3aed !important;
  color: #6d28d9 !important;
}

#giornate-table tbody tr.selected td,
#giornate-table tbody tr.is-selected td,
#giornate-table tbody tr.active td,
#giornate-table tbody tr.is-active td,
#giornate-table tbody tr[aria-selected="true"] td{
  border-top-color: #ddd6fe !important;
  border-bottom-color: #ddd6fe !important;
}

/* feedback click/hover più evidente */
#giornate-table tbody tr{
  transition: background .12s ease, box-shadow .12s ease, transform .12s ease;
}

#giornate-table tbody tr:active{
  transform: scale(.998);
}


/* === Registro Ore v2 · Giornate raggruppate === */
.giornate-section-head td{
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  padding: 14px 4px 6px !important;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: #475569;
}

.giornate-group-head td{
  border: 0 !important;
  padding: 4px 0 !important;
  background: transparent !important;
}

.giornate-group-toggle{
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  background: #e8eef6;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  padding: 10px 12px;
  text-align: left;
}

.giornate-group-toggle strong{
  flex: 1;
  color: #0f172a;
}

.giornate-group-caret{
  width: 18px;
  color: #6d28d9;
  font-weight: 900;
}

.giornata-row--recent td:first-child{
  color: #6d28d9 !important;
}


/* === Registro Ore v2 · Giornate accordion evidente === */
.giornate-group-row.hidden{
  display:none !important;
}

.giornate-section-head td{
  padding-top:18px !important;
  color:#334155 !important;
}

.giornate-group-toggle{
  min-height:46px;
  background:linear-gradient(180deg, #dfe7f1 0%, #d5dfeb 100%) !important;
  border:1px solid #b8c6d8 !important;
  box-shadow:0 2px 6px rgba(15,23,42,.08);
}

.giornate-group-toggle:hover{
  background:linear-gradient(180deg, #d8e3f0 0%, #ccd8e7 100%) !important;
}

.giornate-group-count{
  color:#475569;
  font-weight:700;
}

.giornate-group-state{
  padding:4px 9px;
  border-radius:999px;
  background:#ffffff;
  border:1px solid #cbd5e1;
  color:#6d28d9;
  font-size:12px;
  font-weight:800;
}

.giornate-group-caret{
  font-size:18px;
}


/* === Registro Ore v2 · Giornate accordion refine === */

/* togli feeling tabella */
#giornate-table{
  border-spacing: 0 8px !important;
}

/* header tabella meno invasivo */
#giornate-table thead{
  opacity: 0.6;
  font-size: 11px;
}

/* ultime giornate più evidenti */
.giornata-row--recent{
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%) !important;
  border: 1px solid #ede9fe !important;
}

/* separazione blocchi */
.giornate-section-head td{
  padding-top: 22px !important;
  padding-bottom: 6px !important;
  font-size: 13px !important;
  color: #1e293b !important;
}

/* accordion più “card” */
.giornate-group-toggle{
  margin-top: 4px;
  border-radius: 14px;
}

/* spazio tra gruppi */
.giornate-group-head{
  margin-bottom: 6px;
}

/* righe gruppo leggermente indentate */
.giornate-group-row td{
  padding-left: 16px !important;
}

/* hover più evidente */
.giornata-row:hover{
  transform: translateY(-1px);
}

/* badge più leggibili dentro gruppi */
.giornata-row .badge{
  font-size: 12px;
}

/* separazione visiva forte tra sezioni */
.giornate-section-head{
  border-top: 1px solid #e2e8f0;
}


/* === Registro Ore v2 · Operativo grouping DOM === */
.ro-op-super-group{
  border:1px solid #cbd5e1;
  border-radius:18px;
  background:linear-gradient(180deg,#e8eef6 0%,#dfe7f1 100%);
  padding:10px;
  box-shadow:0 8px 22px rgba(15,23,42,.07);
}

.ro-op-super-group > summary,
.ro-op-sub-group > summary{
  cursor:pointer;
  list-style:none;
  display:flex;
  align-items:center;
  gap:10px;
  padding:10px 12px;
  border-radius:14px;
  font-weight:800;
  color:#0f172a;
}

.ro-op-super-group > summary::-webkit-details-marker,
.ro-op-sub-group > summary::-webkit-details-marker{
  display:none;
}

.ro-op-super-group > summary span:last-child,
.ro-op-sub-group > summary span:last-child{
  margin-left:auto;
  font-size:12px;
  color:#475569;
  background:#fff;
  border:1px solid #cbd5e1;
  border-radius:999px;
  padding:3px 8px;
}

.ro-op-sub-group{
  margin-top:10px;
  border:1px solid #dbe4ee;
  border-radius:16px;
  background:#f8fafc;
  padding:8px;
}

.ro-op-group-body{
  display:grid;
  gap:12px;
  margin-top:8px;
}

.ro-op-super-group .ro-op-day{
  margin-top:0;
}


/* === Registro Ore v2 · Operativo header naming === */
.ro-f1-head,
.ro-op-day-head{
  background: linear-gradient(180deg, #eef4fb 0%, #e8eef6 100%) !important;
  border: 1px solid #d5e0ec !important;
  border-radius: 16px !important;
}

.ro-f1-title,
.ro-op-day-title{
  color: #0f172a !important;
  font-weight: 900 !important;
}

.ro-f1-subtitle,
.ro-op-day-sub{
  color: #64748b !important;
}

.ro-op-super-group[open] > summary,
.ro-op-sub-group[open] > summary{
  background: #ede9fe !important;
  color: #5b21b6 !important;
}

.ro-op-super-group > summary,
.ro-op-sub-group > summary{
  transition: background .12s ease, color .12s ease;
}

.ro-op-super-group > summary:hover,
.ro-op-sub-group > summary:hover{
  background: #f5f3ff !important;
}





/* === Registro Ore v2 · CX viaggio minimo stabile === */
.ro-cx-travel-field{
  max-width:120px !important;
  min-width:110px !important;
}

.ro-cx-travel-field input.ro-cx-viaggio{
  width:100% !important;
  min-width:0 !important;
}

/* === Registro Ore v2 · CX pausa viaggio stessa riga === */
.ro-cx-pausa-wrap{
  display:flex !important;
  align-items:flex-end !important;
  gap:10px !important;
  max-width:none !important;
  min-width:240px !important;
  flex:0 0 250px !important;
}

.ro-cx-pausa-wrap .ro-cx-field,
.ro-cx-pausa-wrap .ro-cx-travel-field{
  max-width:120px !important;
  min-width:110px !important;
  width:120px !important;
}

/* === REVIEW MULTI-IMPORT (arancione tenue) === */
.ro-row-review {
  background: rgba(255, 165, 0, 0.08);
  border-left: 3px solid rgba(255, 140, 0, 0.5);
}


/* === Registro Ore · review multi-import su vista Giornate === */
.ro-op-row.ro-op-row--review{
  background:#fff7ed !important;
  border-color:#fdba74 !important;
  box-shadow:0 0 0 2px rgba(251,146,60,.16) !important;
}


/* === Registro Ore · topbar homepage style 20260428-104911 === */
:root {
  --ro-registro-color: #7c3aed;
  --ro-registro-soft: #ede9fe;
  --ro-registro-dark-soft: #2e1065;
  --ro-topbar-h: 74px;
}

html[data-ro-theme="dark"] {
  color-scheme: dark;
}

body {
  padding-top: var(--ro-topbar-h);
}

.ro-module-topbar {
  position: fixed;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  width: min(1480px, calc(100% - 32px));
  min-height: 62px;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 14px;
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(237,233,254,.82), rgba(255,255,255,.94) 48%, rgba(255,255,255,.88));
  border: 1.5px solid color-mix(in srgb, var(--ro-registro-color) 32%, #dbe4ee);
  box-shadow: 0 10px 28px rgba(15,23,42,.10);
  backdrop-filter: blur(12px);
}

.ro-module-topbar::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: linear-gradient(135deg, var(--ro-registro-soft), transparent 58%);
  opacity: .40;
}

.ro-module-brand,
.ro-module-actions {
  position: relative;
  z-index: 1;
}

.ro-module-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.ro-module-logo {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: var(--ro-registro-soft);
  color: var(--ro-registro-color);
  font-size: 22px;
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--ro-registro-color) 18%, transparent);
}

.ro-module-titlebox {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.ro-module-title {
  font-size: 18px;
  line-height: 1.1;
  font-weight: 900;
  color: #0f172a;
  letter-spacing: -.01em;
}

.ro-module-subtitle {
  font-size: 12px;
  font-weight: 700;
  color: #64748b;
}

.ro-module-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.ro-module-refresh,
.ro-theme-toggle {
  height: 40px;
  border-radius: 999px;
  padding: 0 13px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid color-mix(in srgb, var(--ro-registro-color) 25%, #cbd5e1);
  background: rgba(255,255,255,.82);
  color: #334155;
  font-weight: 800;
  box-shadow: 0 2px 8px rgba(15,23,42,.06);
}

.ro-module-refresh:hover,
.ro-theme-toggle:hover {
  background: #ffffff;
  border-color: var(--ro-registro-color);
}

html[data-ro-theme="dark"] body {
  background: #0f172a;
  color: #e5e7eb;
}

html[data-ro-theme="dark"] .ro-module-topbar {
  background:
    linear-gradient(135deg, rgba(46,16,101,.58), rgba(15,23,42,.94) 46%, rgba(17,24,39,.96));
  border-color: color-mix(in srgb, var(--ro-registro-color) 58%, #334155);
  box-shadow: 0 14px 36px rgba(0,0,0,.35);
}

html[data-ro-theme="dark"] .ro-module-topbar::before {
  background: linear-gradient(135deg, rgba(124,58,237,.30), transparent 62%);
  opacity: .65;
}

html[data-ro-theme="dark"] .ro-module-logo {
  background: rgba(46,16,101,.95);
  color: #c4b5fd;
  box-shadow: inset 0 0 0 1px rgba(167,139,250,.30);
}

html[data-ro-theme="dark"] .ro-module-title {
  color: #f8fafc;
}

html[data-ro-theme="dark"] .ro-module-subtitle {
  color: #cbd5e1;
}

html[data-ro-theme="dark"] .ro-module-refresh,
html[data-ro-theme="dark"] .ro-theme-toggle {
  background: rgba(15,23,42,.72);
  color: #e5e7eb;
  border-color: rgba(167,139,250,.42);
}

html[data-ro-theme="dark"] .panel,
html[data-ro-theme="dark"] .detail-block,
html[data-ro-theme="dark"] .manual-editor-shell {
  background: linear-gradient(180deg, #182235 0%, #111827 100%) !important;
  border-color: #334155 !important;
  color: #e5e7eb !important;
}

html[data-ro-theme="dark"] input,
html[data-ro-theme="dark"] select,
html[data-ro-theme="dark"] textarea {
  background: #0f172a !important;
  color: #e5e7eb !important;
  border-color: #475569 !important;
}

html[data-ro-theme="dark"] .muted,
html[data-ro-theme="dark"] .panel-meta {
  color: #94a3b8 !important;
}

@media (max-width: 760px) {
  :root {
    --ro-topbar-h: 92px;
  }

  .ro-module-topbar {
    top: 8px;
    width: calc(100% - 16px);
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }

  .ro-module-actions {
    width: 100%;
    justify-content: space-between;
  }
}


/* === Registro Ore · topbar forma Admin 20260428-105352 === */
:root {
  --ro-topbar-h: 66px;
}

.ro-module-topbar {
  top: 10px !important;
  width: min(1480px, calc(100% - 40px)) !important;
  min-height: 54px !important;
  padding: 8px 12px !important;
  border-radius: 16px !important;
  box-shadow: 0 8px 22px rgba(15,23,42,.10) !important;
}

.ro-module-logo {
  width: 38px !important;
  height: 38px !important;
  border-radius: 13px !important;
  text-decoration: none !important;
  display: grid !important;
  place-items: center !important;
  font-size: 21px !important;
  flex: 0 0 38px !important;
}

.ro-module-logo:hover {
  transform: translateY(-1px);
  filter: brightness(1.02);
}

.ro-module-title {
  font-size: 17px !important;
}

.ro-module-subtitle {
  font-size: 12px !important;
}

.ro-module-refresh,
.ro-theme-toggle {
  height: 36px !important;
  padding: 0 12px !important;
}

@media (max-width: 760px) {
  :root {
    --ro-topbar-h: 86px;
  }

  .ro-module-topbar {
    top: 8px !important;
    width: calc(100% - 16px) !important;
    min-height: 0 !important;
    padding: 10px !important;
  }
}


/* === Registro Ore · topbar allineata Admin reale 20260428-111301 === */
:root {
  --ro-registro-color: #7c3aed;
  --ro-registro-soft: #ede9fe;
  --ro-registro-dark-soft: #2e1065;
  --ro-topbar-h: 72px;
}

body {
  padding-top: var(--ro-topbar-h) !important;
}

.ro-module-topbar.ro-admin-like-header {
  position: fixed !important;
  top: 10px !important;
  left: 50% !important;
  transform: translateX(-50%) !important;
  z-index: 10000 !important;

  width: min(1480px, calc(100% - 32px)) !important;
  min-height: 56px !important;
  padding: 9px 14px !important;

  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 14px !important;

  border-radius: 18px !important;
  border: 1.5px solid color-mix(in srgb, var(--ro-registro-color) 42%, #d8dce6) !important;
  background:
    linear-gradient(135deg, rgba(237,233,254,.92), rgba(255,255,255,.96) 50%, rgba(255,255,255,.90)) !important;
  box-shadow: 0 10px 26px rgba(15,23,42,.12) !important;
  backdrop-filter: blur(12px) !important;
}

.ro-module-topbar.ro-admin-like-header::before {
  content: "" !important;
  position: absolute !important;
  inset: 0 !important;
  border-radius: inherit !important;
  pointer-events: none !important;
  background: linear-gradient(135deg, rgba(124,58,237,.18), transparent 58%) !important;
}

.ro-module-brand.ro-admin-like-brand {
  position: relative !important;
  z-index: 1 !important;
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
  min-width: 0 !important;
  text-decoration: none !important;
  color: inherit !important;
}

.ro-module-logo.ro-admin-like-logo {
  width: 38px !important;
  height: 38px !important;
  flex: 0 0 38px !important;
  border-radius: 13px !important;
  display: grid !important;
  place-items: center !important;
  font-size: 21px !important;
  background: linear-gradient(135deg, var(--ro-registro-color), #5b21b6) !important;
  color: #fff !important;
  box-shadow: 0 4px 14px rgba(124,58,237,.32) !important;
  text-decoration: none !important;
}

.ro-module-titlebox.ro-admin-like-titlebox {
  display: grid !important;
  gap: 2px !important;
  min-width: 0 !important;
}

.ro-module-title.ro-admin-like-title {
  font-size: 17px !important;
  line-height: 1.08 !important;
  font-weight: 900 !important;
  color: #0f172a !important;
  letter-spacing: -.01em !important;
}

.ro-module-subtitle.ro-admin-like-sub {
  font-size: 12px !important;
  line-height: 1.15 !important;
  font-weight: 700 !important;
  color: #64748b !important;
}

.ro-module-actions.ro-admin-like-actions {
  position: relative !important;
  z-index: 1 !important;
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
}

.ro-module-refresh,
.ro-theme-toggle {
  height: 36px !important;
  border-radius: 12px !important;
  padding: 0 12px !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;
  border: 1px solid color-mix(in srgb, var(--ro-registro-color) 30%, #cbd5e1) !important;
  background: rgba(255,255,255,.80) !important;
  color: #334155 !important;
  font-weight: 800 !important;
  box-shadow: none !important;
}

.ro-module-refresh:hover,
.ro-theme-toggle:hover,
.ro-module-brand.ro-admin-like-brand:hover .ro-module-logo {
  border-color: var(--ro-registro-color) !important;
  filter: brightness(1.03) !important;
}

html[data-ro-theme="dark"] .ro-module-topbar.ro-admin-like-header {
  background:
    linear-gradient(135deg, rgba(46,16,101,.74), rgba(15,23,42,.96) 46%, rgba(17,24,39,.96)) !important;
  border-color: color-mix(in srgb, var(--ro-registro-color) 62%, #334155) !important;
  box-shadow: 0 14px 34px rgba(0,0,0,.38) !important;
}

html[data-ro-theme="dark"] .ro-module-topbar.ro-admin-like-header::before {
  background: linear-gradient(135deg, rgba(124,58,237,.30), transparent 62%) !important;
}

html[data-ro-theme="dark"] .ro-module-title.ro-admin-like-title {
  color: #f8fafc !important;
}

html[data-ro-theme="dark"] .ro-module-subtitle.ro-admin-like-sub {
  color: #cbd5e1 !important;
}

html[data-ro-theme="dark"] .ro-module-refresh,
html[data-ro-theme="dark"] .ro-theme-toggle {
  background: rgba(15,23,42,.72) !important;
  color: #e5e7eb !important;
  border-color: rgba(167,139,250,.42) !important;
}

@media (max-width: 760px) {
  :root {
    --ro-topbar-h: 92px;
  }

  .ro-module-topbar.ro-admin-like-header {
    top: 8px !important;
    width: calc(100% - 16px) !important;
    min-height: 0 !important;
    padding: 10px !important;
    align-items: flex-start !important;
    flex-direction: column !important;
  }

  .ro-module-actions.ro-admin-like-actions {
    width: 100% !important;
    justify-content: space-between !important;
  }
}


/* === Registro Ore · header Admin reale finale 20260428-111702 === */
:root {
  --ro-registro-color:#7c3aed;
  --ro-registro-color-dark:#5b21b6;
  --ro-registro-soft:#ede9fe;
  --ro-header-bg:#1e293b;
  --ro-header-text:#f1f5f9;
  --ro-topbar-h:64px;
}

body {
  padding-top: var(--ro-topbar-h) !important;
}

.admin-global-header.ro-registro-admin-header {
  position:fixed !important;
  top:0 !important;
  left:0 !important;
  right:0 !important;
  height:64px !important;
  z-index:10000 !important;
  display:flex !important;
  align-items:center !important;
  justify-content:space-between !important;
  gap:16px !important;
  padding:0 22px !important;
  color:var(--ro-header-text) !important;
  box-shadow:0 4px 16px rgba(0,0,0,.28) !important;

  background:
    radial-gradient(circle at 42px 30px, rgba(124,58,237,.34), transparent 34px),
    linear-gradient(135deg, #1e293b 0%, #111827 54%, #0f172a 100%) !important;

  border-radius:0 !important;
  transform:none !important;
  width:auto !important;
  min-height:64px !important;
  max-width:none !important;
  backdrop-filter:none !important;
}

.admin-global-header.ro-registro-admin-header::before {
  display:none !important;
  content:none !important;
}

.ro-registro-admin-brand,
.admin-header-brand.ro-registro-admin-brand {
  display:flex !important;
  align-items:center !important;
  gap:12px !important;
  min-width:0 !important;
  text-decoration:none !important;
  color:var(--ro-header-text) !important;
}

.admin-logo-mark.ro-registro-logo-mark {
  width:38px !important;
  height:38px !important;
  border-radius:10px !important;
  background:linear-gradient(135deg,var(--ro-registro-color),var(--ro-registro-color-dark)) !important;
  display:flex !important;
  align-items:center !important;
  justify-content:center !important;
  flex:0 0 auto !important;
  box-shadow:0 2px 8px rgba(124,58,237,.45) !important;
}

.admin-logo-mark.ro-registro-logo-mark svg {
  width:22px !important;
  height:22px !important;
}

.ro-registro-admin-titlewrap {
  display:block !important;
  min-width:0 !important;
}

.admin-global-header.ro-registro-admin-header .admin-header-title {
  display:block !important;
  font-size:1.05rem !important;
  font-weight:800 !important;
  letter-spacing:-.02em !important;
  line-height:1.1 !important;
  color:var(--ro-header-text) !important;
}

.admin-global-header.ro-registro-admin-header .admin-header-sub {
  display:block !important;
  margin-top:2px !important;
  font-size:.7rem !important;
  font-weight:700 !important;
  color:rgba(241,245,249,.62) !important;
  letter-spacing:.05em !important;
  text-transform:uppercase !important;
}

.ro-registro-admin-actions {
  display:flex !important;
  align-items:center !important;
  gap:10px !important;
  flex:0 0 auto !important;
}

.admin-header-action.ro-admin-refresh {
  height:38px !important;
  border-radius:10px !important;
  border:1px solid rgba(255,255,255,.12) !important;
  background:rgba(255,255,255,.08) !important;
  color:var(--ro-header-text) !important;
  display:flex !important;
  align-items:center !important;
  justify-content:center !important;
  padding:0 14px !important;
  font-weight:800 !important;
  cursor:pointer !important;
}

.admin-theme-btn#ro-theme-toggle {
  width:38px !important;
  height:38px !important;
  border-radius:10px !important;
  border:1px solid rgba(255,255,255,.12) !important;
  background:rgba(255,255,255,.08) !important;
  color:var(--ro-header-text) !important;
  display:flex !important;
  align-items:center !important;
  justify-content:center !important;
  padding:0 !important;
  font-weight:800 !important;
  cursor:pointer !important;
}

.admin-header-action.ro-admin-refresh:hover,
.admin-theme-btn#ro-theme-toggle:hover,
.ro-registro-admin-brand:hover .admin-logo-mark.ro-registro-logo-mark {
  background:rgba(255,255,255,.15) !important;
}

html[data-ro-theme="light"] .admin-global-header.ro-registro-admin-header {
  background:
    radial-gradient(circle at 42px 30px, rgba(124,58,237,.24), transparent 34px),
    linear-gradient(135deg, #ffffff 0%, #f8fafc 54%, #ede9fe 100%) !important;
  color:#0f172a !important;
  box-shadow:0 4px 16px rgba(15,23,42,.12) !important;
  border-bottom:1px solid rgba(124,58,237,.20) !important;
}

html[data-ro-theme="light"] .admin-global-header.ro-registro-admin-header .admin-header-title {
  color:#0f172a !important;
}

html[data-ro-theme="light"] .admin-global-header.ro-registro-admin-header .admin-header-sub {
  color:#64748b !important;
}

html[data-ro-theme="light"] .admin-header-action.ro-admin-refresh,
html[data-ro-theme="light"] .admin-theme-btn#ro-theme-toggle {
  color:#1e293b !important;
  background:rgba(124,58,237,.08) !important;
  border-color:rgba(124,58,237,.18) !important;
}

html[data-ro-theme="dark"] .admin-global-header.ro-registro-admin-header {
  background:
    radial-gradient(circle at 42px 30px, rgba(124,58,237,.34), transparent 34px),
    linear-gradient(135deg, #020617 0%, #111827 54%, #1e1b4b 100%) !important;
  color:#f1f5f9 !important;
}

@media(max-width:760px) {
  :root {
    --ro-topbar-h:64px;
  }

  .admin-global-header.ro-registro-admin-header {
    height:64px !important;
    padding:0 12px !important;
    gap:10px !important;
  }

  .admin-global-header.ro-registro-admin-header .admin-header-sub {
    display:none !important;
  }

  .admin-header-action.ro-admin-refresh {
    display:none !important;
  }
}


/* === Registro Ore · rifinitura visuale header come Admin 20260428-112331 === */
:root {
  --ro-registro-color:#7c3aed;
  --ro-registro-color-2:#5b21b6;
  --ro-registro-soft:#f3efff;
  --ro-registro-soft-2:#ede9fe;
  --ro-registro-border:#8b5cf6;
  --ro-header-text-dark:#1e293b;
  --ro-header-muted:#64748b;
}

/* Barra: stessa lettura di Admin, ma in viola Registro Ore */
html[data-ro-theme="light"] .admin-global-header.ro-registro-admin-header {
  height:64px !important;
  min-height:64px !important;
  padding:0 22px !important;
  border-radius:0 !important;
  border:0 !important;
  border-bottom:2px solid var(--ro-registro-border) !important;

  background:
    linear-gradient(90deg,
      rgba(255,255,255,.98) 0%,
      rgba(248,250,252,.96) 42%,
      rgba(243,239,255,.92) 100%
    ) !important;

  color:var(--ro-header-text-dark) !important;
  box-shadow:0 4px 14px rgba(15,23,42,.08) !important;
}

/* Dark: stessa struttura, colore Registro Ore più controllato */
html[data-ro-theme="dark"] .admin-global-header.ro-registro-admin-header {
  height:64px !important;
  min-height:64px !important;
  padding:0 22px !important;
  border-radius:0 !important;
  border:0 !important;
  border-bottom:2px solid #a78bfa !important;

  background:
    linear-gradient(90deg,
      #020617 0%,
      #0f172a 48%,
      rgba(46,16,101,.92) 100%
    ) !important;

  box-shadow:0 4px 16px rgba(0,0,0,.32) !important;
}

/* Titoli identici come peso/lettura ad Admin */
.admin-global-header.ro-registro-admin-header .admin-header-title {
  font-size:1.05rem !important;
  font-weight:800 !important;
  letter-spacing:-.02em !important;
  line-height:1.1 !important;
}

html[data-ro-theme="light"] .admin-global-header.ro-registro-admin-header .admin-header-title {
  color:#1e293b !important;
}

html[data-ro-theme="light"] .admin-global-header.ro-registro-admin-header .admin-header-sub {
  color:#64748b !important;
}

html[data-ro-theme="dark"] .admin-global-header.ro-registro-admin-header .admin-header-title {
  color:#f8fafc !important;
}

html[data-ro-theme="dark"] .admin-global-header.ro-registro-admin-header .admin-header-sub {
  color:#cbd5e1 !important;
}

/* Logo: NON pieno a riposo. Sfumato/chiaro come Admin, ma più visibile */
.admin-logo-mark.ro-registro-logo-mark {
  width:38px !important;
  height:38px !important;
  border-radius:10px !important;

  background:
    linear-gradient(135deg,
      rgba(139,92,246,.20),
      rgba(124,58,237,.09)
    ) !important;

  border:1px solid rgba(124,58,237,.26) !important;
  color:var(--ro-registro-color) !important;
  box-shadow:
    0 2px 8px rgba(124,58,237,.14),
    inset 0 0 0 1px rgba(255,255,255,.42) !important;

  transition:
    background .18s ease,
    border-color .18s ease,
    box-shadow .18s ease,
    transform .18s ease,
    color .18s ease !important;
}

/* Rende l’icona nel logo più leggibile a riposo */
.admin-logo-mark.ro-registro-logo-mark svg,
.admin-logo-mark.ro-registro-logo-mark * {
  color:inherit !important;
  stroke:currentColor !important;
}

/* Hover: si riempie nel colore Registro Ore */
.ro-registro-admin-brand:hover .admin-logo-mark.ro-registro-logo-mark,
.admin-logo-mark.ro-registro-logo-mark:hover {
  background:linear-gradient(135deg,var(--ro-registro-color),var(--ro-registro-color-2)) !important;
  border-color:rgba(124,58,237,.80) !important;
  color:#ffffff !important;
  box-shadow:
    0 4px 14px rgba(124,58,237,.36),
    inset 0 0 0 1px rgba(255,255,255,.16) !important;
  transform:translateY(-1px) !important;
}

/* In dark: logo a riposo visibile ma non pieno */
html[data-ro-theme="dark"] .admin-logo-mark.ro-registro-logo-mark {
  background:
    linear-gradient(135deg,
      rgba(167,139,250,.24),
      rgba(91,33,182,.18)
    ) !important;

  border-color:rgba(167,139,250,.38) !important;
  color:#ddd6fe !important;
  box-shadow:
    0 2px 8px rgba(124,58,237,.20),
    inset 0 0 0 1px rgba(255,255,255,.08) !important;
}

html[data-ro-theme="dark"] .ro-registro-admin-brand:hover .admin-logo-mark.ro-registro-logo-mark,
html[data-ro-theme="dark"] .admin-logo-mark.ro-registro-logo-mark:hover {
  background:linear-gradient(135deg,#8b5cf6,#6d28d9) !important;
  color:#ffffff !important;
  border-color:rgba(196,181,253,.72) !important;
}

/* Pulsante tema: come Admin, tenue e non troppo viola */
html[data-ro-theme="light"] .admin-theme-btn#ro-theme-toggle {
  width:38px !important;
  height:38px !important;
  border-radius:10px !important;
  background:rgba(139,92,246,.08) !important;
  border:1px solid rgba(139,92,246,.20) !important;
  color:#7c3aed !important;
  box-shadow:none !important;
}

html[data-ro-theme="light"] .admin-theme-btn#ro-theme-toggle:hover {
  background:rgba(124,58,237,.16) !important;
  border-color:rgba(124,58,237,.36) !important;
}

html[data-ro-theme="dark"] .admin-theme-btn#ro-theme-toggle {
  width:38px !important;
  height:38px !important;
  border-radius:10px !important;
  background:rgba(255,255,255,.08) !important;
  border:1px solid rgba(255,255,255,.12) !important;
  color:#f1f5f9 !important;
  box-shadow:none !important;
}

html[data-ro-theme="dark"] .admin-theme-btn#ro-theme-toggle:hover {
  background:rgba(255,255,255,.15) !important;
}

/* Pulsante Aggiorna allineato al tema Admin */
html[data-ro-theme="light"] .admin-header-action.ro-admin-refresh {
  height:38px !important;
  border-radius:10px !important;
  background:rgba(139,92,246,.08) !important;
  border:1px solid rgba(139,92,246,.20) !important;
  color:#4c1d95 !important;
  box-shadow:none !important;
}

html[data-ro-theme="light"] .admin-header-action.ro-admin-refresh:hover {
  background:rgba(124,58,237,.16) !important;
  border-color:rgba(124,58,237,.36) !important;
}

html[data-ro-theme="dark"] .admin-header-action.ro-admin-refresh {
  height:38px !important;
  border-radius:10px !important;
  background:rgba(255,255,255,.08) !important;
  border:1px solid rgba(255,255,255,.12) !important;
  color:#f1f5f9 !important;
}

html[data-ro-theme="dark"] .admin-header-action.ro-admin-refresh:hover {
  background:rgba(255,255,255,.15) !important;
}

/* Evita che vecchi stili ro-module influenzino ancora la barra */
.admin-global-header.ro-registro-admin-header::before {
  display:none !important;
  content:none !important;
}

.ro-registro-admin-brand {
  text-decoration:none !important;
}

@media(max-width:760px) {
  html[data-ro-theme="light"] .admin-global-header.ro-registro-admin-header,
  html[data-ro-theme="dark"] .admin-global-header.ro-registro-admin-header {
    height:64px !important;
    min-height:64px !important;
    padding:0 12px !important;
  }
}


/* === Registro Ore · dark mode reale step1 20260428-115136 === */
html[data-ro-theme="dark"] {
  color-scheme: dark;

  --ro-dark-bg:#0f172a;
  --ro-dark-bg-2:#111827;
  --ro-dark-panel:#1e293b;
  --ro-dark-panel-2:#273549;
  --ro-dark-panel-3:#334155;
  --ro-dark-line:#334155;
  --ro-dark-line-2:#475569;
  --ro-dark-text:#f8fafc;
  --ro-dark-muted:#cbd5e1;
  --ro-dark-muted-2:#94a3b8;

  --ro-violet:#a78bfa;
  --ro-violet-strong:#8b5cf6;
  --ro-violet-soft:rgba(167,139,250,.14);
  --ro-violet-border:rgba(167,139,250,.38);

  --ro-ok:#4ade80;
  --ro-ok-bg:rgba(34,197,94,.14);
  --ro-warn:#facc15;
  --ro-warn-bg:rgba(250,204,21,.14);
  --ro-danger:#f87171;
  --ro-danger-bg:rgba(248,113,113,.14);
}

html[data-ro-theme="dark"] body {
  background:
    radial-gradient(circle at top left, rgba(124,58,237,.16), transparent 34rem),
    linear-gradient(180deg, #0f172a 0%, #111827 100%) !important;
  color:var(--ro-dark-text) !important;
}

/* Contenitori principali */
html[data-ro-theme="dark"] main,
html[data-ro-theme="dark"] .wrap,
html[data-ro-theme="dark"] .container,
html[data-ro-theme="dark"] .ro-f1-shell {
  color:var(--ro-dark-text) !important;
}

html[data-ro-theme="dark"] .panel,
html[data-ro-theme="dark"] .report-panel,
html[data-ro-theme="dark"] .manual-panel,
html[data-ro-theme="dark"] .ro-f1-shell,
html[data-ro-theme="dark"] .ro-f1-group,
html[data-ro-theme="dark"] .ro-op-day,
html[data-ro-theme="dark"] .ro-op-cantiere,
html[data-ro-theme="dark"] .ro-op-commessa,
html[data-ro-theme="dark"] .manual-dip-row,
html[data-ro-theme="dark"] .manual-batch-row,
html[data-ro-theme="dark"] .manual-recent-row,
html[data-ro-theme="dark"] .report-card {
  background:rgba(30,41,59,.94) !important;
  border-color:var(--ro-dark-line) !important;
  color:var(--ro-dark-text) !important;
  box-shadow:0 10px 28px rgba(0,0,0,.28) !important;
}

/* Titoli e testi */
html[data-ro-theme="dark"] h1,
html[data-ro-theme="dark"] h2,
html[data-ro-theme="dark"] h3,
html[data-ro-theme="dark"] h4,
html[data-ro-theme="dark"] .panel-title,
html[data-ro-theme="dark"] .ro-f1-title,
html[data-ro-theme="dark"] .ro-op-day-title,
html[data-ro-theme="dark"] .ro-op-cantiere-title,
html[data-ro-theme="dark"] .ro-op-person,
html[data-ro-theme="dark"] .manual-batch-title,
html[data-ro-theme="dark"] .manual-recent-title {
  color:var(--ro-dark-text) !important;
}

html[data-ro-theme="dark"] p,
html[data-ro-theme="dark"] small,
html[data-ro-theme="dark"] .muted,
html[data-ro-theme="dark"] .panel-meta,
html[data-ro-theme="dark"] .ro-f1-subtitle,
html[data-ro-theme="dark"] .ro-op-day-sub,
html[data-ro-theme="dark"] .ro-op-cantiere-sub,
html[data-ro-theme="dark"] .ro-op-commessa-name,
html[data-ro-theme="dark"] .ro-op-row-note,
html[data-ro-theme="dark"] .manual-batch-sub,
html[data-ro-theme="dark"] .manual-recent-sub,
html[data-ro-theme="dark"] .hint,
html[data-ro-theme="dark"] .help {
  color:var(--ro-dark-muted-2) !important;
}

/* Tabelle */
html[data-ro-theme="dark"] table,
html[data-ro-theme="dark"] .table {
  color:var(--ro-dark-text) !important;
  border-color:var(--ro-dark-line) !important;
}

html[data-ro-theme="dark"] th,
html[data-ro-theme="dark"] thead td {
  background:rgba(15,23,42,.86) !important;
  color:var(--ro-dark-muted) !important;
  border-color:var(--ro-dark-line) !important;
}

html[data-ro-theme="dark"] td {
  border-color:var(--ro-dark-line) !important;
  color:var(--ro-dark-text) !important;
}

html[data-ro-theme="dark"] tr:hover td {
  background:rgba(167,139,250,.08) !important;
}

/* Form */
html[data-ro-theme="dark"] input,
html[data-ro-theme="dark"] select,
html[data-ro-theme="dark"] textarea {
  background:#0f172a !important;
  color:var(--ro-dark-text) !important;
  border-color:var(--ro-dark-line-2) !important;
  box-shadow:none !important;
}

html[data-ro-theme="dark"] input::placeholder,
html[data-ro-theme="dark"] textarea::placeholder {
  color:#64748b !important;
}

html[data-ro-theme="dark"] input:focus,
html[data-ro-theme="dark"] select:focus,
html[data-ro-theme="dark"] textarea:focus {
  border-color:var(--ro-violet) !important;
  box-shadow:0 0 0 3px rgba(167,139,250,.18) !important;
  outline:none !important;
}

html[data-ro-theme="dark"] label,
html[data-ro-theme="dark"] .field label,
html[data-ro-theme="dark"] .ro-cx-field span,
html[data-ro-theme="dark"] .ro-ed-field span {
  color:var(--ro-dark-muted) !important;
}

/* Pulsanti */
html[data-ro-theme="dark"] button,
html[data-ro-theme="dark"] .btn,
html[data-ro-theme="dark"] .ro-f1-btn,
html[data-ro-theme="dark"] .ro-f1-nav-btn {
  border-color:var(--ro-dark-line-2) !important;
}

html[data-ro-theme="dark"] .ro-f1-nav-btn {
  background:rgba(255,255,255,.06) !important;
  color:var(--ro-dark-muted) !important;
}

html[data-ro-theme="dark"] .ro-f1-nav-btn.active {
  background:linear-gradient(135deg,#8b5cf6,#6d28d9) !important;
  color:#ffffff !important;
  border-color:rgba(196,181,253,.55) !important;
  box-shadow:0 8px 18px rgba(109,40,217,.28) !important;
}

html[data-ro-theme="dark"] .ro-f1-btn,
html[data-ro-theme="dark"] .btn-soft {
  background:rgba(255,255,255,.06) !important;
  color:var(--ro-dark-text) !important;
}

html[data-ro-theme="dark"] .ro-f1-btn:hover,
html[data-ro-theme="dark"] .btn-soft:hover {
  background:rgba(167,139,250,.14) !important;
  border-color:var(--ro-violet-border) !important;
}

html[data-ro-theme="dark"] .ro-f1-btn.primary,
html[data-ro-theme="dark"] .btn-primary {
  background:linear-gradient(135deg,#8b5cf6,#6d28d9) !important;
  color:#ffffff !important;
  border-color:rgba(196,181,253,.42) !important;
}

/* Badge e pill */
html[data-ro-theme="dark"] .badge,
html[data-ro-theme="dark"] .pill,
html[data-ro-theme="dark"] .ro-f1-pill,
html[data-ro-theme="dark"] .ro-f1-badge,
html[data-ro-theme="dark"] .ro-op-company,
html[data-ro-theme="dark"] .ro-op-hours {
  background:rgba(255,255,255,.07) !important;
  border-color:var(--ro-dark-line-2) !important;
  color:var(--ro-dark-muted) !important;
}

html[data-ro-theme="dark"] .ro-f1-badge.warn,
html[data-ro-theme="dark"] .badge.warn,
html[data-ro-theme="dark"] .pill.warn {
  background:var(--ro-warn-bg) !important;
  color:#fde68a !important;
  border-color:rgba(250,204,21,.32) !important;
}

html[data-ro-theme="dark"] .ro-f1-badge.ok,
html[data-ro-theme="dark"] .badge.ok,
html[data-ro-theme="dark"] .pill.ok {
  background:var(--ro-ok-bg) !important;
  color:#86efac !important;
  border-color:rgba(74,222,128,.30) !important;
}

/* Riga review: mantenere arancione leggibile anche in dark */
html[data-ro-theme="dark"] .ro-op-row--review,
html[data-ro-theme="dark"] .review,
html[data-ro-theme="dark"] .needs-review {
  background:linear-gradient(90deg, rgba(251,146,60,.18), rgba(251,191,36,.08)) !important;
  border-color:rgba(251,146,60,.38) !important;
}

/* Lista operativa */
html[data-ro-theme="dark"] .ro-op-day-head,
html[data-ro-theme="dark"] .ro-op-cantiere-head,
html[data-ro-theme="dark"] .ro-op-commessa-head {
  background:rgba(15,23,42,.42) !important;
  color:var(--ro-dark-text) !important;
  border-color:var(--ro-dark-line) !important;
}

html[data-ro-theme="dark"] .ro-op-row {
  background:rgba(15,23,42,.52) !important;
  border-color:var(--ro-dark-line) !important;
  color:var(--ro-dark-text) !important;
}

html[data-ro-theme="dark"] .ro-op-row:hover {
  background:rgba(167,139,250,.10) !important;
  border-color:var(--ro-violet-border) !important;
}

/* Gruppi settimana/mese */
html[data-ro-theme="dark"] .ro-op-super-group,
html[data-ro-theme="dark"] .ro-op-sub-group {
  background:rgba(30,41,59,.90) !important;
  border-color:var(--ro-dark-line) !important;
  color:var(--ro-dark-text) !important;
}

html[data-ro-theme="dark"] .ro-op-group-head {
  background:rgba(15,23,42,.55) !important;
  color:var(--ro-dark-text) !important;
}

/* Drawer editor */
html[data-ro-theme="dark"] .ro-f1-drawer-backdrop {
  background:rgba(2,6,23,.66) !important;
}

html[data-ro-theme="dark"] .ro-f1-drawer,
html[data-ro-theme="dark"] .ro-cx-card,
html[data-ro-theme="dark"] .ro-cx-row,
html[data-ro-theme="dark"] .ro-ed-row {
  background:var(--ro-dark-panel) !important;
  border-color:var(--ro-dark-line) !important;
  color:var(--ro-dark-text) !important;
  box-shadow:0 18px 44px rgba(0,0,0,.40) !important;
}

html[data-ro-theme="dark"] .ro-cx-summary,
html[data-ro-theme="dark"] .ro-cx-row[open] > .ro-cx-summary,
html[data-ro-theme="dark"] .ro-ed-row-head {
  background:rgba(15,23,42,.58) !important;
  color:var(--ro-dark-text) !important;
  border-color:var(--ro-dark-line) !important;
}

html[data-ro-theme="dark"] .ro-cx-topbox,
html[data-ro-theme="dark"] .ro-cx-stat,
html[data-ro-theme="dark"] .ro-cx-note details {
  background:rgba(15,23,42,.48) !important;
  border-color:var(--ro-dark-line) !important;
  color:var(--ro-dark-text) !important;
}

html[data-ro-theme="dark"] .ro-cx-topbox span,
html[data-ro-theme="dark"] .ro-cx-stat span {
  color:var(--ro-dark-muted-2) !important;
}

html[data-ro-theme="dark"] .ro-cx-topbox strong,
html[data-ro-theme="dark"] .ro-cx-stat strong {
  color:var(--ro-dark-text) !important;
}

/* Manuale multi-dipendente */
html[data-ro-theme="dark"] .manual-dip-rows,
html[data-ro-theme="dark"] .manual-save-results,
html[data-ro-theme="dark"] .manual-recent-list {
  color:var(--ro-dark-text) !important;
}

html[data-ro-theme="dark"] .manual-dip-row:hover {
  border-color:var(--ro-violet-border) !important;
  background:rgba(167,139,250,.08) !important;
}

/* Report */
html[data-ro-theme="dark"] #report-summary,
html[data-ro-theme="dark"] .report-summary,
html[data-ro-theme="dark"] .report-table-wrap {
  background:rgba(30,41,59,.94) !important;
  border-color:var(--ro-dark-line) !important;
  color:var(--ro-dark-text) !important;
}

/* Import Presenze */
html[data-ro-theme="dark"] #import-presenze-preview-panel,
html[data-ro-theme="dark"] .import-presenze-panel,
html[data-ro-theme="dark"] .import-preview-row,
html[data-ro-theme="dark"] .inbox-row {
  background:rgba(30,41,59,.94) !important;
  border-color:var(--ro-dark-line) !important;
  color:var(--ro-dark-text) !important;
}

/* Messaggi stato */
html[data-ro-theme="dark"] .status-line,
html[data-ro-theme="dark"] .notice,
html[data-ro-theme="dark"] .alert {
  background:rgba(15,23,42,.54) !important;
  border-color:var(--ro-dark-line) !important;
  color:var(--ro-dark-muted) !important;
}

html[data-ro-theme="dark"] .alert.error,
html[data-ro-theme="dark"] .status-line.error {
  background:var(--ro-danger-bg) !important;
  color:#fecaca !important;
  border-color:rgba(248,113,113,.32) !important;
}

html[data-ro-theme="dark"] .alert.ok,
html[data-ro-theme="dark"] .status-line.ok {
  background:var(--ro-ok-bg) !important;
  color:#bbf7d0 !important;
  border-color:rgba(74,222,128,.30) !important;
}

/* Link */
html[data-ro-theme="dark"] a {
  color:#c4b5fd;
}

html[data-ro-theme="dark"] a:hover {
  color:#ddd6fe;
}


/* RO_REPORT_CONTROLLO_ORE_CSS_V1 START */
.ro-report-v1-root{
  margin:0 0 18px;
}

.ro-report-v1-head{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:14px;
  margin-bottom:14px;
  padding:16px;
  border:1px solid #dbe7ff;
  background:linear-gradient(135deg,#f8fbff,#eef6ff);
  border-radius:18px;
}

.ro-report-v1-head h3,
.ro-report-v1-section-head h3{
  margin:0;
  color:#102132;
}

.ro-report-v1-head p{
  margin:5px 0 0;
  color:#5b6b7b;
}

.ro-report-v1-pill{
  display:inline-flex;
  align-items:center;
  border:1px solid #ddd6fe;
  background:#f5f3ff;
  color:#6d28d9;
  border-radius:999px;
  padding:6px 10px;
  font-size:12px;
  font-weight:800;
  white-space:nowrap;
}

.ro-report-v1-filterbox,
.ro-report-v1-maincard,
.ro-report-v1-sidecard,
.ro-report-v1-kpi-card{
  border:1px solid #dbe3ef;
  background:#fff;
  border-radius:18px;
  padding:14px;
  box-shadow:0 8px 22px rgba(15,23,42,.05);
}

.ro-report-v1-periods,
.ro-report-v1-state-row,
.ro-report-v1-actions{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  align-items:center;
}

.ro-report-v1-periods{
  margin-bottom:12px;
}

.ro-report-v1-state-row{
  margin-top:12px;
}

.ro-report-v1-actions{
  margin-top:14px;
  justify-content:flex-end;
}

.ro-report-v1-periods button,
.ro-report-v1-state-row button{
  border:1px solid #d5e3f8;
  background:#fff;
  color:#334155;
  border-radius:12px;
  padding:9px 12px;
  font-weight:800;
  cursor:pointer;
}

.ro-report-v1-periods button.active,
.ro-report-v1-state-row button.active,
.ro-report-v1-actions .btn-primary{
  background:#0d6efd;
  border-color:#0d6efd;
  color:#fff;
}

.ro-report-v1-filters{
  display:grid;
  grid-template-columns:repeat(6,minmax(140px,1fr));
  gap:10px;
  align-items:end;
}

.ro-report-v1-filters label{
  display:block;
  margin-bottom:6px;
  font-size:12px;
  font-weight:800;
  color:#475569;
}

.ro-report-v1-filters input,
.ro-report-v1-filters select{
  width:100%;
}

.ro-report-v1-status{
  margin:12px 2px;
}

.ro-report-v1-kpi{
  display:grid;
  grid-template-columns:repeat(4,minmax(150px,1fr));
  gap:12px;
  margin:14px 0;
}

.ro-report-v1-kpi-label{
  font-size:12px;
  font-weight:800;
  color:#475569;
}

.ro-report-v1-kpi-value{
  margin-top:5px;
  font-size:24px;
  line-height:1.1;
  font-weight:900;
  color:#0d6efd;
  font-variant-numeric:tabular-nums;
}

.ro-report-v1-kpi-sub{
  margin-top:5px;
  font-size:12px;
  color:#64748b;
}

.ro-report-v1-layout{
  display:grid;
  grid-template-columns:minmax(0,1fr) 360px;
  gap:14px;
  align-items:start;
}

.ro-report-v1-section-head{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:10px;
  margin-bottom:10px;
}

.ro-report-v1-table-wrap{
  overflow:auto;
}

.ro-report-v1-table{
  width:100%;
  border-collapse:separate;
  border-spacing:0;
}

.ro-report-v1-table th,
.ro-report-v1-table td{
  padding:10px 8px;
  border-bottom:1px solid #e8eef7;
  vertical-align:top;
  text-align:left;
}

.ro-report-v1-table th{
  font-size:12px;
  color:#475569;
  background:#f8fafc;
}

.ro-report-v1-table td small{
  display:block;
  margin-top:4px;
  color:#64748b;
}

.ro-report-v1-table button{
  white-space:nowrap;
  padding:7px 10px;
  border-radius:10px;
  font-weight:800;
  cursor:pointer;
}

.ro-report-v1-badge{
  display:inline-flex;
  align-items:center;
  border-radius:999px;
  padding:5px 8px;
  font-size:11px;
  font-weight:900;
  border:1px solid transparent;
  margin:2px 3px 2px 0;
}

.ro-report-v1-badge.ok{ background:#dcfce7; color:#166534; }
.ro-report-v1-badge.info{ background:#f5f3ff; color:#6d28d9; }
.ro-report-v1-badge.warn{ background:#fef3c7; color:#92400e; }
.ro-report-v1-badge.danger{ background:#fee2e2; color:#991b1b; }
.ro-report-v1-badge.ticket{ background:#fff7ed; color:#c2410c; }

.ro-report-v1-mini-list{
  display:grid;
  gap:8px;
}

.ro-report-v1-mini-row{
  display:flex;
  justify-content:space-between;
  gap:10px;
  padding:10px;
  border:1px solid #e8eef7;
  border-radius:14px;
  background:#f8fafc;
}

.ro-report-v1-mini-row strong,
.ro-report-v1-mini-row small{
  display:block;
}

.ro-report-v1-mini-row small{
  margin-top:4px;
  color:#64748b;
}

.ro-report-v1-side-gap{
  margin-top:18px;
}

html[data-ro-theme="dark"] .ro-report-v1-head,
html[data-ro-theme="dark"] .ro-report-v1-filterbox,
html[data-ro-theme="dark"] .ro-report-v1-maincard,
html[data-ro-theme="dark"] .ro-report-v1-sidecard,
html[data-ro-theme="dark"] .ro-report-v1-kpi-card{
  background:#101827;
  border-color:#263447;
  box-shadow:none;
}

html[data-ro-theme="dark"] .ro-report-v1-head h3,
html[data-ro-theme="dark"] .ro-report-v1-section-head h3,
html[data-ro-theme="dark"] .ro-report-v1-table td,
html[data-ro-theme="dark"] .ro-report-v1-mini-row strong{
  color:#e5edf7;
}

html[data-ro-theme="dark"] .ro-report-v1-head p,
html[data-ro-theme="dark"] .ro-report-v1-kpi-label,
html[data-ro-theme="dark"] .ro-report-v1-kpi-sub,
html[data-ro-theme="dark"] .ro-report-v1-filters label,
html[data-ro-theme="dark"] .ro-report-v1-table td small,
html[data-ro-theme="dark"] .ro-report-v1-mini-row small{
  color:#9fb0c5;
}

html[data-ro-theme="dark"] .ro-report-v1-table th,
html[data-ro-theme="dark"] .ro-report-v1-mini-row{
  background:#0f172a;
  border-color:#263447;
  color:#cbd5e1;
}

@media (max-width:1200px){
  .ro-report-v1-filters{ grid-template-columns:repeat(3,minmax(150px,1fr)); }
  .ro-report-v1-layout{ grid-template-columns:1fr; }
}

@media (max-width:760px){
  .ro-report-v1-filters,
  .ro-report-v1-kpi{ grid-template-columns:1fr; }
  .ro-report-v1-actions{ justify-content:stretch; }
  .ro-report-v1-actions button{ flex:1; }
}
/* RO_REPORT_CONTROLLO_ORE_CSS_V1 END */


/* RO_REPORT_CONTROLLO_ORE_TABS_CSS_V1 START */
.ro-report-v1-tabs{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  margin:14px 0;
  padding:6px;
  border:1px solid #dbe3ef;
  background:#f8fafc;
  border-radius:16px;
}

.ro-report-v1-tabs button{
  border:1px solid transparent;
  background:transparent;
  color:#475569;
  border-radius:12px;
  padding:10px 14px;
  font-weight:900;
  cursor:pointer;
}

.ro-report-v1-tabs button.active{
  background:#0d6efd;
  border-color:#0d6efd;
  color:#fff;
  box-shadow:0 6px 16px rgba(13,110,253,.18);
}

.ro-report-v1-panel[hidden]{
  display:none !important;
}

.ro-report-v1-panel{
  margin-top:10px;
}

.ro-report-v1-summary-grid{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:14px;
  align-items:start;
}

html[data-ro-theme="dark"] .ro-report-v1-tabs{
  background:#0f172a;
  border-color:#263447;
}

html[data-ro-theme="dark"] .ro-report-v1-tabs button{
  color:#cbd5e1;
}

html[data-ro-theme="dark"] .ro-report-v1-tabs button.active{
  color:#fff;
}

@media (max-width:1200px){
  .ro-report-v1-summary-grid{
    grid-template-columns:1fr;
  }
}

@media (max-width:760px){
  .ro-report-v1-tabs button{
    flex:1;
  }
}
/* RO_REPORT_CONTROLLO_ORE_TABS_CSS_V1 END */


/* RO_DUPLICA_RIGA_FRONTEND_CSS_V1 START */
.ro-cx-row-dup{
  border:1px solid #ddd6fe;
  background:#f5f3ff;
  color:#6d28d9;
  border-radius:999px;
  padding:6px 10px;
  font-size:12px;
  font-weight:800;
  cursor:pointer;
}

.ro-cx-row-dup:hover{
  background:#ede9fe;
}

.ro-duplica-backdrop{
  position:fixed;
  inset:0;
  z-index:9999;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:18px;
  background:rgba(15,23,42,.42);
}

.ro-duplica-modal{
  width:min(520px, 100%);
  border-radius:20px;
  background:#fff;
  color:#0f172a;
  box-shadow:0 24px 70px rgba(15,23,42,.28);
  padding:18px;
}

.ro-duplica-head h3{
  margin:0;
  font-size:20px;
}

.ro-duplica-head p{
  margin:6px 0 14px;
  color:#64748b;
}

.ro-duplica-field{
  display:grid;
  gap:6px;
}

.ro-duplica-field span{
  font-size:12px;
  font-weight:800;
  color:#475569;
}

.ro-duplica-field select{
  width:100%;
}

.ro-duplica-actions{
  display:flex;
  justify-content:flex-end;
  gap:10px;
  margin-top:16px;
}

.ro-duplica-actions button{
  border-radius:12px;
  padding:9px 13px;
  font-weight:800;
  cursor:pointer;
}

.ro-duplica-actions button.primary{
  background:#0d6efd;
  border-color:#0d6efd;
  color:#fff;
}

html[data-ro-theme="dark"] .ro-duplica-modal{
  background:#101827;
  color:#e5edf7;
}

html[data-ro-theme="dark"] .ro-duplica-head p,
html[data-ro-theme="dark"] .ro-duplica-field span{
  color:#9fb0c5;
}
/* RO_DUPLICA_RIGA_FRONTEND_CSS_V1 END */


/* RO_GIORNATE_ORDINE_BADGE_DESCRIZIONE_CSS_V1 START */
.ro-op-desc-missing{
  background:#fef3c7 !important;
  color:#92400e !important;
  border:1px solid #fde68a !important;
}
/* RO_GIORNATE_ORDINE_BADGE_DESCRIZIONE_CSS_V1 END */

/* === Registro Ore · topbar non fissa 20260511-065733 ===
   La barra resta parte normale della pagina:
   - non rimane sempre visibile durante lo scroll
   - non si sovrappone all'editor/drawer
   - mantiene grafica e colori già definiti
*/
body {
  padding-top: 0 !important;
}

.admin-global-header.ro-registro-admin-header {
  position: relative !important;
  top: auto !important;
  left: auto !important;
  right: auto !important;
  z-index: 20 !important;
  width: 100% !important;
}

html[data-ro-theme="light"] .admin-global-header.ro-registro-admin-header,
html[data-ro-theme="dark"] .admin-global-header.ro-registro-admin-header {
  position: relative !important;
}

#ro-fase1-drawer-backdrop,
.ro-f1-drawer-backdrop {
  z-index: 12000 !important;
}

#ro-fase1-drawer,
.ro-f1-drawer {
  z-index: 12001 !important;
}

/* === Registro Ore · topbar stile Richiesta Materiali 20260511-073833 ===
   Obiettivo:
   - stessa estetica della topbar Richiesta Materiali
   - palette Registro Ore viola
   - logo caschetto mantenuto
   - barra non fixed per non sovrapporsi a scroll/editor
*/
:root {
  --ro-registro-color:#7c3aed;
  --ro-registro-color-strong:#5b21b6;
  --ro-registro-soft:#f3efff;
  --ro-registro-soft-2:#ede9fe;
}

/* niente offset: la barra Registro Ore resta nel flusso pagina */
body {
  padding-top:0 !important;
}

.admin-global-header.ro-registro-admin-header {
  position:relative !important;
  top:auto !important;
  left:auto !important;
  right:auto !important;

  height:72px !important;
  min-height:72px !important;
  width:100% !important;
  z-index:20 !important;

  display:grid !important;
  grid-template-columns:minmax(0, 1fr) auto !important;
  align-items:center !important;
  justify-content:center !important;
  gap:.9rem !important;

  padding:.7rem max(1rem, calc((100vw - 1180px) / 2 + 1rem)) !important;

  background:
    linear-gradient(135deg, color-mix(in srgb, var(--ro-registro-soft) 72%, transparent), transparent 62%),
    color-mix(in srgb, #ffffff 94%, white) !important;

  border:0 !important;
  border-radius:0 !important;
  border-bottom:1px solid color-mix(in srgb, var(--ro-registro-color) 20%, #cbd5e1) !important;
  box-shadow:0 12px 32px rgba(15,23,42,.08) !important;
  backdrop-filter:blur(14px) !important;
  color:#0f172a !important;
}

/* dark coerente con Richiesta Materiali, ma viola Registro Ore */
html[data-ro-theme="dark"] .admin-global-header.ro-registro-admin-header {
  background:
    radial-gradient(circle at 24px 20px, color-mix(in srgb, var(--ro-registro-color) 16%, transparent), transparent 34px),
    linear-gradient(135deg, color-mix(in srgb, var(--ro-registro-color) 9%, transparent), transparent 62%),
    color-mix(in srgb, #171717 94%, #020617) !important;

  border-bottom-color:color-mix(in srgb, var(--ro-registro-color) 26%, #333) !important;
  box-shadow:0 12px 34px rgba(0,0,0,.34) !important;
  color:#e2e8f0 !important;
}

/* brand: equivalente a logo + titolo RM */
.admin-header-brand.ro-registro-admin-brand {
  min-width:0 !important;
  display:grid !important;
  grid-template-columns:auto minmax(0, 1fr) !important;
  align-items:center !important;
  gap:.9rem !important;
  color:inherit !important;
  text-decoration:none !important;
}

/* logo: stessa dimensione e comportamento RM, con caschetto Registro Ore */
.admin-logo-mark.ro-registro-logo-mark {
  width:46px !important;
  height:46px !important;
  border-radius:16px !important;

  display:inline-flex !important;
  align-items:center !important;
  justify-content:center !important;
  flex:0 0 auto !important;

  color:var(--ro-registro-color) !important;
  background:
    linear-gradient(135deg,
      color-mix(in srgb, var(--ro-registro-soft) 88%, white),
      color-mix(in srgb, #ffffff 92%, white)
    ) !important;

  border:1.5px solid color-mix(in srgb, var(--ro-registro-color) 28%, #cbd5e1) !important;
  box-shadow:0 8px 20px rgba(15,23,42,.08) !important;
  text-decoration:none !important;

  transition:
    transform .18s ease,
    box-shadow .18s ease,
    background .18s ease,
    color .18s ease,
    border-color .18s ease !important;
}

/* manteniamo il caschetto leggibile a riposo */
.admin-logo-mark.ro-registro-logo-mark svg {
  width:28px !important;
  height:28px !important;
  display:block !important;
}

.admin-logo-mark.ro-registro-logo-mark svg *,
.admin-logo-mark.ro-registro-logo-mark * {
  transition:fill .18s ease, stroke .18s ease, opacity .18s ease !important;
}

/* hover logo: pieno viola come RM */
.ro-registro-admin-brand:hover .admin-logo-mark.ro-registro-logo-mark,
.admin-logo-mark.ro-registro-logo-mark:hover {
  transform:translateY(-1px) !important;
  color:#ffffff !important;
  background:
    linear-gradient(135deg,
      var(--ro-registro-color),
      color-mix(in srgb, var(--ro-registro-color) 78%, #0f172a)
    ) !important;
  border-color:color-mix(in srgb, var(--ro-registro-color) 80%, white) !important;
  box-shadow:0 13px 28px color-mix(in srgb, var(--ro-registro-color) 28%, rgba(15,23,42,.18)) !important;
}

/* titolo come RM */
.ro-registro-admin-titlewrap {
  min-width:0 !important;
  display:flex !important;
  flex-direction:column !important;
  line-height:1.15 !important;
}

.admin-global-header.ro-registro-admin-header .admin-header-title {
  font-size:1.02rem !important;
  font-weight:780 !important;
  letter-spacing:-.025em !important;
  line-height:1.15 !important;
  color:#0f172a !important;
  white-space:nowrap !important;
  overflow:hidden !important;
  text-overflow:ellipsis !important;
}

.admin-global-header.ro-registro-admin-header .admin-header-sub {
  margin-top:.18rem !important;
  font-size:.78rem !important;
  font-weight:600 !important;
  letter-spacing:0 !important;
  text-transform:none !important;
  color:#64748b !important;
  white-space:nowrap !important;
  overflow:hidden !important;
  text-overflow:ellipsis !important;
}

html[data-ro-theme="dark"] .admin-global-header.ro-registro-admin-header .admin-header-title {
  color:#e2e8f0 !important;
}

html[data-ro-theme="dark"] .admin-global-header.ro-registro-admin-header .admin-header-sub {
  color:#64748b !important;
}

/* azioni come RM */
.ro-registro-admin-actions {
  display:inline-flex !important;
  align-items:center !important;
  justify-content:flex-end !important;
  gap:.55rem !important;
  min-width:0 !important;
}

.admin-header-action.ro-admin-refresh,
.admin-theme-btn#ro-theme-toggle {
  min-width:42px !important;
  height:38px !important;
  border-radius:14px !important;
  border:1px solid color-mix(in srgb, var(--ro-registro-color) 24%, #cbd5e1) !important;
  background:color-mix(in srgb, var(--ro-registro-soft) 52%, #ffffff) !important;
  color:var(--ro-registro-color-strong) !important;
  box-shadow:0 6px 16px rgba(15,23,42,.06) !important;
  transition:
    transform .18s ease,
    box-shadow .18s ease,
    background .18s ease,
    border-color .18s ease !important;
}

.admin-header-action.ro-admin-refresh {
  padding:0 .8rem !important;
  font-size:.8rem !important;
  font-weight:650 !important;
}

.admin-header-action.ro-admin-refresh:hover,
.admin-theme-btn#ro-theme-toggle:hover {
  transform:translateY(-1px) !important;
  border-color:var(--ro-registro-color) !important;
  box-shadow:0 10px 24px color-mix(in srgb, var(--ro-registro-color) 18%, transparent) !important;
}

html[data-ro-theme="dark"] .admin-header-action.ro-admin-refresh,
html[data-ro-theme="dark"] .admin-theme-btn#ro-theme-toggle {
  background:color-mix(in srgb, var(--ro-registro-color) 18%, #171717) !important;
  border-color:color-mix(in srgb, var(--ro-registro-color) 30%, #333) !important;
  color:#ddd6fe !important;
}

/* drawer sempre sopra, nel caso venga aperto vicino alla topbar */
#ro-fase1-drawer-backdrop,
.ro-f1-drawer-backdrop {
  z-index:12000 !important;
}

#ro-fase1-drawer,
.ro-f1-drawer {
  z-index:12001 !important;
}

/* mobile come RM */
@media (max-width:640px) {
  .admin-global-header.ro-registro-admin-header {
    height:66px !important;
    min-height:66px !important;
    padding:.55rem .75rem !important;
    gap:.65rem !important;
  }

  .admin-header-brand.ro-registro-admin-brand {
    gap:.65rem !important;
  }

  .admin-logo-mark.ro-registro-logo-mark {
    width:42px !important;
    height:42px !important;
    border-radius:15px !important;
  }

  .admin-logo-mark.ro-registro-logo-mark svg {
    width:26px !important;
    height:26px !important;
  }

  .admin-global-header.ro-registro-admin-header .admin-header-title {
    font-size:.94rem !important;
  }

  .admin-global-header.ro-registro-admin-header .admin-header-sub {
    font-size:.7rem !important;
  }

  .admin-header-action.ro-admin-refresh {
    display:none !important;
  }
}

@media print {
  body {
    padding-top:0 !important;
  }

  .admin-global-header.ro-registro-admin-header {
    display:none !important;
  }
}

/* === Registro Ore · struttura topbar come Richiesta Materiali 20260511-074227 ===
   Usa una struttura reale simile a:
   header > inner > logo/titolo/azioni
   Mantiene colore Registro Ore e logo caschetto.
*/
:root {
  --ro-registro-module:#7c3aed;
  --ro-registro-module-strong:#5b21b6;
  --ro-registro-module-soft:#f3efff;
  --ro-registro-surf:#ffffff;
  --ro-registro-brd:#cbd5e1;
  --ro-registro-tx:#0f172a;
  --ro-registro-txm:#475569;
  --ro-registro-txf:#64748b;
}

body {
  padding-top:0 !important;
}

/* Header come Richiesta Materiali, ma NON fixed */
.header.ro-registro-topbar,
.admin-global-header.ro-registro-admin-header.ro-registro-topbar {
  position:relative !important;
  top:auto !important;
  left:auto !important;
  right:auto !important;

  height:72px !important;
  min-height:72px !important;
  z-index:20 !important;

  display:flex !important;
  align-items:center !important;
  justify-content:center !important;

  padding:.7rem 1rem !important;

  background:
    linear-gradient(135deg, color-mix(in srgb, var(--ro-registro-module-soft) 72%, transparent), transparent 62%),
    color-mix(in srgb, var(--ro-registro-surf) 94%, white) !important;

  border:0 !important;
  border-radius:0 !important;
  border-bottom:1px solid color-mix(in srgb, var(--ro-registro-module) 20%, var(--ro-registro-brd)) !important;
  box-shadow:0 12px 32px rgba(15,23,42,.08) !important;
  backdrop-filter:blur(14px) !important;
  color:var(--ro-registro-tx) !important;
}

html[data-ro-theme="dark"] .header.ro-registro-topbar,
html[data-ro-theme="dark"] .admin-global-header.ro-registro-admin-header.ro-registro-topbar {
  --ro-registro-surf:#171717;
  --ro-registro-brd:#333;
  --ro-registro-tx:#e2e8f0;
  --ro-registro-txm:#94a3b8;
  --ro-registro-txf:#64748b;

  background:
    radial-gradient(circle at 24px 20px, color-mix(in srgb, var(--ro-registro-module) 16%, transparent), transparent 34px),
    linear-gradient(135deg, color-mix(in srgb, var(--ro-registro-module) 9%, transparent), transparent 62%),
    color-mix(in srgb, var(--ro-registro-surf) 94%, #020617) !important;

  border-bottom-color:color-mix(in srgb, var(--ro-registro-module) 26%, var(--ro-registro-brd)) !important;
  box-shadow:0 12px 34px rgba(0,0,0,.34) !important;
}

/* Inner identico come logica a rm-topbar-inner */
.ro-registro-topbar-inner {
  width:min(1180px, 100%) !important;
  display:grid !important;
  grid-template-columns:auto minmax(0, 1fr) !important;
  align-items:center !important;
  gap:.9rem !important;
}

/* Brand occupa logo + titolo */
.admin-header-brand.ro-registro-admin-brand {
  display:grid !important;
  grid-template-columns:auto minmax(0, 1fr) !important;
  align-items:center !important;
  gap:.9rem !important;
  min-width:0 !important;
  color:inherit !important;
  text-decoration:none !important;
}

/* Azioni a destra */
.ro-registro-admin-actions {
  display:inline-flex !important;
  align-items:center !important;
  justify-content:flex-end !important;
  gap:.55rem !important;
  min-width:0 !important;
  grid-column:2 !important;
  justify-self:end !important;
}

/* Logo come RM */
.admin-logo-mark.ro-registro-logo-mark {
  width:46px !important;
  height:46px !important;
  border-radius:16px !important;
  display:inline-flex !important;
  align-items:center !important;
  justify-content:center !important;
  flex:0 0 auto !important;

  color:var(--ro-registro-module) !important;
  background:
    linear-gradient(135deg,
      color-mix(in srgb, var(--ro-registro-module-soft) 88%, white),
      color-mix(in srgb, var(--ro-registro-surf) 92%, white)
    ) !important;

  border:1.5px solid color-mix(in srgb, var(--ro-registro-module) 28%, var(--ro-registro-brd)) !important;
  box-shadow:0 8px 20px rgba(15,23,42,.08) !important;
  text-decoration:none !important;

  transition:
    transform .18s ease,
    box-shadow .18s ease,
    background .18s ease,
    color .18s ease,
    border-color .18s ease !important;
}

.admin-logo-mark.ro-registro-logo-mark svg {
  width:28px !important;
  height:28px !important;
  display:block !important;
}

/* Hover logo pieno viola */
.ro-registro-admin-brand:hover .admin-logo-mark.ro-registro-logo-mark,
.admin-logo-mark.ro-registro-logo-mark:hover {
  transform:translateY(-1px) !important;
  color:#fff !important;
  background:
    linear-gradient(135deg,
      var(--ro-registro-module),
      color-mix(in srgb, var(--ro-registro-module) 78%, #0f172a)
    ) !important;
  border-color:color-mix(in srgb, var(--ro-registro-module) 80%, white) !important;
  box-shadow:0 13px 28px color-mix(in srgb, var(--ro-registro-module) 28%, rgba(15,23,42,.18)) !important;
}

/* Testi come RM */
.ro-registro-admin-titlewrap {
  min-width:0 !important;
  display:flex !important;
  flex-direction:column !important;
  line-height:1.15 !important;
}

.admin-global-header.ro-registro-admin-header .admin-header-title {
  font-size:1.02rem !important;
  font-weight:780 !important;
  letter-spacing:-.025em !important;
  line-height:1.15 !important;
  color:var(--ro-registro-tx) !important;
  white-space:nowrap !important;
  overflow:hidden !important;
  text-overflow:ellipsis !important;
}

.admin-global-header.ro-registro-admin-header .admin-header-sub {
  margin-top:.18rem !important;
  font-size:.78rem !important;
  font-weight:600 !important;
  letter-spacing:0 !important;
  text-transform:none !important;
  color:var(--ro-registro-txf) !important;
  white-space:nowrap !important;
  overflow:hidden !important;
  text-overflow:ellipsis !important;
}

/* Pulsanti come RM */
.admin-header-action.ro-admin-refresh,
.admin-theme-btn#ro-theme-toggle {
  min-width:42px !important;
  height:38px !important;
  border-radius:14px !important;
  border:1px solid color-mix(in srgb, var(--ro-registro-module) 24%, var(--ro-registro-brd)) !important;
  background:color-mix(in srgb, var(--ro-registro-module-soft) 52%, var(--ro-registro-surf)) !important;
  color:var(--ro-registro-module-strong) !important;
  box-shadow:0 6px 16px rgba(15,23,42,.06) !important;
  transition:
    transform .18s ease,
    box-shadow .18s ease,
    background .18s ease,
    border-color .18s ease !important;
}

.admin-header-action.ro-admin-refresh {
  padding:0 .8rem !important;
  font-size:.8rem !important;
  font-weight:650 !important;
}

.admin-header-action.ro-admin-refresh:hover,
.admin-theme-btn#ro-theme-toggle:hover {
  transform:translateY(-1px) !important;
  border-color:var(--ro-registro-module) !important;
  box-shadow:0 10px 24px color-mix(in srgb, var(--ro-registro-module) 18%, transparent) !important;
}

/* Drawer sopra la barra */
#ro-fase1-drawer-backdrop,
.ro-f1-drawer-backdrop {
  z-index:12000 !important;
}

#ro-fase1-drawer,
.ro-f1-drawer {
  z-index:12001 !important;
}

/* Mobile come RM */
@media (max-width:640px) {
  .header.ro-registro-topbar,
  .admin-global-header.ro-registro-admin-header.ro-registro-topbar {
    height:66px !important;
    min-height:66px !important;
    padding:.55rem .75rem !important;
  }

  .ro-registro-topbar-inner,
  .admin-header-brand.ro-registro-admin-brand {
    gap:.65rem !important;
  }

  .admin-logo-mark.ro-registro-logo-mark {
    width:42px !important;
    height:42px !important;
    border-radius:15px !important;
  }

  .admin-logo-mark.ro-registro-logo-mark svg {
    width:26px !important;
    height:26px !important;
  }

  .admin-global-header.ro-registro-admin-header .admin-header-title {
    font-size:.94rem !important;
  }

  .admin-global-header.ro-registro-admin-header .admin-header-sub {
    font-size:.7rem !important;
  }

  .admin-header-action.ro-admin-refresh {
    display:none !important;
  }
}

/* === Registro Ore · topbar clean stile Richiesta Materiali 20260511-074654 === */
:root {
  --ro-rm-module:#7c3aed;
  --ro-rm-module-strong:#5b21b6;
  --ro-rm-module-soft:#f3efff;
  --ro-rm-surf:#ffffff;
  --ro-rm-brd:#cbd5e1;
  --ro-rm-tx:#0f172a;
  --ro-rm-txf:#64748b;
}

body {
  padding-top:0 !important;
}

.ro-rm-topbar {
  position:relative;
  top:auto;
  left:auto;
  right:auto;
  height:72px;
  z-index:20;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:.7rem 1rem;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--ro-rm-module-soft) 72%, transparent), transparent 62%),
    color-mix(in srgb, var(--ro-rm-surf) 94%, white);
  border-bottom:1px solid color-mix(in srgb, var(--ro-rm-module) 20%, var(--ro-rm-brd));
  box-shadow:0 12px 32px rgba(15,23,42,.08);
  backdrop-filter:blur(14px);
  color:var(--ro-rm-tx);
}

html[data-ro-theme="dark"] .ro-rm-topbar {
  --ro-rm-surf:#171717;
  --ro-rm-brd:#333;
  --ro-rm-tx:#e2e8f0;
  --ro-rm-txf:#64748b;
  background:
    radial-gradient(circle at 24px 20px, color-mix(in srgb, var(--ro-rm-module) 16%, transparent), transparent 34px),
    linear-gradient(135deg, color-mix(in srgb, var(--ro-rm-module) 9%, transparent), transparent 62%),
    color-mix(in srgb, var(--ro-rm-surf) 94%, #020617);
  border-bottom-color:color-mix(in srgb, var(--ro-rm-module) 26%, var(--ro-rm-brd));
  box-shadow:0 12px 34px rgba(0,0,0,.34);
}

.ro-rm-topbar-inner {
  width:min(1180px, 100%);
  display:grid;
  grid-template-columns:auto minmax(0, 1fr) auto;
  align-items:center;
  gap:.9rem;
}

.ro-rm-topbar-logo {
  width:46px;
  height:46px;
  border-radius:16px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  color:var(--ro-rm-module);
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--ro-rm-module-soft) 88%, white), color-mix(in srgb, var(--ro-rm-surf) 92%, white));
  border:1.5px solid color-mix(in srgb, var(--ro-rm-module) 28%, var(--ro-rm-brd));
  box-shadow:0 8px 20px rgba(15,23,42,.08);
  text-decoration:none;
  transition:transform .18s ease, box-shadow .18s ease, background .18s ease, color .18s ease, border-color .18s ease;
}

.ro-rm-topbar-logo:hover {
  transform:translateY(-1px);
  color:#fff;
  background:
    linear-gradient(135deg, var(--ro-rm-module), color-mix(in srgb, var(--ro-rm-module) 78%, #0f172a));
  border-color:color-mix(in srgb, var(--ro-rm-module) 80%, white);
  box-shadow:0 13px 28px color-mix(in srgb, var(--ro-rm-module) 28%, rgba(15,23,42,.18));
}

.ro-rm-logo-svg {
  width:28px;
  height:28px;
  display:block;
}

.ro-rm-topbar-title {
  min-width:0;
  display:flex;
  flex-direction:column;
  line-height:1.15;
}

.ro-rm-topbar-title b {
  font-size:1.02rem;
  font-weight:780;
  letter-spacing:-.025em;
  color:var(--ro-rm-tx);
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}

.ro-rm-topbar-title small {
  margin-top:.18rem;
  font-size:.78rem;
  color:var(--ro-rm-txf);
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}

.ro-rm-topbar-actions {
  display:inline-flex;
  align-items:center;
  justify-content:flex-end;
  gap:.55rem;
  min-width:0;
}

.ro-rm-topbar-btn {
  min-width:42px;
  height:38px;
  border-radius:14px;
  border:1px solid color-mix(in srgb, var(--ro-rm-module) 24%, var(--ro-rm-brd));
  background:color-mix(in srgb, var(--ro-rm-module-soft) 52%, var(--ro-rm-surf));
  color:var(--ro-rm-module-strong);
  box-shadow:0 6px 16px rgba(15,23,42,.06);
  transition:transform .18s ease, box-shadow .18s ease, background .18s ease, border-color .18s ease;
}

.ro-rm-refresh {
  padding:0 .8rem;
  font-size:.8rem;
  font-weight:650;
}

.ro-rm-theme-toggle {
  padding:0;
  display:inline-flex;
  align-items:center;
  justify-content:center;
}

.ro-rm-topbar-btn:hover {
  transform:translateY(-1px);
  border-color:var(--ro-rm-module);
  box-shadow:0 10px 24px color-mix(in srgb, var(--ro-rm-module) 18%, transparent);
}

#ro-fase1-drawer-backdrop,
.ro-f1-drawer-backdrop {
  z-index:12000 !important;
}

#ro-fase1-drawer,
.ro-f1-drawer {
  z-index:12001 !important;
}

@media (max-width:640px) {
  .ro-rm-topbar {
    height:66px;
    padding:.55rem .75rem;
  }

  .ro-rm-topbar-inner {
    gap:.65rem;
  }

  .ro-rm-topbar-logo {
    width:42px;
    height:42px;
    border-radius:15px;
  }

  .ro-rm-logo-svg {
    width:26px;
    height:26px;
  }

  .ro-rm-topbar-title b {
    font-size:.94rem;
  }

  .ro-rm-topbar-title small {
    font-size:.7rem;
  }

  .ro-rm-refresh {
    display:none;
  }
}

@media print {
  .ro-rm-topbar {
    display:none !important;
  }
}
