/* ===== VLSM Front (public) ===== */
.vlsm-front{max-width:100%;margin:0 auto;}
.vlsm-title{margin:0 0 6px 0;font-size:32px;line-height:1.2}
.vlsm-subtitle{margin:0;color:#5f6368}
.vlsm-header{display:flex;align-items:center;justify-content:space-between;gap:16px;margin:10px 0 20px 0}
.vlsm-header__left{display:flex;gap:16px;align-items:center}
.vlsm-header__right{display:flex;gap:10px;align-items:center}

/* Avatar / Logo */
.vlsm-avatar{width:80px;height:80px !important;border-radius:12px !important;object-fit:cover;box-shadow:0 6px 24px rgba(0,0,0,.06) !important}
.vlsm-avatar--placeholder{display:flex;align-items:center;justify-content:center;background:#f2f5f7;color:#8a8f98;font-weight:700}

/* Grid (dashboard & form) */
.vlsm-grid{display:grid;gap:16px}
.vlsm-grid--auto{grid-template-columns:repeat(auto-fit,minmax(220px,1fr));margin:20px 0}
.vlsm-grid.vlsm-grid--2{grid-template-columns:1.55fr 1.45fr;gap:24px} /* B più grande */
@media(max-width:1100px){.vlsm-grid.vlsm-grid--2{grid-template-columns:1fr}}

/* Cards */
.vlsm-card{background:#fff;border-radius:14px;box-shadow:0 8px 30px rgba(23,28,33,.06);overflow:hidden;margin-bottom:30px}
.vlsm-card--soft{border:1px solid #edf0f3}
.vlsm-card__head{display:flex;align-items:center;justify-content:space-between;padding:18px 20px;background:#f7f9fb;border-bottom:1px solid #e9edf1}
.vlsm-card__title{margin:0;font-size:20px}
.vlsm-card__meta{font-size:13px;color:#7b8190}
.vlsm-card__body{padding:20px}

/* KPI cards */
.vlsm-card--stat{display:flex;gap:14px;align-items:center;padding:16px}
.vlsm-card__icon{width:44px;height:44px;border-radius:10px;display:flex;align-items:center;justify-content:center;color:#fff}
.vlsm-bg--green{background:#22c55e}.vlsm-bg--blue{background:#3b82f6}.vlsm-bg--indigo{background:#6366f1}.vlsm-bg--amber{background:#f59e0b}
.vlsm-kpi{font-size:24px;font-weight:700}
.vlsm-kpi__label{font-size:13px;color:#6b7280;margin-top:2px}

/* Buttons / Links */
.vlsm-btn{display:inline-flex;gap:6px;align-items:center;padding:10px 14px;border:1px solid;border-radius:12px;cursor:pointer;border:1px solid transparent}
.vlsm-btn--primary{background:#c2185b;color:#fff}
.vlsm-btn--ghost{background:#fff;border-color:#e0e0e0;color:#c2185b}
.vlsm-link{color:#c2185b;text-decoration:none;font-weight:600}
.vlsm-link:hover{text-decoration:underline}
.vlsm-header__sep{margin:0 8px;color:#999}
.vlsm-list__meta .vlsm-link:hover {text-decoration:none;}

/* Badges */
.vlsm-badge{display:inline-flex;padding:4px 8px;border-radius:999px;font-size:11px;font-weight:700}
.vlsm-badge--pending{background:rgba(245,158,11,.15);color:#b45309}
.vlsm-badge--approved{background:rgba(34,197,94,.15);color:#15803d}
.vlsm-badge--rejected{background:rgba(239,68,68,.15);color:#b91c1c}
.vlsm-badge--active{background:rgba(34,197,94,.15);color:#15803d}
.vlsm-badge--inactive{background:rgba(239,68,68,.15);color:#b91c1c}

/* Alerts */
.vlsm-alert{padding:14px 16px;border-radius:10px;margin:10px 0;border-left:4px solid}
.vlsm-alert--danger{background:#fff1f2;border-color:#e11d48;color:#9f1239}
.vlsm-alert--warning{background:#fffbeb;border-color:#f59e0b;color:#b45309}
.vlsm-alert--success{background:#ecfdf5;border-color:#10b981;color:#065f46}

/* Empty state */
.vlsm-empty{padding:40px;text-align:center;color:#7b8190}
.vlsm-empty .dashicons{font-size:40px;opacity:.4;margin-bottom:10px}

/* Lists */
.vlsm-list{list-style:none;margin:0;padding:0}
.vlsm-list__item{display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid #edf0f3;padding:14px 0}
.vlsm-list__title{font-weight:700}
.vlsm-list__sub{font-size:12px;color:#818898}
.vlsm-list__meta{display:flex;gap:10px;align-items:center;color:#6b7280}

/* ---- Sale form (layout) ---- */
.vlsm-field{margin-bottom:14px}
.vlsm-label{display:block;font-weight:600;margin-bottom:6px}
.vlsm-input,.vlsm-select,.vlsm-textarea{width:100%;box-sizing:border-box;padding:10px 12px;border:1px solid #e6e9ee;border-radius:10px;background:#fff}
.vlsm-textarea{min-height:140px;resize:vertical}
.vlsm-select{appearance:auto;background:#fff}

/* Linee prodotto (solo Product + Qty) */
.vlsm-line{margin-bottom:10px}
.vlsm-line .vlsm-line__row .vlsm-field {margin-bottom:0 !important;}
.vlsm-line__row{display:flex;gap:10px;align-items:center} /* centrata verticalmente */
.vlsm-field--grow{flex:1;min-width:0}
.vlsm-field--qty{width:84px}  /* qty più stretta */
.vlsm-line__remove{
  display:flex;align-items:center;justify-content:center;
  border:1px solid #f3b1b1;background:#fff;color:#c0392b;border-radius:10px;
  height:42px;min-width:42px;padding:0;cursor:pointer;
}

/* Riepilogo (colonna destra) */
.vlsm-summary{background:#fafafa;border-radius:12px;padding:14px;margin-bottom:14px}
.vlsm-summary__head{font-weight:700;margin-bottom:6px}
.vlsm-summary__list{list-style:none;margin:0;padding:0}
.vlsm-summary__item{display:grid;grid-template-columns:1fr auto;gap:6px;padding:8px 0;border-bottom:1px dashed #eee}
.vlsm-summary__item:last-child{border-bottom:none}
.vlsm-summary__title{font-weight:600}
.vlsm-summary__meta{color:#777;font-size:12px}
.vlsm-summary__value{font-weight:700}

.vlsm-totalbox{background:#f6f7fb;border-radius:12px;padding:18px;display:flex;align-items:center;justify-content:space-between;margin:10px 0 16px}
.vlsm-totalbox__label{font-weight:700}
.vlsm-totalbox__value{font-size:22px;font-weight:800}


/* Header row for Product/Qty (non-invasive) */
.vlsm-lines-head{display:flex;gap:10px;align-items:center;padding:10px 0;margin:10px 0 8px 0;border-bottom:1px dashed #e5e5e5}
.vlsm-lines-head__product{flex:1;min-width:0;font-weight:700}
.vlsm-lines-head__qty{width:84px;text-align:left;font-weight:700}
.vlsm-lines-head__actions{width:42px}
/* Screen-reader only utility */
.vlsm-sr-only{position:absolute!important;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
@media(max-width:560px){
  .vlsm-lines-head{display:none}
  .vlsm-sr-only{position:static!important;width:auto;height:auto;margin:0;overflow:visible;clip:auto;white-space:normal}
}

/* Pagination */
.vlsm-pagination {margin-top:10px}
.vlsm-pagination a {margin-right:6px}

/* Hide "View" action on frontend lists (keep Edit) */
.vlsm-eye {display: none !important;}
