/* ============================================================
   Giava Servizi – palette condivisa
   Tavolozza: lavender & sky
   ============================================================ */

/* ---- Titoli ---- */
.g-title { color: #6b21a8; }
.g-subtitle { color: #6b21a8; opacity: 0.7; }
.g-label-blue { color: #1e40af; font-weight: 600; font-size: 0.875rem; }
.g-link-violet { color: #6b21a8; font-weight: 600; }
.g-link-back { font-size: 0.875rem; color: #9ca3af; }
.g-link-back:hover { color: #4b5563; }



/* ---- Bottoni primari ---- */
.g-btn-blue { background: #dbeafe; color: #1e40af; border: none; }
.g-btn-blue:hover { filter: brightness(0.93); }
.g-btn-violet { background: #ede9fe; color: #6b21a8; border: none; }
.g-btn-violet:hover { filter: brightness(0.93); }

/* ---- Bottoni outline ---- */
.g-btn-outline-violet { border: 1px solid #c4b5fd; color: #6b21a8; background: #faf5ff; }
.g-btn-outline-violet:hover { filter: brightness(0.96); }
.g-btn-outline-blue { border: 1px solid #bfdbfe; color: #1e40af; background: #eff6ff; }
.g-btn-outline-blue:hover { filter: brightness(0.96); }

/* ---- Chip concordanza ---- */
.chip { display: inline-block; padding: 1px 6px; border-radius: 3px; font-size: 11px; font-weight: 600; line-height: 1.7; margin-bottom: 2px; }
.ca { background: #d1fae5; }
.cd { background: #ede9fe; }
.cs { background: #f3f4f6; color: #111; }
.cn { color: #bbb; font-style: italic; font-size: 10px; }
.cm { display: none; }

/* ---- Colori per motore ---- */
.m0 { color: #1e40af; }
.m1 { color: #b45309; }
.m2 { color: #6b21a8; }
.m3 { color: #065f46; }

/* ---- Chip motore storico ---- */
.motore-chip-wrap { display: inline-flex; align-items: center; gap: 4px; margin-right: 6px; }
.motore-chip { display: inline-block; padding: 3px 10px; border-radius: 12px; font-size: 11px; font-weight: 600; }
.motore-chip-btn { cursor: pointer; transition: transform 0.1s, box-shadow 0.1s; }
.motore-chip-btn:hover { transform: translateY(-1px); box-shadow: 0 1px 3px rgba(0,0,0,0.15); }
.motore-chip-active { outline: 2px solid #4b5563; outline-offset: 1px; }
.m-blu     { background: #dbeafe; color: #1e40af; }
.m-giallo  { background: #fef9c3; color: #92400e; }
.m-viola   { background: #f3e8ff; color: #6b21a8; }
.m-verde   { background: #d1fae5; color: #065f46; }
.m-arancio { background: #ffedd5; color: #9a3412; }
.m-default { background: #f3f4f6; color: #374151; }
.m-estratto { background: #d1fae5; color: #065f46; padding: 4px 14px; font-size: 12px; }

/* ---- Tabella storico ---- */
.g-table { border-collapse: collapse; width: 100%; font-size: 13px; }
.g-table thead tr { background: #f3f4f6; }
.g-table th { padding: 10px 14px; text-align: left; font-weight: 700; border-bottom: 2px solid #e5e7eb; }
.g-table td { padding: 8px 14px; border-bottom: 1px solid #f0f0f0; vertical-align: middle; }
.g-table td.nowrap { white-space: nowrap; }
.g-table td.date { white-space: nowrap; font-size: 12px; color: #6b7280; }
.g-table td.filename { font-weight: 600; white-space: nowrap; }
.g-version { font-size: 10px; color: #9ca3af; font-weight: 400; }
.g-no-letture { color: #cbd5e1; font-size: 12px; }

/* ---- Azioni tabella ---- */
.g-action-pdf, .g-action-extract { display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px; border-radius: 6px; font-size: 14px; text-decoration: none; margin-right: 3px; background: #f3f4f6; color: #374151; transition: background 0.15s; }
.g-action-pdf:hover, .g-action-extract:hover { background: #e5e7eb; }
.g-action-btn { display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px; border-radius: 6px; font-size: 14px; border: none; cursor: pointer; margin-right: 3px; background: #f3f4f6; color: #374151; transition: background 0.15s; }
.g-action-btn:hover { background: #e5e7eb; }
.g-action-manuale { background: #e0f2fe; color: #0369a1; }
.g-action-manuale:hover { background: #bae6fd; }
.g-action-bolletta { background: #ffedd5; color: #9a3412; }
.g-action-bolletta:hover { background: #fed7aa; }
.g-delete-btn { display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px; border-radius: 6px; font-size: 14px; background: #fef2f2; border: none; cursor: pointer; color: #dc2626; margin-left: 6px; transition: background 0.15s; }
.g-delete-btn:hover { background: #fee2e2; }
.g-edit-btn { display: inline-flex; align-items: center; gap: 4px; padding: 4px 10px; border-radius: 6px; font-size: 12px; background: #dbeafe; border: none; cursor: pointer; color: #1e40af; transition: background 0.15s; }
.g-edit-btn:hover { background: #bfdbfe; }
.g-action-detail { display: inline-flex; align-items: center; gap: 4px; padding: 4px 10px; border-radius: 6px; font-size: 12px; font-weight: 600; text-decoration: none; margin-right: 6px; background: #e0e7ff; color: #3730a3; transition: background 0.15s; }
.g-action-detail:hover { background: #c7d2fe; }

/* ---- Pulsanti uniformi pannello motore ---- */
.g-panel-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  height: 30px;
  min-width: 120px;
  padding: 0 14px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  font-family: inherit;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
  white-space: nowrap;
}
.g-btn-blue { background: #dbeafe; color: #1e40af; border-color: #bfdbfe; }
.g-btn-blue:hover { background: #bfdbfe; }
.g-btn-amber { background: #fef3c7; color: #92400e; border-color: #fde68a; }
.g-btn-amber:hover { background: #fde68a; }
.g-btn-red { background: #fee2e2; color: #991b1b; border-color: #fecaca; }
.g-btn-red:hover { background: #fecaca; }
.motore-panel-actions { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.cmp-cb { vertical-align: middle; cursor: pointer; }

/* ---- Pannello motore espandibile ---- */
.motore-panel-row { background: #f9fafb; }
.motore-panel-row.hidden { display: none; }
.motore-panel-cell { padding: 14px 18px !important; border-bottom: 1px solid #e5e7eb !important; transition: background 0.15s; }
.motore-panel-cell.motore-panel-cell-warning { background: #fee2e2 !important; border-left: 4px solid #dc2626 !important; }
.motore-panel-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; padding-bottom: 8px; border-bottom: 1px solid #e5e7eb; }
.motore-panel-warning { background: #dc2626; color: #fff; padding: 10px 14px; border-radius: 6px; margin-bottom: 12px; font-size: 13px; font-weight: 600; }
.motore-panel-warning ul { font-weight: 400; }
.motore-panel-warning li { list-style: disc; }
.motore-panel-title { font-weight: 600; font-size: 13px; color: #374151; }
.motore-panel-actions { display: flex; gap: 6px; align-items: center; }
.motore-panel-actions .g-delete-btn { padding: 4px 10px; width: auto; height: auto; font-size: 12px; display: inline-flex; align-items: center; gap: 4px; }
.motore-panel-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 4px 18px; font-size: 12px; }
.motore-panel-kv { display: flex; justify-content: space-between; padding: 3px 0; border-bottom: 1px dashed #e5e7eb; }
.motore-panel-k { color: #6b7280; }
.motore-panel-v { font-weight: 500; color: #111827; text-align: right; margin-left: 12px; }
.motore-panel-loading { color: #9ca3af; font-size: 12px; font-style: italic; }
.motore-panel-err { color: #dc2626; font-size: 12px; }

/* ---- Drop zone ---- */
.drop-zone { border: 2px dashed #d1d5db; transition: border-color 0.2s, background 0.2s; }
.drop-zone.dragover { border-color: #6b21a8; background: #faf5ff; }

/* ---- Spinner ---- */
.spinner { border: 3px solid #e5e7eb; border-top-color: #6b21a8; border-radius: 50%; width: 24px; height: 24px; animation: spin 0.8s linear infinite; display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }
