/* ── La.Se. Planner — Admin styles ──────────────────────────────────────── */

.lp-wrap { max-width: 1100px; }

/* Header */
.lp-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid #e5e7eb;
}

.lp-header-left { display: flex; align-items: center; gap: 12px; }

.lp-page-title {
  font-size: 1.375rem !important;
  font-weight: 600 !important;
  color: #1a1a2e !important;
  margin: 0 !important;
  display: flex;
  align-items: center;
  gap: 8px;
}

.lp-page-title .dashicons { font-size: 1.375rem; color: #1a56a0; }

.lp-version {
  background: #e6f1fb;
  color: #1a56a0;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 4px;
  letter-spacing: .04em;
}

.lp-user-badge {
  font-size: 13px;
  color: #6b7280;
  display: flex;
  align-items: center;
  gap: 6px;
}

.lp-user-badge em { color: #1a56a0; font-style: normal; }

/* Cards metriche */
.lp-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
  margin-bottom: 2rem;
}

.lp-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 1.125rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 14px;
}

.lp-card-icon {
  font-size: 1.75rem !important;
  color: #1a56a0;
  flex-shrink: 0;
}

.lp-card-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: #9ca3af;
  margin-bottom: 4px;
}

.lp-card-value {
  font-size: 1.25rem;
  font-weight: 600;
  color: #1a1a2e;
}

.lp-card-value small { font-size: .75rem; color: #9ca3af; font-weight: 400; }

/* Titolo sezione */
.lp-section-title {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: #9ca3af;
  margin-bottom: .75rem;
  padding-bottom: .5rem;
  border-bottom: 1px solid #f3f4f6;
}

/* Roadmap */
.lp-roadmap { display: flex; flex-direction: column; gap: 6px; }

.lp-roadmap-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: .625rem 1rem;
  border-radius: 8px;
  font-size: 13px;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
}

.lp-roadmap-item .dashicons { font-size: 18px; flex-shrink: 0; }

.lp-roadmap-badge {
  font-family: monospace;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 4px;
  min-width: 38px;
  text-align: center;
}

.lp-roadmap-done  { background: #f0fdf4; border-color: #bbf7d0; }
.lp-roadmap-done  .lp-roadmap-badge { background: #d1fae5; color: #065f46; }
.lp-roadmap-done  .dashicons { color: #059669; }

.lp-roadmap-next  { background: #eff6ff; border-color: #bfdbfe; }
.lp-roadmap-next  .lp-roadmap-badge { background: #dbeafe; color: #1e40af; }
.lp-roadmap-next  .dashicons { color: #2563eb; }

.lp-roadmap-soon  .lp-roadmap-badge { background: #f3f4f6; color: #6b7280; }
.lp-roadmap-soon  .dashicons { color: #9ca3af; }

.lp-roadmap-item strong { margin-right: 6px; }
.lp-roadmap-item span   { color: #6b7280; }

/* Bottoni */
.lp-btn { display: inline-flex !important; align-items: center; gap: 6px; }
.lp-btn .dashicons { font-size: 16px !important; }

/* Debug panel */
.lp-debug-panel {
  background: #1a1a2e;
  color: #93c5fd;
  border-radius: 8px;
  padding: 1rem;
  margin-bottom: 1.5rem;
  font-size: 12px;
}

/* Coming soon */
.lp-coming-soon {
  text-align: center;
  padding: 4rem 2rem;
  color: #9ca3af;
}

.lp-coming-soon p { margin-top: 1rem; font-size: 1rem; }

/* Tabella utenti */
.lp-table-wrap {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  overflow: hidden;
}

.lp-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.lp-table thead th {
  background: #f9fafb;
  padding: .625rem 1rem;
  text-align: left;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: #9ca3af;
  border-bottom: 1px solid #e5e7eb;
}

.lp-table tbody td {
  padding: .75rem 1rem;
  border-bottom: 1px solid #f3f4f6;
  color: #374151;
}

.lp-table tbody tr:last-child td { border-bottom: none; }
.lp-table tbody tr:hover td { background: #f9fafb; }

/* Badge */
.lp-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 4px;
}

.lp-badge-op  { background: #faeeda; color: #92400e; }
.lp-badge-pre { background: #e1f5ee; color: #065f46; }
.lp-badge-ok  { background: #d1fae5; color: #065f46; }
.lp-badge-off { background: #fee2e2; color: #991b1b; }
.lp-badge-warn{ background: #fef3c7; color: #92400e; }

/* Modal */
.lp-modal { position: fixed; inset: 0; z-index: 99999; display: flex; align-items: center; justify-content: center; }
.lp-modal-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.45); }
.lp-modal-box {
  position: relative;
  background: #fff;
  border-radius: 14px;
  width: 100%;
  max-width: 460px;
  margin: 1rem;
  box-shadow: 0 8px 32px rgba(0,0,0,.18);
}

.lp-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.125rem 1.375rem;
  border-bottom: 1px solid #e5e7eb;
}

.lp-modal-header h2 { margin: 0; font-size: 1rem; color: #1a1a2e; }

.lp-modal-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: #9ca3af;
  line-height: 1;
  padding: 0;
}

.lp-modal-body { padding: 1.375rem; }
.lp-modal-footer {
  padding: 1rem 1.375rem;
  border-top: 1px solid #e5e7eb;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.lp-form-row { margin-bottom: 1rem; }
.lp-form-row label { display: block; font-size: 12px; font-weight: 600; color: #374151; margin-bottom: 4px; }
.lp-form-row label em { color: #dc2626; font-style: normal; }
.lp-form-row input,
.lp-form-row select {
  width: 100%;
  height: 38px;
  padding: 0 10px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: 13px;
  color: #111827;
}

.lp-form-row input:focus,
.lp-form-row select:focus {
  outline: none;
  border-color: #1a56a0;
  box-shadow: 0 0 0 2px rgba(26,86,160,.15);
}

.lp-form-note { font-size: 12px; color: #6b7280; margin: 0; }

/* Feedback */
.lp-feedback {
  padding: .75rem 1rem;
  border-radius: 8px;
  font-size: 13px;
  margin-bottom: 1rem;
}

.lp-feedback.ok  { background: #d1fae5; color: #065f46; }
.lp-feedback.err { background: #fee2e2; color: #991b1b; }

/* ── v0.2 Anagrafiche frontend ─────────────────────────────────────────── */
.lp-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 1rem;
  padding: 8px;
  background: #f8fafc;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
}
.lp-tab {
  border: 0;
  background: transparent;
  color: #475569;
  font-weight: 600;
  padding: .6rem .9rem;
  border-radius: 10px;
  cursor: pointer;
}
.lp-tab.is-active { background: #1d4ed8; color: #fff; }
.lp-tab-panel { display: none; }
.lp-tab-panel.is-active { display: block; }
.lp-section-head {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin: 1rem 0 .75rem;
}
.lp-filter-row {
  display:flex;
  align-items:center;
  gap:10px;
  margin: 0 0 .75rem;
  background:#fff;
  border:1px solid #e5e7eb;
  border-radius:12px;
  padding:.75rem 1rem;
}
.lp-filter-row label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: #64748b;
  font-weight: 700;
}
.lp-filter-row select { min-width: 260px; }
.lp-form-grid {
  display:grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 14px;
}
.lp-form-row-full { grid-column: 1 / -1; }
.lp-form-row textarea {
  width: 100%;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  padding: .6rem .7rem;
}
.lp-modal-wide { width: min(760px, calc(100vw - 32px)); max-width: 760px; }
.lp-table small { color:#64748b; }
.lp-badge-coordinatore { background:#dbeafe; color:#1e40af; }
.lp-badge-preposto { background:#d1fae5; color:#065f46; }
.lp-badge-operatore { background:#faeeda; color:#92400e; }
@media (max-width: 720px) {
  .lp-form-grid { grid-template-columns: 1fr; }
  .lp-section-head, .lp-filter-row { align-items: stretch; flex-direction: column; }
  .lp-filter-row select { min-width: 0; width: 100%; }
}


.lp-import-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}
.lp-import-box {
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  padding: 1rem;
  background: #fff;
}
.lp-import-box h3 {
  margin-top: 0;
}
.lp-import-box input[type="file"] {
  display: block;
  width: 100%;
  margin: 0.75rem 0 1rem;
}
.lp-import-result {
  margin-top: 1rem;
  padding: 1rem;
  border-radius: 12px;
  background: #0f172a;
  color: #f8fafc;
  white-space: pre-wrap;
  max-height: 320px;
  overflow: auto;
}
@media (max-width: 900px) {
  .lp-import-grid { grid-template-columns: 1fr; }
}

/* Mappa litorale */
.lp-section-subtitle {
  margin: .25rem 0 0;
  color: #6b7280;
  font-size: 13px;
  text-transform: none;
  letter-spacing: 0;
}

.lp-map-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 14px;
  align-items: stretch;
}

.lp-map-panel,
.lp-map-side {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  overflow: hidden;
}

.lp-litorale-map {
  width: 100%;
  height: 560px;
  min-height: 420px;
  background: #e5edf4;
}

.lp-map-side {
  padding: 1rem;
}

.lp-map-side h3 {
  margin: 0 0 .75rem;
  color: #1a1a2e;
  font-size: 1rem;
}

.lp-map-summary {
  display: flex;
  flex-direction: column;
  gap: .6rem;
  font-size: 13px;
  color: #374151;
}

.lp-map-summary strong {
  color: #1a56a0;
  font-size: 1.25rem;
}

.lp-map-note {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid #f3f4f6;
  font-size: 12px;
  color: #6b7280;
  line-height: 1.45;
}

.lp-map-legend {
  display: flex;
  flex-wrap: wrap;
  gap: .8rem;
  padding: .65rem .85rem;
  border-top: 1px solid #e5e7eb;
  font-size: 12px;
  color: #4b5563;
}

.lp-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 999px;
  margin-right: 5px;
  vertical-align: middle;
}
.lp-dot-stab { background: #1a56a0; }
.lp-dot-post { background: #059669; }
.lp-dot-op   { background: #dc2626; opacity: .45; }

.lp-map-label {
  font-weight: 700;
  color: #1a1a2e;
  background: rgba(255,255,255,.92);
  border: 1px solid rgba(26,86,160,.2);
  box-shadow: 0 2px 8px rgba(0,0,0,.08);
}
.lp-map-label-post {
  font-weight: 600;
  color: #065f46;
  background: rgba(255,255,255,.92);
}
.lp-map-warn { color: #92400e; background: #fef3c7; border-radius: 8px; padding: .5rem; }
.lp-map-error { color: #991b1b; background: #fee2e2; border-radius: 8px; padding: .5rem; display: inline-block; }

.leaflet-container { font-family: inherit; }
.leaflet-popup-content strong { color: #1a1a2e; }

@media (max-width: 900px) {
  .lp-map-layout { grid-template-columns: 1fr; }
  .lp-litorale-map { height: 440px; }
}

/* v0.3 Plancia turni */
.lp-turni-controls{display:flex;gap:1rem;align-items:end;flex-wrap:wrap;margin:1rem 0;padding:1rem;background:#f8fafc;border:1px solid #e5e7eb;border-radius:14px}
.lp-turni-controls label{display:flex;flex-direction:column;gap:.35rem;font-size:.82rem;font-weight:700;color:#374151;text-transform:uppercase;letter-spacing:.03em}
.lp-turni-controls select,.lp-turni-controls input{min-width:220px;padding:.55rem .65rem;border:1px solid #d1d5db;border-radius:9px;background:#fff}
.lp-turni-summary{margin:.75rem 0 1rem;padding:.75rem 1rem;background:#eef2ff;border:1px solid #c7d2fe;border-radius:12px;color:#1e293b}
.lp-warn-number{color:#dc2626}.lp-empty-state{padding:2rem;text-align:center;color:#64748b;background:#f8fafc;border:1px dashed #cbd5e1;border-radius:14px}.lp-error-text{color:#b91c1c}
.lp-turni-grid-wrap{overflow:auto;border:1px solid #e5e7eb;border-radius:16px;background:#fff}.lp-turni-table{width:100%;border-collapse:separate;border-spacing:0;min-width:1050px}.lp-turni-table th,.lp-turni-table td{border-right:1px solid #e5e7eb;border-bottom:1px solid #e5e7eb;vertical-align:top;padding:.65rem}.lp-turni-table thead th{position:sticky;top:0;background:#111827;color:#fff;text-align:center;z-index:1}.lp-turni-table tbody th{width:210px;background:#f8fafc;text-align:left;color:#111827}.lp-turni-table td{width:135px;min-height:120px}.lp-turni-table td.is-uncovered{background:#fff1f2}.lp-turni-table td.is-covered{background:#f0fdf4}.lp-turn-empty{font-size:.8rem;color:#b91c1c;font-weight:700;margin-bottom:.4rem}.lp-turn-card{position:relative;background:#fff;border:1px solid #bbf7d0;border-radius:10px;padding:.45rem 1.35rem .45rem .5rem;margin-bottom:.45rem;box-shadow:0 1px 2px rgba(15,23,42,.06);font-size:.8rem}.lp-turn-card span,.lp-turn-card small{color:#475569}.lp-turn-delete{position:absolute;top:.25rem;right:.25rem;border:0;background:#fee2e2;color:#991b1b;border-radius:999px;width:18px;height:18px;line-height:17px;cursor:pointer;font-weight:700}.lp-readonly-box{padding:.7rem .8rem;background:#f8fafc;border:1px solid #e5e7eb;border-radius:10px;color:#334155}.lp-over{color:#dc2626;font-weight:700}.lp-under{color:#d97706;font-weight:700}

/* v0.3.1 — Plancia Drag & Drop giornaliera */
.lp-dnd-actions{display:flex;gap:.75rem;align-items:center;flex-wrap:wrap}.lp-dnd-actions label{display:flex;gap:.45rem;align-items:center;font-weight:700;color:#334155}.lp-dnd-layout{display:grid;grid-template-columns:minmax(0,1fr) 320px;gap:1rem;align-items:start}.lp-dnd-board-wrap{overflow:auto;border:1px solid #e2e8f0;border-radius:18px;background:#fff;box-shadow:0 10px 24px rgba(15,23,42,.06);max-height:76vh}.lp-dnd-board{min-width:1100px}.lp-dnd-table{--lp-slot-w:86px;display:grid;grid-template-columns:240px repeat(var(--lp-hours),var(--lp-slot-w));align-items:stretch}.lp-dnd-corner,.lp-dnd-hour{position:sticky;top:0;z-index:5;background:#f8fafc;border-bottom:1px solid #e2e8f0;font-weight:800;color:#0f172a;padding:.7rem .55rem;text-align:center}.lp-dnd-corner{left:0;z-index:7;text-align:left}.lp-dnd-post-label{position:sticky;left:0;z-index:3;background:#fff;border-right:1px solid #e2e8f0;border-bottom:1px solid #edf2f7;padding:.65rem .75rem;min-height:68px}.lp-dnd-post-label strong{display:block;font-size:.9rem;color:#0f172a}.lp-dnd-post-label small{display:block;color:#64748b;margin-top:.15rem}.lp-dnd-stab-row{background:#0f766e;color:#fff;font-weight:900;letter-spacing:.02em;padding:.55rem .75rem;border-top:1px solid rgba(255,255,255,.3);position:sticky;left:0;z-index:4}.lp-dnd-slot{min-height:68px;border-bottom:1px solid #edf2f7;border-right:1px solid #edf2f7;background:#fff;position:relative;padding:.25rem;overflow:visible}.lp-dnd-slot.is-free{background:linear-gradient(180deg,#fff,#f8fafc)}.lp-dnd-slot.is-busy{background:#ecfdf5}.lp-dnd-slot.is-drop-target{outline:3px solid #14b8a6;outline-offset:-3px;background:#ccfbf1}.lp-dnd-turn{display:flex;align-items:center;gap:.25rem;border:1px solid #14b8a6;background:#fff;border-radius:12px;padding:.28rem 1.55rem .28rem 1.05rem;box-shadow:0 6px 14px rgba(15,23,42,.14);font-size:.74rem;line-height:1.12;overflow:hidden;position:absolute;top:8px;min-height:40px;z-index:8}.lp-dnd-turn span{min-width:0;flex:1}.lp-dnd-turn strong{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:#0f172a}.lp-dnd-turn small{display:block;color:#475569}.lp-dnd-del{border:0;border-radius:8px;background:#fee2e2;color:#991b1b;cursor:pointer;min-width:20px;height:22px;font-weight:900}.lp-dnd-del:hover{background:#fecaca}.lp-dnd-pool{position:sticky;top:1rem;border:1px solid #e2e8f0;border-radius:18px;background:#fff;box-shadow:0 10px 24px rgba(15,23,42,.06);padding:.85rem;max-height:76vh;overflow:auto}.lp-dnd-pool-head{display:flex;flex-direction:column;gap:.55rem;margin-bottom:.65rem}.lp-dnd-pool-head strong{font-size:1rem;color:#0f172a}.lp-dnd-pool-head input{width:100%;border:1px solid #cbd5e1;border-radius:12px;padding:.55rem .65rem}.lp-dnd-help{font-size:.78rem;color:#64748b;background:#f8fafc;border-radius:12px;padding:.55rem;margin-bottom:.65rem}.lp-dnd-operators{display:flex;flex-direction:column;gap:.5rem}.lp-dnd-op{border:1px solid #e2e8f0;border-radius:14px;padding:.65rem;background:#fff;cursor:grab;box-shadow:0 4px 12px rgba(15,23,42,.04)}.lp-dnd-op:active{cursor:grabbing}.lp-dnd-op strong{display:block;color:#0f172a}.lp-dnd-op small{display:block;color:#64748b;margin-top:.15rem}.lp-dnd-op em{display:inline-block;margin-top:.35rem;font-style:normal;font-size:.72rem;border-radius:999px;padding:.12rem .45rem;background:#dcfce7;color:#166534}.lp-dnd-op.is-busy{opacity:.72}.lp-dnd-op.is-busy em{background:#ffedd5;color:#9a3412}@media(max-width:1100px){.lp-dnd-layout{grid-template-columns:1fr}.lp-dnd-pool{position:relative;top:auto;max-height:none}.lp-dnd-board-wrap{max-height:65vh}}


/* v0.3.3 — Desktop wide mode / control room
   Il planner è un gestionale operativo: sul desktop deve uscire dai limiti stretti del tema WP
   e dare spazio reale alla plancia dati. */
.lp-frontend-app {
  width: calc(100vw - 28px) !important;
  max-width: none !important;
  margin-left: calc(50% - 50vw + 14px) !important;
  margin-right: calc(50% - 50vw + 14px) !important;
  border-radius: 0 !important;
}
.lp-frontend-app .lp-shell,
.lp-frontend-app .lp-main {
  max-width: none !important;
  width: 100% !important;
}
.lp-frontend-app .lp-main {
  padding: 1rem 1.25rem !important;
}
.lp-frontend-app .lp-app-header {
  padding: .85rem 1.15rem;
}
.lp-frontend-app .lp-header {
  margin-bottom: 1rem;
  padding-bottom: .7rem;
}
.lp-frontend-app .lp-cards {
  grid-template-columns: repeat(4, minmax(160px, 1fr));
  gap: .75rem;
  margin-bottom: 1.1rem;
}
.lp-frontend-app .lp-card {
  padding: .9rem 1rem;
}
.lp-tabs {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(248,250,252,.96);
  backdrop-filter: blur(8px);
  padding: .45rem;
  border-radius: 14px;
}

/* Quando si lavora in Plancia D&D, priorità assoluta allo spazio operativo. */
.lp-shell[data-active-tab="dragboard"] .lp-cards,
.lp-shell[data-active-tab="dragboard"] .lp-roadmap,
.lp-shell[data-active-tab="dragboard"] > .lp-main > #lp-coordinator-dashboard > .lp-section-title:last-of-type {
  display: none !important;
}
.lp-shell[data-active-tab="dragboard"] .lp-header {
  margin-bottom: .5rem;
  padding-bottom: .45rem;
}
.lp-shell[data-active-tab="dragboard"] .lp-page-title {
  font-size: 1.05rem !important;
}
.lp-shell[data-active-tab="dragboard"] .lp-tabs {
  margin-bottom: .65rem;
}
.lp-shell[data-active-tab="dragboard"] .lp-section-head {
  margin-bottom: .45rem;
  padding: .5rem .6rem;
}
.lp-shell[data-active-tab="dragboard"] .lp-section-subtitle {
  display: none;
}
.lp-shell[data-active-tab="dragboard"] .lp-turni-summary {
  margin: .4rem 0 .55rem;
  padding: .45rem .65rem;
  font-size: .86rem;
}
.lp-shell[data-active-tab="dragboard"] .lp-dnd-layout {
  grid-template-columns: minmax(0, 1fr) 285px;
  gap: .7rem;
}
.lp-shell[data-active-tab="dragboard"] .lp-dnd-board-wrap,
.lp-shell[data-active-tab="dragboard"] .lp-dnd-pool {
  max-height: calc(100vh - 250px);
}
.lp-shell[data-active-tab="dragboard"] .lp-dnd-table {
  --lp-slot-w:82px;
  grid-template-columns: 220px repeat(var(--lp-hours), var(--lp-slot-w));
}
.lp-shell[data-active-tab="dragboard"] .lp-dnd-corner,
.lp-shell[data-active-tab="dragboard"] .lp-dnd-hour {
  padding: .5rem .4rem;
}
.lp-shell[data-active-tab="dragboard"] .lp-dnd-post-label,
.lp-shell[data-active-tab="dragboard"] .lp-dnd-slot {
  min-height: 58px;
}
.lp-shell[data-active-tab="dragboard"] .lp-dnd-post-label {
  padding: .5rem .6rem;
}
.lp-shell[data-active-tab="dragboard"] .lp-dnd-stab-row {
  padding: .42rem .6rem;
}
.lp-shell[data-active-tab="dragboard"] .lp-dnd-pool {
  top: 3.1rem;
  padding: .65rem;
}

@media (min-width: 1500px) {
  .lp-shell[data-active-tab="dragboard"] .lp-dnd-layout { grid-template-columns: minmax(0, 1fr) 330px; }
  .lp-shell[data-active-tab="dragboard"] .lp-dnd-table { --lp-slot-w:92px; grid-template-columns: 250px repeat(var(--lp-hours), var(--lp-slot-w)); }
}

@media (max-width: 900px) {
  .lp-frontend-app {
    width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }
  .lp-shell[data-active-tab="dragboard"] .lp-dnd-layout { grid-template-columns: 1fr; }
  .lp-shell[data-active-tab="dragboard"] .lp-dnd-board-wrap,
  .lp-shell[data-active-tab="dragboard"] .lp-dnd-pool { max-height: none; }
}


/* v0.3.4 — Resize drag sui bordi turno */
.lp-dnd-turn strong{font-size:.76rem;font-weight:900}.lp-dnd-turn small{font-weight:700}.lp-dnd-edge{position:absolute;top:0;bottom:0;width:12px;background:linear-gradient(180deg,rgba(20,184,166,.10),rgba(20,184,166,.30));cursor:ew-resize;z-index:2}.lp-dnd-edge-left{left:0;border-radius:12px 0 0 12px;border-right:1px dashed rgba(15,118,110,.45)}.lp-dnd-edge-right{right:24px;border-left:1px dashed rgba(15,118,110,.45)}.lp-dnd-edge:hover{background:rgba(20,184,166,.45)}.lp-dnd-turn .lp-dnd-del{position:absolute;right:3px;top:50%;transform:translateY(-50%);z-index:3}.lp-dnd-turn.is-resizing{outline:3px solid #0ea5e9;outline-offset:1px;box-shadow:0 10px 22px rgba(14,165,233,.25)}.lp-dnd-turn.is-invalid-resize{outline-color:#ef4444}.lp-is-resizing-dnd{user-select:none;cursor:ew-resize!important}.lp-is-resizing-dnd *{cursor:ew-resize!important}.lp-dnd-slot.is-busy{background:linear-gradient(180deg,#ecfdf5,#f8fafc)}

/* v0.3.5 — azioni distruttive anagrafiche */
.button.button-danger{border-color:#dc2626!important;color:#b91c1c!important;background:#fff!important;}
.button.button-danger:hover{background:#fef2f2!important;color:#991b1b!important;border-color:#b91c1c!important;}

/* v0.3.6 — cancellazione turno via tasto destro */
.lp-dnd-turn{padding-right:1.05rem!important;}
.lp-dnd-turn .lp-dnd-del{display:none!important;}
.lp-dnd-edge-right{right:0!important;border-radius:0 12px 12px 0;}
.lp-dnd-context-menu{position:fixed;z-index:999999;background:#fff;border:1px solid #cbd5e1;border-radius:12px;box-shadow:0 14px 32px rgba(15,23,42,.22);padding:.35rem;min-width:150px;}
.lp-dnd-context-menu button{width:100%;border:0;background:#fff;color:#b91c1c;text-align:left;border-radius:9px;padding:.55rem .7rem;font-weight:800;cursor:pointer;}
.lp-dnd-context-menu button:hover{background:#fee2e2;}

/* Frontend standalone: WordPress admin button classes are not loaded on /planner/. */
.lp-app .button,
.lp-modal .button,
.lp-context-menu .button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 34px;
  padding: 7px 13px;
  border: 1px solid #d6336c;
  border-radius: 0;
  background: #fff;
  color: #be185d;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  box-sizing: border-box;
  transition: background .12s ease, color .12s ease, border-color .12s ease, box-shadow .12s ease;
}
.lp-app .button:hover,
.lp-modal .button:hover,
.lp-context-menu .button:hover {
  background: #fdf2f8;
  border-color: #be185d;
  color: #9d174d;
}
.lp-app .button:focus,
.lp-modal .button:focus,
.lp-context-menu .button:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(214, 51, 108, .18);
}
.lp-app .button-primary,
.lp-modal .button-primary,
.lp-context-menu .button-primary {
  background: #2563eb;
  border-color: #2563eb;
  color: #fff;
}
.lp-app .button-primary:hover,
.lp-modal .button-primary:hover,
.lp-context-menu .button-primary:hover {
  background: #1d4ed8;
  border-color: #1d4ed8;
  color: #fff;
}
.lp-app .button-small,
.lp-modal .button-small,
.lp-context-menu .button-small {
  min-height: 28px;
  padding: 5px 9px;
  font-size: 12px;
}
.lp-app .button[disabled],
.lp-modal .button[disabled] {
  opacity: .55;
  cursor: not-allowed;
}
