@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@400;600;700&family=Share+Tech+Mono&display=swap');

:root {
  --wayslip-yellow: #FABD02;
  --wayslip-yellow-dark: #D4AC0D;
  --wayslip-yellow-light: #FCD867;
  --wayslip-gray: #222B32;
  --wayslip-gray-dark: #171E24;
  --wayslip-gray-light: #323E49;
  --bg-light: #F4F5F7;
  --border-color: #E2E8F0;
  --text-dark: #1A202C;
  --text-muted: #718096;
  
  --font-title: 'Outfit', sans-serif;
  --font-body: 'Inter', sans-serif;
  --font-digital: 'Share Tech Mono', monospace;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: var(--bg-light);
  color: var(--text-dark);
  font-family: var(--font-body);
  min-height: 100vh;
  padding-bottom: 3rem;
  overflow-x: hidden;
}

/* --- LOGO AND BRANDING --- */
.melo-brand-banner {
  background: linear-gradient(135deg, var(--wayslip-gray-dark) 0%, var(--wayslip-gray) 100%);
  border-bottom: 4px solid var(--wayslip-yellow);
  color: #ffffff;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.logo-container {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.logo-circle {
  background: var(--wayslip-yellow);
  color: var(--wayslip-gray-dark);
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 1.25rem;
  box-shadow: 0 0 10px rgba(230,95,0,0.3);
}

.logo-container h1 {
  font-family: var(--font-title);
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.user-profile {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.scale-indicator {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: #10b981;
  padding: 0.3rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
}

.scale-indicator .dot {
  width: 6px;
  height: 6px;
  background-color: #10b981;
  border-radius: 50%;
  box-shadow: 0 0 6px #10b981;
  animation: pulse 1.5s infinite;
}

.profile-info {
  text-align: right;
}

.profile-name {
  font-size: 0.85rem;
  font-weight: 600;
}

.profile-role {
  font-size: 0.7rem;
  color: #cbd5e1;
}

.logout-btn {
  background: transparent;
  border: 1px solid rgba(255,255,255,0.25);
  color: #f1f5f9;
  padding: 0.35rem 0.75rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.logout-btn:hover {
  background: rgba(239, 68, 68, 0.2);
  border-color: #ef4444;
  color: #ffffff;
}

/* --- MAIN CONTAINER --- */
main {
  max-width: 1280px;
  margin: 1.5rem auto;
  padding: 0 1.5rem;
}

/* --- MELO COMPONENT CARDS --- */
.melo-card {
  background-color: #ffffff;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.list-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.25rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border-color);
}

.list-header-row h2 {
  font-family: var(--font-title);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--wayslip-gray-dark);
}

/* --- FILTERS PANEL --- */
.filters-panel {
  background-color: #f8fafc;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 1rem;
  margin-bottom: 1.25rem;
}

.filter-group-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
}

.flex-2 { flex: 2; min-width: 250px; }
.flex-1 { flex: 1; min-width: 120px; }

/* --- FORMS & INPUTS --- */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.form-group label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.melo-input {
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 0.5rem 0.75rem;
  font-size: 0.9rem;
  color: var(--text-dark);
  background-color: #ffffff;
  transition: all 0.2s ease;
  outline: none;
  width: 100%;
}

.melo-input:focus {
  border-color: var(--wayslip-yellow);
  box-shadow: 0 0 0 3px rgba(250, 189, 2, 0.15);
}

.melo-input:disabled {
  background-color: #f1f5f9;
  color: var(--text-muted);
  cursor: not-allowed;
}

/* --- BUTTONS --- */
.melo-btn-primary {
  background-color: var(--wayslip-yellow);
  color: var(--wayslip-gray-dark);
  font-weight: 600;
  font-family: var(--font-title);
  border: none;
  border-radius: 6px;
  padding: 0.55rem 1.25rem;
  font-size: 0.9rem;
  transition: background-color 0.2s ease, transform 0.1s ease;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 4px rgba(250,189,2,0.2);
}

.melo-btn-primary:hover:not(:disabled) {
  background-color: var(--wayslip-yellow-dark);
}

.melo-btn-primary:active:not(:disabled) {
  transform: scale(0.98);
}

.melo-btn-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  box-shadow: none;
}

.melo-btn-secondary {
  background-color: #ffffff;
  color: var(--wayslip-gray);
  border: 1px solid var(--border-color);
  font-weight: 600;
  font-family: var(--font-title);
  border-radius: 6px;
  padding: 0.55rem 1.25rem;
  font-size: 0.9rem;
  transition: all 0.2s ease;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.melo-btn-secondary:hover {
  background-color: #f8fafc;
  border-color: #cbd5e1;
}

.melo-btn-success {
  background-color: #15803d;
  color: #ffffff;
  font-weight: 600;
  font-family: var(--font-title);
  border: none;
  border-radius: 6px;
  padding: 0.55rem 1.25rem;
  font-size: 0.9rem;
  transition: background-color 0.2s ease, transform 0.1s ease;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 4px rgba(21,128,61,0.2);
}

.melo-btn-success:hover {
  background-color: #166534;
}

.melo-btn-success:active {
  transform: scale(0.98);
}

/* --- OTHELLO TABLE REJILLA --- */
.othello-grid-container {
  background: #ffffff;
  border-radius: 6px;
  border: 1px solid var(--border-color);
  overflow-x: auto;
}

.othello-grid {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
  text-align: left;
}

.othello-grid th {
  background-color: var(--wayslip-gray);
  color: #ffffff;
  font-weight: 600;
  padding: 0.75rem 1rem;
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  border-bottom: 3px solid var(--wayslip-yellow);
}

.othello-grid td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border-color);
  color: #334155;
  vertical-align: middle;
}

.othello-grid tr:last-child td {
  border-bottom: none;
}

.othello-grid tr:hover td {
  background-color: #f8fafc;
}

/* Badge Estados */
.badge-melo {
  display: inline-block;
  padding: 0.2rem 0.5rem;
  font-size: 0.7rem;
  font-weight: 700;
  border-radius: 4px;
  text-transform: uppercase;
}

.badge-melo.anulado {
  background-color: #fee2e2;
  color: #991b1b;
  border: 1px solid #fca5a5;
}

.badge-melo.enviado {
  background-color: #fff3e0;
  color: #e65100;
  border: 1px solid #ffe0b2;
}

.badge-melo.entregado {
  background-color: #e8f5e9;
  color: #2e7d32;
  border: 1px solid #c8e6c9;
}

.badge-melo.facturado {
  background-color: #e0f2fe;
  color: #0369a1;
  border: 1px solid #bae6fd;
}

/* Acciones en Tabla */
.action-buttons-cell {
  display: flex;
  gap: 0.4rem;
}

.melo-btn-action {
  background-color: #f1f5f9;
  border: 1px solid var(--border-color);
  color: var(--text-dark);
  width: 1.85rem;
  height: 1.85rem;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.melo-btn-action:hover {
  background-color: var(--wayslip-yellow);
  color: #ffffff;
  border-color: var(--wayslip-yellow);
}

.melo-btn-action.btn-delete:hover {
  background-color: #ef4444;
  border-color: #ef4444;
  color: #ffffff;
}

/* --- OVERLAY MODALES --- */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.modal-overlay.show {
  opacity: 1;
  pointer-events: auto;
}

.modal-card {
  background: #ffffff;
  border-radius: 8px;
  width: 100%;
  max-width: 850px;
  max-height: 90vh;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  display: flex;
  flex-direction: column;
  animation: slideUp 0.3s ease-out;
  overflow: hidden;
}

.modal-header {
  background-color: var(--wayslip-gray);
  color: #ffffff;
  padding: 1rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 3px solid var(--wayslip-yellow);
}

.modal-header h3 {
  font-family: var(--font-title);
  font-size: 1.15rem;
  font-weight: 600;
}

.btn-close-modal {
  background: transparent;
  border: none;
  color: #ffffff;
  font-size: 1.5rem;
  cursor: pointer;
  line-height: 1;
  transition: opacity 0.2s ease;
}

.btn-close-modal:hover {
  opacity: 0.7;
}

.modal-body {
  padding: 1.5rem;
  overflow-y: auto;
  flex: 1;
}

.modal-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--border-color);
  background-color: #f8fafc;
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
}

/* --- CONSOLA DIGITAL BÁSCULA LED --- */
.scale-console-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background-color: #f1f5f9;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 0.75rem 1.25rem;
  margin-bottom: 1.25rem;
  gap: 1rem;
}

/* Column 1 (Left): LPR Camera */
.camera-ocr-display {
  width: 240px;
  display: flex;
  flex-direction: column;
  text-align: left;
}

.camera-ocr-title {
  color: var(--text-muted);
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.25rem;
  font-family: var(--font-body);
  font-weight: 700;
}

.camera-ocr-feed {
  background: #000000;
  border: 2px solid var(--wayslip-gray-light);
  border-radius: 6px;
  height: 80px;
  position: relative;
  overflow: hidden;
  box-shadow: inset 0 0 10px rgba(0,0,0,0.8);
}

#ocr-camera-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.55;
  filter: brightness(0.9) contrast(1.2) grayscale(0.2);
}

.ocr-bounding-box {
  position: absolute;
  border: 2px solid #00ff00;
  background-color: rgba(0, 255, 0, 0.15);
  box-shadow: 0 0 8px rgba(0, 255, 0, 0.4);
  border-radius: 3px;
  top: 40%;
  left: 32%;
  width: 36%;
  height: 30%;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  animation: pulse-ocr 1.5s infinite;
}

#ocr-bounding-text {
  color: #00ff00;
  font-family: monospace;
  font-size: 0.65rem;
  font-weight: 900;
  text-shadow: 0 0 4px rgba(0,255,0,0.8);
  letter-spacing: 0.05em;
}

.ocr-status-overlay {
  position: absolute;
  top: 6px;
  left: 8px;
  background-color: rgba(0, 0, 0, 0.7);
  color: #00ff00;
  font-family: monospace;
  font-size: 0.52rem;
  font-weight: 700;
  padding: 0.1rem 0.35rem;
  border-radius: 3px;
  display: flex;
  align-items: center;
  gap: 4px;
  border: 1px solid rgba(0, 255, 0, 0.3);
}

.ocr-status-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background-color: #00ff00;
  box-shadow: 0 0 4px #00ff00;
}

.ocr-status-dot.green {
  background-color: #00ff00;
  animation: blink-ocr-dot 1s infinite;
}

@keyframes pulse-ocr {
  0% { border-color: rgba(0, 255, 0, 0.8); box-shadow: 0 0 4px rgba(0, 255, 0, 0.2); }
  50% { border-color: rgba(0, 255, 0, 1); box-shadow: 0 0 10px rgba(0, 255, 0, 0.6); }
  100% { border-color: rgba(0, 255, 0, 0.8); box-shadow: 0 0 4px rgba(0, 255, 0, 0.2); }
}

@keyframes blink-ocr-dot {
  0% { opacity: 1; }
  50% { opacity: 0.3; }
  100% { opacity: 1; }
}

/* Column 2 (Center): Scale digital LED */
.scale-console {
  background: #090e14;
  border: 2px solid #334155;
  padding: 0.6rem 1.5rem;
  border-radius: 6px;
  box-shadow: inset 0 0 10px rgba(0,0,0,0.8);
  display: inline-flex;
  flex-direction: column;
  min-width: 260px;
}

/* Column 3 (Right): Action button controls */
.scale-controls {
  width: 240px;
  display: flex;
  justify-content: flex-end;
}

.scale-console .scale-title {
  color: #94a3b8;
  font-size: 0.55rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 0.2rem;
  font-family: var(--font-body);
  font-weight: 600;
}

.scale-console .led-display-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.scale-console .led-number {
  font-family: var(--font-digital);
  font-size: 2.2rem;
  color: var(--wayslip-yellow);
  text-shadow: 0 0 8px rgba(250, 189, 2, 0.5);
}

.scale-console .led-status {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  padding: 0.15rem 0.4rem;
  border-radius: 3px;
  color: var(--wayslip-yellow);
  border: 1px solid rgba(250, 189, 2, 0.4);
}

.scale-console .led-status.unstable {
  color: #f59e0b;
  border-color: rgba(245, 158, 11, 0.4);
}

.scale-console .led-number.unstable {
  color: #f59e0b;
  text-shadow: 0 0 8px rgba(245,158,11,0.5);
}

.mock-btn {
  padding: 0.5rem 1rem;
  font-size: 0.8rem;
  background-color: var(--wayslip-gray);
  box-shadow: none;
}

/* --- OVERLOAD BLINKING BANNER --- */
.overload-alert {
  background-color: #fee2e2;
  border: 1px solid #fca5a5;
  color: #b91c1c;
  padding: 0.75rem 1rem;
  border-radius: 6px;
  font-weight: 700;
  font-size: 0.85rem;
  margin-bottom: 1.25rem;
  text-align: center;
  animation: blink 1.5s infinite;
}

/* --- MODAL TAB BAR --- */
.modal-tabs {
  display: flex;
  border-bottom: 2px solid var(--border-color);
  gap: 0.5rem;
}

.modal-tab-btn {
  background: transparent;
  border: none;
  border-bottom: 3px solid transparent;
  padding: 0.6rem 1.25rem;
  font-family: var(--font-title);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s ease;
}

.modal-tab-btn:hover {
  color: var(--text-dark);
}

.modal-tab-btn.active {
  color: var(--wayslip-yellow);
  border-bottom-color: var(--wayslip-yellow);
}

/* --- FORM GRID IN MODAL --- */
.form-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 1rem;
}

.col-12 { grid-column: span 12; }
.col-8 { grid-column: span 8; }
.col-6 { grid-column: span 6; }
.col-4 { grid-column: span 4; }
.col-3 { grid-column: span 3; }

.capture-row {
  display: flex;
  gap: 0.4rem;
}

.capture-row input {
  flex: 1;
}

.autocomplete-wrapper {
  position: relative;
}

.autocomplete-indicator {
  position: absolute;
  right: 0.75rem;
  top: 0.6rem;
  font-size: 0.65rem;
  color: #10b981;
  font-weight: 700;
  pointer-events: none;
  background-color: #e8f5e9;
  padding: 0.1rem 0.35rem;
  border-radius: 3px;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.autocomplete-indicator.show {
  opacity: 1;
}

/* --- ESG SOSTENIBILIDAD CARD --- */
.esg-group-card {
  background-color: #FAF6E6;
  border: 1px solid #F3E5AB;
  border-radius: 6px;
  padding: 1rem;
  margin-top: 0.5rem;
}

.esg-group-card h4 {
  font-family: var(--font-title);
  font-size: 0.85rem;
  color: var(--wayslip-yellow-dark);
  text-transform: uppercase;
  margin-bottom: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.esg-row {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.esg-co2-display {
  background-color: #ffffff;
  border: 1px solid #F3E5AB;
  border-radius: 6px;
  padding: 0.5rem 1.25rem;
  text-align: right;
  min-width: 220px;
}

.esg-co2-display .esg-label {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
}

.esg-co2-display .esg-value {
  font-family: var(--font-title);
  font-size: 1.35rem;
  font-weight: 700;
  color: #10b981;
}

/* --- CANVAS SIGNATURE WRAPPER --- */
.canvas-wrapper {
  background: #f8fafc;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  position: relative;
  height: 120px;
  overflow: hidden;
}

.canvas-wrapper canvas {
  width: 100%;
  height: 100%;
  cursor: crosshair;
}

.canvas-clear-btn {
  position: absolute;
  right: 0.5rem;
  top: 0.5rem;
  background: #ffffff;
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  font-size: 0.65rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.canvas-clear-btn:hover {
  background-color: #fee2e2;
  color: #ef4444;
  border-color: #fca5a5;
}

/* --- PREVISUALIZADOR PDF --- */
.pdf-preview-box {
  border: 1px solid var(--border-color);
  padding: 2rem;
  background-color: #ffffff;
  font-family: 'Courier New', Courier, monospace;
  font-size: 0.8rem;
  color: #000000;
  white-space: pre;
  line-height: 1.4;
  max-height: 450px;
  overflow-y: auto;
}

/* --- OVERLAY DE LOGIN --- */
.login-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: var(--wayslip-gray-dark);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.login-overlay.show {
  opacity: 1;
  pointer-events: auto;
}

.login-card {
  background: #ffffff;
  border-radius: 8px;
  padding: 2.5rem;
  width: 100%;
  max-width: 400px;
  box-shadow: 0 10px 25px rgba(0,0,0,0.5);
  text-align: center;
  border-top: 5px solid var(--wayslip-yellow);
}

.logo-icon-container {
  background-color: #FAF6E6;
  color: var(--wayslip-yellow);
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.25rem auto;
}

.login-card h2 {
  font-family: var(--font-title);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--wayslip-gray-dark);
  margin-bottom: 0.25rem;
}

.login-card p {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-bottom: 1.75rem;
}

.login-form {
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.login-error {
  color: #ef4444;
  font-size: 0.75rem;
  margin-top: 0.5rem;
  text-align: center;
  display: none;
}

/* --- ANIMATIONS & KEYFRAMES --- */
@keyframes slideUp {
  from { transform: translateY(20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

@keyframes pulse {
  0% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.2); opacity: 0.6; }
  100% { transform: scale(1); opacity: 1; }
}

@keyframes blink {
  0% { opacity: 1; }
  50% { opacity: 0.75; }
  100% { opacity: 1; }
}

/* --- PRINT MEDIA --- */
@media print {
  body * {
    visibility: hidden;
  }
  #pdf-preview-content, #pdf-preview-content * {
    visibility: visible;
  }
  #pdf-preview-content {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
  }
  .paper-canvas {
    border: none !important;
    box-shadow: none !important;
    margin: 0 !important;
    padding: 0 !important;
    width: 100% !important;
    height: 100% !important;
    overflow: visible !important;
  }
}

/* --- MAQUETADOR VISUAL DE ALBARANES --- */
.paper-canvas {
  position: relative;
  background: #ffffff;
  border: 1px solid #94a3b8;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
  overflow: hidden;
  transition: all 0.3s ease;
  user-select: none;
}
.paper-canvas.A4 {
  width: 440px;
  height: 622px; /* Aspecto A4 1:1.414 */
}
.paper-canvas.A5 {
  width: 440px;
  height: 311px; /* Aspecto A5 apaisado 1.414:1 */
}
.paper-canvas.Ticket {
  width: 320px;
  height: 620px; /* Cinta de ticket */
  overflow-y: auto;
}

/* Widgets en Lienzo */
.placed-widget {
  position: absolute;
  padding: 0.2rem;
  border: 1px dashed transparent;
  cursor: move;
  box-sizing: border-box;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  user-select: none;
}
.placed-widget:hover {
  border: 1px dashed #fabd02;
  background: rgba(250, 189, 2, 0.05);
}
.placed-widget.selected {
  border: 1.5px solid #fabd02;
  background: rgba(250, 189, 2, 0.1);
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

/* Widgets en Paleta */
.palette-widget-item {
  padding: 0.4rem 0.6rem;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  font-size: 0.72rem;
  font-weight: 600;
  color: #334155;
  cursor: grab;
  text-align: left;
  transition: all 0.2s ease;
  user-select: none;
}
.palette-widget-item:hover {
  border-color: #fabd02;
  background: #fffdf5;
  box-shadow: 0 2px 4px rgba(0,0,0,0.04);
}
.palette-widget-item:active {
  cursor: grabbing;
}
