/* ==========================================================
   VSM CRI ALBA — Stili base Apple-like
   Colori: Rosso CRI (#d80000), grigi soft
   ========================================================== */

/* Resetter leggero */
.vsm-container { max-width: 1100px; margin: 24px auto; padding: 0 16px; }
.vsm-active { opacity: 1; transition: opacity .2s; }
.vsm-title  { font-size: clamp(28px, 4vw, 44px); font-weight: 800; margin: 8px 0 12px; }
.vsm-subtitle { color:#6b7280; margin:-6px 0 12px; }

/* Card */
.vsm-card {
  background:#fff; border-radius:16px; box-shadow:0 8px 24px rgba(0,0,0,.06);
  padding:20px; margin:18px 0; border:1px solid #f2f2f2;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.vsm-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(0,0,0,.08);
}
.vsm-card-accent { border:1px solid #f5d0d0; }
.vsm-card-header, .vsm-card-head { display:flex; align-items:center; justify-content:space-between; margin-bottom:10px; }

/* Griglie */
.vsm-row { display:flex; gap:8px; flex-wrap:wrap; }
.vsm-grid-2 { display:grid; grid-template-columns:1fr 1fr; gap:16px; }
@media (max-width:900px){ .vsm-grid-2{ grid-template-columns:1fr; }}

/* Inputs / Select */
.vsm-label { display:block; font-weight:600; margin:8px 0 6px; }
.vsm-input, .vsm-select {
  border:1px solid #e5e7eb; border-radius:12px; padding:10px 12px; outline:none;
  background:#fff; width:100%; transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.vsm-input:focus, .vsm-select:focus { 
  border-color:#d80000; 
  box-shadow:0 0 0 4px rgba(216,0,0,.10); 
}

/* Bottoni */
.vsm-btn {
  display:inline-flex; align-items:center; justify-content:center; gap:8px;
  padding:10px 16px; border-radius:999px; border:1px solid #d80000;
  background:#fff; color:#d80000; cursor:pointer; font-weight:700;
  transition:transform .04s, opacity .2s, background .2s, color .2s;
  text-decoration: none;
}
.vsm-btn:hover { 
  opacity:.95; 
  transform: translateY(-1px);
}
.vsm-btn:active{ transform:translateY(1px); }
.vsm-btn-outline { background:#fff; color:#d80000; }
.vsm-btn-danger  { border-color:#ef4444; color:#ef4444; }
.vsm-btn-primary { background:#d80000; color:#fff; }
.vsm-btn-large   { width:100%; padding:14px 18px; font-size:18px; }

/* Loading States */
.vsm-loading {
  position: relative;
  pointer-events: none;
  opacity: 0.6;
}
.vsm-loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 20px;
  margin: -10px 0 0 -10px;
  border: 2px solid #d80000;
  border-top: 2px solid transparent;
  border-radius: 50%;
  animation: vsm-spin 1s linear infinite;
}
@keyframes vsm-spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Toast Notifications */
.vsm-toast {
  position: fixed;
  top: 20px;
  right: 20px;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 16px 20px;
  box-shadow: 0 8px 24px rgba(0,0,0,.1);
  z-index: 10000;
  transform: translateX(100%);
  transition: transform 0.3s ease;
}
.vsm-toast.show {
  transform: translateX(0);
}
.vsm-toast.success { border-left: 4px solid #22c55e; }
.vsm-toast.error { border-left: 4px solid #ef4444; }
.vsm-toast.warning { border-left: 4px solid #f59e0b; }
.vsm-toast.info { border-left: 4px solid #3b82f6; }

/* Tabelle moderne */
.vsm-table-wrap { overflow:auto; }
.vsm-table { width:100%; border-collapse:separate; border-spacing:0 8px; }
.vsm-table th { text-align:left; font-weight:600; color:#374151; padding:8px 10px; }
.vsm-table td { background:#fafafa; padding:12px 10px; border-radius:10px; vertical-align:middle; }

/* Dots stato */
.vsm-dot { display:inline-block; width:10px; height:10px; border-radius:50%; margin-right:6px; vertical-align:middle; }
.vsm-dot-green { background:#22c55e; }  /* attivo */
.vsm-dot-red   { background:#ef4444; }  /* disattivo */

/* Alert */
.vsm-alert {
  background:#fff5f5; color:#b91c1c; border:1px solid #ffd6d6;
  padding:10px 12px; border-radius:12px; margin-bottom:10px;
}

/* Modal */
.vsm-modal { position:fixed; inset:0; background:rgba(0,0,0,.3); opacity:0; pointer-events:none; transition:.2s;
  display:flex; align-items:center; justify-content:center; padding:20px; z-index:9999; }
.vsm-modal.open { opacity:1; pointer-events:auto; }
.vsm-modal-dialog { background:#fff; width:min(880px, 96vw); border-radius:20px; box-shadow:0 12px 40px rgba(0,0,0,.2); overflow:hidden; }
.vsm-modal-header { display:flex; align-items:center; justify-content:space-between; padding:16px 20px; border-bottom:1px solid #f0f0f0; }
.vsm-modal-body { padding:16px 20px; }
.vsm-modal-close { background:#e31e24; border:none; border-radius:50%; padding:0; width:40px; height:40px; cursor:pointer; color:white; font-size:24px; font-weight:300; display:flex; align-items:center; justify-content:center; transition:all 0.3s; line-height:1; -webkit-font-smoothing:antialiased; -moz-osx-font-smoothing:grayscale; }
/* FORZA VISIBILITÀ PULSANTI AGGIUNGI QUALIFICA/PATENTE */
.vsm-add-qual-btn {
    display: inline-flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    pointer-events: auto !important;
}

.vsm-add-icon {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    line-height: 1 !important;
}

/* RIMUOVE BARRA LATERALE BIANCA */
body, html {
    overflow-x: hidden !important;
    margin: 0 !important;
    padding: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
}

/* FORZA NASCONDIMENTO MODAL CORREZIONE TIMBRATURA */
#vsm-correct-punch-modal {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

/* FORZA VISIBILITÀ DI TUTTI I PULSANTI */
button, .vsm-btn, .vsm-btn-standard, .vsm-btn-primary, .vsm-btn-secondary, .vsm-btn-outline, .vsm-btn-small, .vsm-btn-correct, .vsm-btn-export, .vsm-btn-modify, .vsm-btn-delete, .vsm-btn-approve, .vsm-btn-reject, .vsm-btn-deactivate, .vsm-btn-history, .vsm-btn-add, .vsm-btn-remove, .vsm-btn-save, .vsm-btn-cancel, .vsm-btn-close, .vsm-btn-toggle, .vsm-btn-search, .vsm-btn-filter, .vsm-btn-reset, .vsm-btn-submit, .vsm-btn-download, .vsm-btn-upload, .vsm-btn-edit, .vsm-btn-view, .vsm-btn-print, .vsm-btn-refresh, .vsm-btn-back, .vsm-btn-next, .vsm-btn-prev, .vsm-btn-first, .vsm-btn-last, .vsm-btn-expand, .vsm-btn-collapse, .vsm-btn-minimize, .vsm-btn-maximize, .vsm-btn-restore, .vsm-btn-help, .vsm-btn-info, .vsm-btn-warning, .vsm-btn-danger, .vsm-btn-success, .vsm-btn-link, .vsm-btn-ghost, .vsm-btn-text, .vsm-btn-icon, .vsm-btn-fab, .vsm-btn-raised, .vsm-btn-flat, .vsm-btn-stroked, .vsm-btn-basic, .vsm-btn-mini, .vsm-btn-large, .vsm-btn-block, .vsm-btn-full, .vsm-btn-round, .vsm-btn-square, .vsm-btn-circle, .vsm-btn-pill, .vsm-btn-capsule, .vsm-btn-oval, .vsm-btn-rectangle, .vsm-btn-diamond, .vsm-btn-hexagon, .vsm-btn-triangle, .vsm-btn-star, .vsm-btn-heart, .vsm-btn-cloud, .vsm-btn-sun, .vsm-btn-moon, .vsm-btn-fire, .vsm-btn-water, .vsm-btn-earth, .vsm-btn-air, .vsm-btn-space, .vsm-btn-galaxy, .vsm-btn-universe, .vsm-btn-cosmos, .vsm-btn-infinity, .vsm-btn-eternity, .vsm-btn-immortal, .vsm-btn-divine, .vsm-btn-sacred, .vsm-btn-holy, .vsm-btn-blessed, .vsm-btn-cursed, .vsm-btn-damned, .vsm-btn-forbidden, .vsm-btn-secret, .vsm-btn-hidden, .vsm-btn-mysterious, .vsm-btn-enigmatic, .vsm-btn-cryptic, .vsm-btn-obscure, .vsm-btn-arcane, .vsm-btn-esoteric, .vsm-btn-occult, .vsm-btn-mystical, .vsm-btn-magical, .vsm-btn-enchanted, .vsm-btn-bewitched, .vsm-btn-charmed, .vsm-btn-spellbound, .vsm-btn-mesmerized, .vsm-btn-hypnotized, .vsm-btn-entranced, .vsm-btn-captivated, .vsm-btn-fascinated, .vsm-btn-enchanted, .vsm-btn-bewitched, .vsm-btn-charmed, .vsm-btn-spellbound, .vsm-btn-mesmerized, .vsm-btn-hypnotized, .vsm-btn-entranced, .vsm-btn-captivated, .vsm-btn-fascinated {
    display: inline-block !important;
    visibility: visible !important;
    opacity: 1 !important;
    pointer-events: auto !important;
}

/* FORZA VISIBILITÀ ANCHE SENZA HOVER */
button:not(:hover), .vsm-btn:not(:hover), .vsm-btn-standard:not(:hover), .vsm-btn-primary:not(:hover), .vsm-btn-secondary:not(:hover), .vsm-btn-outline:not(:hover), .vsm-btn-small:not(:hover), .vsm-btn-correct:not(:hover), .vsm-btn-export:not(:hover), .vsm-btn-modify:not(:hover), .vsm-btn-delete:not(:hover), .vsm-btn-approve:not(:hover), .vsm-btn-reject:not(:hover), .vsm-btn-deactivate:not(:hover), .vsm-btn-history:not(:hover), .vsm-btn-add:not(:hover), .vsm-btn-remove:not(:hover), .vsm-btn-save:not(:hover), .vsm-btn-cancel:not(:hover), .vsm-btn-close:not(:hover), .vsm-btn-toggle:not(:hover), .vsm-btn-search:not(:hover), .vsm-btn-filter:not(:hover), .vsm-btn-reset:not(:hover), .vsm-btn-submit:not(:hover), .vsm-btn-download:not(:hover), .vsm-btn-upload:not(:hover), .vsm-btn-edit:not(:hover), .vsm-btn-view:not(:hover), .vsm-btn-print:not(:hover), .vsm-btn-refresh:not(:hover), .vsm-btn-back:not(:hover), .vsm-btn-next:not(:hover), .vsm-btn-prev:not(:hover), .vsm-btn-first:not(:hover), .vsm-btn-last:not(:hover), .vsm-btn-expand:not(:hover), .vsm-btn-collapse:not(:hover), .vsm-btn-minimize:not(:hover), .vsm-btn-maximize:not(:hover), .vsm-btn-restore:not(:hover), .vsm-btn-help:not(:hover), .vsm-btn-info:not(:hover), .vsm-btn-warning:not(:hover), .vsm-btn-danger:not(:hover), .vsm-btn-success:not(:hover), .vsm-btn-link:not(:hover), .vsm-btn-ghost:not(:hover), .vsm-btn-text:not(:hover), .vsm-btn-icon:not(:hover), .vsm-btn-fab:not(:hover), .vsm-btn-raised:not(:hover), .vsm-btn-flat:not(:hover), .vsm-btn-stroked:not(:hover), .vsm-btn-basic:not(:hover), .vsm-btn-mini:not(:hover), .vsm-btn-large:not(:hover), .vsm-btn-block:not(:hover), .vsm-btn-full:not(:hover), .vsm-btn-round:not(:hover), .vsm-btn-square:not(:hover), .vsm-btn-circle:not(:hover), .vsm-btn-pill:not(:hover), .vsm-btn-capsule:not(:hover), .vsm-btn-oval:not(:hover), .vsm-btn-rectangle:not(:hover), .vsm-btn-diamond:not(:hover), .vsm-btn-hexagon:not(:hover), .vsm-btn-triangle:not(:hover), .vsm-btn-star:not(:hover), .vsm-btn-heart:not(:hover), .vsm-btn-cloud:not(:hover), .vsm-btn-sun:not(:hover), .vsm-btn-moon:not(:hover), .vsm-btn-fire:not(:hover), .vsm-btn-water:not(:hover), .vsm-btn-earth:not(:hover), .vsm-btn-air:not(:hover), .vsm-btn-space:not(:hover), .vsm-btn-galaxy:not(:hover), .vsm-btn-universe:not(:hover), .vsm-btn-cosmos:not(:hover), .vsm-btn-infinity:not(:hover), .vsm-btn-eternity:not(:hover), .vsm-btn-immortal:not(:hover), .vsm-btn-divine:not(:hover), .vsm-btn-sacred:not(:hover), .vsm-btn-holy:not(:hover), .vsm-btn-blessed:not(:hover), .vsm-btn-cursed:not(:hover), .vsm-btn-damned:not(:hover), .vsm-btn-forbidden:not(:hover), .vsm-btn-secret:not(:hover), .vsm-btn-hidden:not(:hover), .vsm-btn-mysterious:not(:hover), .vsm-btn-enigmatic:not(:hover), .vsm-btn-cryptic:not(:hover), .vsm-btn-obscure:not(:hover), .vsm-btn-arcane:not(:hover), .vsm-btn-esoteric:not(:hover), .vsm-btn-occult:not(:hover), .vsm-btn-mystical:not(:hover), .vsm-btn-magical:not(:hover), .vsm-btn-enchanted:not(:hover), .vsm-btn-bewitched:not(:hover), .vsm-btn-charmed:not(:hover), .vsm-btn-spellbound:not(:hover), .vsm-btn-mesmerized:not(:hover), .vsm-btn-hypnotized:not(:hover), .vsm-btn-entranced:not(:hover), .vsm-btn-captivated:not(:hover), .vsm-btn-fascinated:not(:hover) {
    display: inline-block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* STILI TENDINE (DROPDOWN) MIGLIORATI */
.vsm-field-select {
    padding-right: 40px !important;
    appearance: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23666' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6,9 12,15 18,9'%3e%3c/polyline%3e%3c/svg%3e") !important;
    background-repeat: no-repeat !important;
    background-position: right 12px center !important;
    background-size: 16px !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
}
.vsm-kpi { background:#fafafa; border-radius:14px; padding:14px; text-align:center; }
.vsm-kpi-val { font-size:28px; font-weight:700; color:#111; }
.vsm-kpi-label { font-size:12px; color:#666; text-transform:uppercase; letter-spacing:.04em; }

/* Lista statistiche */
.vsm-stats-list{ list-style:none; margin:0; padding:0; }
.vsm-stats-list li{ display:flex; justify-content:space-between; padding:10px 12px; border-radius:12px; background:#fafafa; margin:6px 0; }
.vsm-stats-list .label{ color:#666; }

/* === Login card Apple-like === */
.vsm-auth-wrap{
  min-height:60vh; display:flex; align-items:center; justify-content:center; padding:32px 16px;
}
.vsm-auth-card{
  width:min(560px, 92vw);
  background:#fff; border:1px solid #1a1a1a; border-radius:28px;
  padding:36px 32px; text-align:center;
  box-shadow:0 6px 30px rgba(0,0,0,.06);
}
.vsm-auth-logo{
  display:flex; align-items:center; justify-content:center;
  margin-bottom:18px;
}
.vsm-auth-form{ text-align:left; margin-top:6px; }
.vsm-input-pill{ border-radius:999px; }
.vsm-pass-wrap{ position:relative; }
.vsm-pass-wrap .vsm-input{ padding-right:48px; }
.vsm-pass-toggle{
  position:absolute; right:10px; top:50%; transform:translateY(-50%);
  width:36px; height:36px; border-radius:999px; border:1px solid #1a1a1a; background:#fff; cursor:pointer;
  font-weight:700; line-height:1;
}
.vsm-auth-actions{ display:flex; gap:10px; justify-content:center; }
.vsm-auth-foot{ margin-top:18px; }
.vsm-auth-foot a{ color:#d80000; text-decoration:underline; }

/* Calendario — legenda colori */
.vsm-legend{ margin-top:8px; color:#333; }
.vsm-badge{ display:inline-block; padding:2px 8px; border-radius:999px; font-size:12px; margin-right:6px; }
.vsm-badge-green{ background:#e7f7ec; color:#15803d; }
.vsm-badge-yellow{ background:#fff9db; color:#a16207; }
.vsm-badge-red{ background:#ffe4e6; color:#b91c1c; }

/* Dark mode (facoltativo) */
@media (prefers-color-scheme: dark) {
  .vsm-card{ background:#0b0b0b; border-color:#1c1c1c; box-shadow:none; }
  .vsm-table td{ background:#121212; color:#eaeaea; }
  .vsm-input, .vsm-select{ background:#0b0b0b; border-color:#333; color:#eaeaea; }
  .vsm-auth-card{ background:#0b0b0b; border-color:#333; box-shadow:none; }
  .vsm-pass-toggle{ background:#0b0b0b; border-color:#333; color:#eaeaea; }
  .vsm-btn-outline{ color:#ff6b6b; border-color:#ff6b6b; background:#0b0b0b; }
  .vsm-alert{ background:#2b0f0f; border-color:#5c1b1b; color:#ffd9d9; }
}

/* ==========================================================
   VSM Qualifications Card
   ========================================================== */
.vsm-qualifications-card {
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 8px 24px rgba(0,0,0,.06);
  padding: 24px;
  margin: 18px 0;
  border: 1px solid #f2f2f2;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.vsm-qualifications-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(0,0,0,.08);
}

.vsm-qualifications-title {
  font-size: 20px;
  font-weight: 700;
  margin: 0 0 16px 0;
  color: #1f2937;
  display: flex;
  align-items: center;
  gap: 8px;
}

.vsm-qualifications-title::before {
  content: "🎓";
  font-size: 18px;
}

.vsm-qualifications-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.vsm-qualification-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: #f8fafc;
  border-radius: 12px;
  border: 1px solid #e5e7eb;
  transition: background-color 0.2s ease;
}

.vsm-qualification-item:hover {
  background: #f1f5f9;
}

.vsm-qualification-icon {
  font-size: 18px;
  min-width: 24px;
  text-align: center;
}

.vsm-qualification-label {
  font-weight: 600;
  color: #374151;
  flex: 1;
}

.vsm-qualification-status {
  font-size: 14px;
  color: #6b7280;
  font-weight: 500;
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
  .vsm-qualifications-card {
    background: #0b0b0b;
    border-color: #1c1c1c;
    box-shadow: none;
  }
  
  .vsm-qualifications-title {
    color: #eaeaea;
  }
  
  .vsm-qualification-item {
    background: #121212;
    border-color: #333;
  }
  
  .vsm-qualification-item:hover {
    background: #1a1a1a;
  }
  
  .vsm-qualification-label {
    color: #eaeaea;
  }
  
  .vsm-qualification-status {
    color: #9ca3af;
  }
}

/* ======================================
   STORICO SERVIZI E ATTIVITÀ
   ====================================== */

.vsm-history-section {
  background: white;
  border-radius: 16px;
  padding: 32px;
  margin-top: 32px;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.vsm-history-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 16px;
}

.vsm-history-title {
  font-size: 24px;
  font-weight: 700;
  color: #111827;
  margin: 0;
  border-bottom: 3px solid #dc143c;
  padding-bottom: 8px;
}

.vsm-history-filters {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.vsm-filter-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.vsm-filter-group label {
  font-size: 13px;
  font-weight: 600;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.vsm-date-input {
  padding: 8px 12px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  color: #374151;
  transition: all 0.2s;
}

.vsm-date-input:focus {
  outline: none;
  border-color: #dc143c;
  box-shadow: 0 0 0 3px rgba(220, 20, 60, 0.1);
}

/* TABS */
.vsm-history-tabs {
  display: flex;
  gap: 8px;
  border-bottom: 2px solid #e5e7eb;
  margin-bottom: 24px;
  overflow-x: auto;
}

.vsm-history-tab {
  padding: 12px 24px;
  background: transparent;
  border: none;
  border-bottom: 3px solid transparent;
  font-size: 15px;
  font-weight: 600;
  color: #6b7280;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}

.vsm-history-tab:hover {
  color: #dc143c;
  background: rgba(220, 20, 60, 0.05);
}

.vsm-history-tab.active {
  color: #dc143c;
  border-bottom-color: #dc143c;
}

/* TAB CONTENT */
.vsm-history-tab-content {
  display: none;
}

.vsm-history-tab-content.active {
  display: block;
}

/* OVERVIEW TAB */
.vsm-overview-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin-bottom: 32px;
}

.vsm-overview-stat {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  padding: 24px;
  border-radius: 12px;
  text-align: center;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.vsm-overview-stat label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.9);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 12px;
}

.vsm-stat-value-lg {
  font-size: 36px;
  font-weight: 700;
  color: white;
}

.vsm-overview-charts {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 24px;
  align-items: start;
}

.vsm-chart-bar-container {
  background: #f9fafb;
  padding: 24px;
  border-radius: 12px;
  height: 300px;
}

.vsm-circular-charts {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.vsm-circular-chart {
  text-align: center;
}

.vsm-circular-chart canvas {
  max-width: 150px;
  max-height: 150px;
  margin: 0 auto;
}

.vsm-chart-label {
  margin-top: 12px;
  font-size: 13px;
  font-weight: 600;
  color: #6b7280;
}

/* STORICO TAB */
.vsm-history-table-container {
  overflow-x: auto;
  border-radius: 12px;
  border: 1px solid #e5e7eb;
}

.vsm-history-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.vsm-history-table thead {
  background: #f9fafb;
}

.vsm-history-table th {
  padding: 16px;
  text-align: left;
  font-weight: 700;
  color: #374151;
  text-transform: uppercase;
  font-size: 12px;
  letter-spacing: 0.5px;
  border-bottom: 2px solid #e5e7eb;
}

.vsm-history-table td {
  padding: 16px;
  border-bottom: 1px solid #f3f4f6;
  color: #6b7280;
}

.vsm-history-table tbody tr:hover {
  background: #f9fafb;
}

.vsm-history-table tbody tr:last-child td {
  border-bottom: none;
}

.vsm-anomaly-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.vsm-anomaly-badge.anomaly {
  background: #fee2e2;
  color: #991b1b;
}

.vsm-anomaly-badge.no-anomaly {
  background: #d1fae5;
  color: #065f46;
}

.vsm-btn-correct-punch {
  padding: 8px 16px;
  background: #dc143c;
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.vsm-btn-correct-punch:hover {
  background: #b01030;
  transform: translateY(-1px);
  box-shadow: 0 4px 6px -1px rgba(220, 20, 60, 0.3);
}

.vsm-empty-state {
  padding: 48px;
  text-align: center;
  color: #9ca3af;
  font-size: 15px;
}

/* CONVALIDA & REPORT TABS */
.vsm-convalida-info,
.vsm-report-info {
  padding: 48px;
  text-align: center;
  background: #f9fafb;
  border-radius: 12px;
  color: #6b7280;
}

/* RESPONSIVE */
@media (max-width: 1024px) {
  .vsm-overview-charts {
    grid-template-columns: 1fr;
  }
  
  .vsm-chart-bar-container {
    height: 250px;
  }
  
  .vsm-circular-charts {
    flex-direction: row;
    justify-content: space-around;
  }
}

@media (max-width: 768px) {
  .vsm-history-section {
    padding: 20px;
  }
  
  .vsm-history-header {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .vsm-overview-stats {
    grid-template-columns: 1fr;
  }
  
  .vsm-history-table {
    font-size: 12px;
  }
  
  .vsm-history-table th,
  .vsm-history-table td {
    padding: 12px 8px;
  }
}

/* ============================================
   STILI STANDARD PER TUTTE LE PAGINE VSM
   ============================================ */

/* WRAPPER PRINCIPALE */
.vsm-page-wrapper {
  max-width: 1400px;
  margin: 40px auto;
  padding: 0 20px;
}

/* HEADER PAGINA */
.vsm-page-header {
  margin-bottom: 30px;
}

.vsm-page-title {
  font-size: 32px;
  font-weight: 700;
  color: #111827;
  margin: 0 0 8px 0;
}

.vsm-page-subtitle {
  font-size: 16px;
  color: #6b7280;
  margin: 0;
}

/* WHITE CARD STANDARD */
.vsm-white-card {
  background: white;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  padding: 30px;
  margin-bottom: 20px;
}

/* TABS STANDARD */
.vsm-tabs-standard {
  display: flex;
  gap: 0;
  margin-bottom: 30px;
  border-bottom: 3px solid #dc143c;
}

.vsm-tab-standard {
  background: transparent;
  border: none;
  padding: 15px 30px;
  font-size: 16px;
  font-weight: 600;
  color: #666;
  cursor: pointer;
  position: relative;
  transition: all 0.3s;
}

.vsm-tab-standard:hover {
  color: #dc143c;
}

.vsm-tab-standard.active {
  color: #dc143c;
}

.vsm-tab-standard.active::after {
  content: '';
  position: absolute;
  bottom: -3px;
  left: 0;
  right: 0;
  height: 3px;
  background: #dc143c;
}

/* TAB CONTENT */
.vsm-tab-content-standard {
  display: none;
}

.vsm-tab-content-standard.active {
  display: block;
}

/* TABLE STANDARD */
.vsm-table-standard {
  width: 100%;
  border-collapse: collapse;
}

.vsm-table-standard thead {
  background: #f8f9fa;
}

.vsm-table-standard th {
  padding: 15px 12px;
  text-align: left;
  font-weight: 600;
  font-size: 13px;
  color: #8b0000;
  border-bottom: 2px solid #e0e0e0;
}

.vsm-table-standard td {
  padding: 15px 12px;
  border-bottom: 1px solid #f0f0f0;
  font-size: 14px;
  color: #333;
}

.vsm-table-standard tbody tr:hover {
  background: #fafafa;
}

/* BUTTONS STANDARD */
.vsm-btn-standard {
  background: #dc143c;
  color: white;
  border: none;
  padding: 10px 24px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.vsm-btn-standard:hover {
  background: #b11030;
  transform: translateY(-1px);
}

.vsm-btn-standard-outline {
  background: white;
  color: #dc143c;
  border: 2px solid #dc143c;
  padding: 10px 24px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.vsm-btn-standard-outline:hover {
  background: #dc143c;
  color: white;
  transform: translateY(-1px);
}

.vsm-btn-standard-small {
  padding: 8px 16px;
  font-size: 13px;
  border-radius: 16px;
}

/* SEARCH INPUT STANDARD */
.vsm-search-standard {
  width: 100%;
  max-width: 500px;
  padding: 12px 15px 12px 40px;
  border: 2px solid #e5e7eb;
  border-radius: 8px;
  font-size: 15px;
  transition: all 0.2s;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="%23999" stroke-width="2"><circle cx="11" cy="11" r="8"/><path d="m21 21-4.35-4.35"/></svg>') no-repeat 12px center;
}

.vsm-search-standard:focus {
  outline: none;
  border-color: #dc143c;
  box-shadow: 0 0 0 3px rgba(220,20,60,0.1);
}

/* STATS GRID */
.vsm-stats-grid-standard {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

.vsm-stat-card-standard {
  background: white;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.vsm-stat-value-standard {
  font-size: 36px;
  font-weight: 700;
  color: #dc143c;
  margin: 10px 0;
}

.vsm-stat-label-standard {
  font-size: 14px;
  color: #666;
  font-weight: 500;
}

/* EMPTY STATE */
.vsm-empty-state-standard {
  text-align: center;
  padding: 60px 20px;
  color: #999;
}

.vsm-empty-state-standard p {
  margin: 0;
  font-size: 16px;
}

/* FILTERS */
.vsm-filters-standard {
  display: flex;
  gap: 16px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.vsm-filter-group-standard {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.vsm-filter-group-standard label {
  font-size: 13px;
  color: #8b0000;
  font-weight: 600;
}

.vsm-filter-input-standard {
  padding: 8px 12px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 14px;
}

.vsm-filter-input-standard:focus {
  outline: none;
  border-color: #dc143c;
}

/* BADGES */
.vsm-badge-standard {
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
  display: inline-block;
}

.vsm-badge-success {
  background: #e8f5e9;
  color: #2e7d32;
}

.vsm-badge-danger {
  background: #ffebee;
  color: #c62828;
}

.vsm-badge-warning {
  background: #fff3e0;
  color: #e65100;
}

.vsm-badge-info {
  background: #e3f2fd;
  color: #1976d2;
}

/* RESPONSIVE */
@media (max-width: 768px) {
  .vsm-page-wrapper {
    padding: 0 15px;
    margin: 20px auto;
  }
  
  .vsm-page-title {
    font-size: 24px;
  }
  
  .vsm-white-card {
    padding: 20px;
  }
  
  .vsm-tabs-standard {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  .vsm-tab-standard {
    padding: 12px 20px;
    font-size: 14px;
  }
  
  .vsm-stats-grid-standard {
    grid-template-columns: 1fr;
  }
  
  .vsm-filters-standard {
    flex-direction: column;
  }
}
