
.cell-color-ready td[data-cell-field],
.cell-color-ready td.editable,
.cell-color-ready td:has(.cell-select) {
  position: relative;
}

.cell-has-color {
  transition: background-color .15s ease;
}

.cell-color-target {
  outline: 2px solid #872649 !important;
  outline-offset: -2px;
  box-shadow: inset 0 0 0 999px rgba(135, 38, 73, .02);
}

.cell-color-fab {
  position: fixed;
  z-index: 5200;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  border: 1px solid rgba(135, 38, 73, .25);
  background: linear-gradient(135deg, #ffffff 0%, #f7edf1 100%);
  color: #872649;
  box-shadow: 0 14px 34px rgba(32, 12, 22, .24);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  line-height: 1;
}

.cell-color-fab[hidden] {
  display: none !important;
}

.cell-color-fab:hover,
.cell-color-fab:focus {
  transform: translateY(-1px);
  background: #fff;
  outline: 2px solid #872649;
  outline-offset: 2px;
}

.cell-color-popover {
  position: fixed;
  z-index: 6000;
  width: 620px;
  max-width: calc(100vw - 24px);
  max-height: min(86vh, 720px);
  overflow: auto;
  background: #ffffff;
  color: #321622;
  border: 1px solid rgba(135, 38, 73, .18);
  border-radius: 24px;
  box-shadow: 0 30px 90px rgba(32, 12, 22, .30);
  padding: 18px;
}

.cell-color-popover[hidden] {
  display: none !important;
}

.cell-color-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(135, 38, 73, .12);
}

.cell-color-popover-title {
  font-weight: 900;
  color: #5f1932;
  font-size: 1.05rem;
  line-height: 1.15;
}

.cell-color-subtitle {
  margin-top: 3px;
  color: #75636b;
  font-size: .86rem;
}

.cell-color-close {
  border: 0;
  background: #f7edf1;
  color: #872649;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  font-weight: 700;
}

.cell-color-close:hover {
  background: #872649;
  color: #fff;
}

.cell-color-section {
  margin-bottom: 14px;
}

.cell-color-section-title {
  color: #5f1932;
  font-weight: 900;
  font-size: .86rem;
  margin-bottom: 8px;
}

.cell-color-quick-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.cell-color-quick {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(135, 38, 73, .16);
  background: #fff;
  color: #4b2635;
  border-radius: 14px;
  padding: 8px 10px;
  font-weight: 800;
  font-size: .82rem;
  cursor: pointer;
  min-height: 42px;
  text-align: left;
}

.cell-color-quick:hover {
  border-color: #872649;
  background: #fbf7f9;
}

.cell-color-quick span {
  width: 22px;
  height: 22px;
  border-radius: 8px;
  border: 1px solid rgba(95, 25, 50, .25);
  flex: 0 0 auto;
}

.cell-color-clear-quick span {
  background:
    linear-gradient(45deg, transparent 45%, #b00020 46%, #b00020 54%, transparent 55%),
    #ffffff;
}

.cell-color-tools {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  align-items: end;
  gap: 12px;
  padding: 14px;
  margin-bottom: 14px;
  border: 1px solid rgba(135, 38, 73, .12);
  border-radius: 18px;
  background: linear-gradient(135deg, #fbf7f9 0%, #ffffff 100%);
}

.cell-color-custom-label {
  display: grid;
  gap: 7px;
  color: #5f1932;
  font-size: .84rem;
  font-weight: 900;
}

.cell-color-custom {
  width: 100%;
  height: 44px;
  padding: 3px;
  border: 1px solid rgba(135, 38, 73, .22);
  border-radius: 14px;
  background: #fff;
  cursor: pointer;
}

.cell-color-preview-box {
  display: grid;
  gap: 7px;
  color: #5f1932;
  font-size: .84rem;
  font-weight: 900;
}

.cell-color-preview {
  display: block;
  height: 44px;
  border-radius: 14px;
  border: 1px solid rgba(135, 38, 73, .22);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.55);
}

.cell-color-custom-apply {
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, #a12f58 0%, #872649 55%, #5f1932 100%);
  color: #fff;
  font-weight: 900;
  padding: 13px 18px;
  min-height: 44px;
  cursor: pointer;
  box-shadow: 0 12px 24px rgba(135, 38, 73, .24);
  white-space: nowrap;
}

.cell-color-custom-apply:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 30px rgba(135, 38, 73, .30);
}

.cell-color-details {
  border: 1px solid rgba(135, 38, 73, .12);
  border-radius: 18px;
  background: #fff;
  overflow: hidden;
  margin-bottom: 12px;
}

.cell-color-details summary {
  cursor: pointer;
  padding: 12px 14px;
  color: #5f1932;
  font-weight: 900;
  background: #fbf7f9;
  list-style: none;
}

.cell-color-details summary::-webkit-details-marker {
  display: none;
}

.cell-color-details summary::after {
  content: '▾';
  float: right;
  opacity: .7;
}

.cell-color-details[open] summary::after {
  content: '▴';
}

.cell-color-grid {
  display: grid;
  grid-template-columns: repeat(17, 1fr);
  gap: 5px;
  padding: 12px;
  max-height: 245px;
  overflow: auto;
}

.cell-color-btn {
  width: 24px;
  height: 24px;
  border-radius: 7px;
  border: 1px solid rgba(95, 25, 50, .22);
  cursor: pointer;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.45);
}

.cell-color-btn:hover,
.cell-color-btn:focus {
  outline: 2px solid #872649;
  outline-offset: 2px;
  transform: scale(1.08);
}

.cell-color-remove {
  width: 100%;
  border: 1px solid rgba(135, 38, 73, .20);
  background: #fff;
  color: #5f1932;
  border-radius: 999px;
  padding: 11px 14px;
  font-weight: 900;
  cursor: pointer;
}

.cell-color-remove:hover {
  background: #f7edf1;
  border-color: #872649;
}

.cell-color-help {
  margin-top: 9px;
  font-size: .78rem;
  color: #75636b;
}

@media print {
  .cell-color-popover,
  .cell-color-fab {
    display: none !important;
  }
  .cell-has-color {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
}

@media (max-width: 768px) {
  .cell-color-popover {
    left: 12px !important;
    right: 12px !important;
    top: auto !important;
    bottom: 12px !important;
    width: auto;
    max-width: none;
    max-height: 82vh;
    padding: 14px;
  }

  .cell-color-quick-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .cell-color-tools {
    grid-template-columns: 1fr;
  }

  .cell-color-custom-apply {
    width: 100%;
  }

  .cell-color-grid {
    grid-template-columns: repeat(8, 1fr);
  }

  .cell-color-btn {
    width: 100%;
    height: 30px;
  }
}

@media (max-width: 480px) {
  .cell-color-quick-grid {
    grid-template-columns: 1fr;
  }

  .cell-color-grid {
    grid-template-columns: repeat(5, 1fr);
  }
}


/* === FINAL UI OVERRIDES selector color celda - 20260723-color-ui-final === */
body .cell-color-popover {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif !important;
  background: #ffffff !important;
  color: #321622 !important;
  border: 1px solid rgba(135, 38, 73, .18) !important;
  border-radius: 24px !important;
  box-shadow: 0 30px 90px rgba(32, 12, 22, .30) !important;
  padding: 18px !important;
  width: 620px !important;
  max-width: calc(100vw - 24px) !important;
  max-height: min(86vh, 720px) !important;
  overflow: auto !important;
}

body .cell-color-popover-title::after {
  content: "" !important;
}

body .cell-color-panel-head {
  display: flex !important;
  align-items: flex-start !important;
  justify-content: space-between !important;
  gap: 16px !important;
  margin-bottom: 14px !important;
  padding-bottom: 12px !important;
  border-bottom: 1px solid rgba(135, 38, 73, .12) !important;
}

body .cell-color-popover-title {
  font-weight: 900 !important;
  color: #5f1932 !important;
  font-size: 1.05rem !important;
  line-height: 1.15 !important;
  margin: 0 !important;
}

body .cell-color-subtitle {
  margin-top: 4px !important;
  color: #75636b !important;
  font-size: .86rem !important;
}

body .cell-color-close {
  appearance: none !important;
  -webkit-appearance: none !important;
  border: 0 !important;
  background: #f7edf1 !important;
  color: #872649 !important;
  width: 34px !important;
  height: 34px !important;
  border-radius: 999px !important;
  font-size: 22px !important;
  line-height: 1 !important;
  cursor: pointer !important;
  font-weight: 800 !important;
  padding: 0 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
}

body .cell-color-close:hover {
  background: #872649 !important;
  color: #ffffff !important;
}

body .cell-color-section-title {
  color: #5f1932 !important;
  font-weight: 900 !important;
  font-size: .86rem !important;
  margin-bottom: 8px !important;
}

body .cell-color-quick-grid {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 8px !important;
}

body .cell-color-quick {
  appearance: none !important;
  -webkit-appearance: none !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;
  border: 1px solid rgba(135, 38, 73, .16) !important;
  background: #ffffff !important;
  color: #4b2635 !important;
  border-radius: 14px !important;
  padding: 8px 10px !important;
  font-weight: 800 !important;
  font-size: .82rem !important;
  cursor: pointer !important;
  min-height: 42px !important;
  text-align: left !important;
  box-shadow: none !important;
}

body .cell-color-quick:hover {
  border-color: #872649 !important;
  background: #fbf7f9 !important;
}

body .cell-color-quick span {
  width: 22px !important;
  height: 22px !important;
  border-radius: 8px !important;
  border: 1px solid rgba(95, 25, 50, .25) !important;
  flex: 0 0 auto !important;
}

body .cell-color-tools {
  display: grid !important;
  grid-template-columns: 1fr 1fr auto !important;
  align-items: end !important;
  gap: 12px !important;
  padding: 14px !important;
  margin: 14px 0 !important;
  border: 1px solid rgba(135, 38, 73, .12) !important;
  border-radius: 18px !important;
  background: linear-gradient(135deg, #fbf7f9 0%, #ffffff 100%) !important;
}

body .cell-color-custom-label,
body .cell-color-preview-box {
  display: grid !important;
  gap: 7px !important;
  color: #5f1932 !important;
  font-size: .84rem !important;
  font-weight: 900 !important;
}

body .cell-color-custom {
  width: 100% !important;
  height: 44px !important;
  padding: 3px !important;
  border: 1px solid rgba(135, 38, 73, .22) !important;
  border-radius: 14px !important;
  background: #fff !important;
  cursor: pointer !important;
}

body .cell-color-preview {
  display: block !important;
  height: 44px !important;
  border-radius: 14px !important;
  border: 1px solid rgba(135, 38, 73, .22) !important;
}

body .cell-color-custom-apply {
  appearance: none !important;
  -webkit-appearance: none !important;
  border: 0 !important;
  border-radius: 999px !important;
  background: linear-gradient(135deg, #a12f58 0%, #872649 55%, #5f1932 100%) !important;
  color: #fff !important;
  font-weight: 900 !important;
  padding: 13px 18px !important;
  min-height: 44px !important;
  cursor: pointer !important;
  box-shadow: 0 12px 24px rgba(135, 38, 73, .24) !important;
  white-space: nowrap !important;
  font-size: .92rem !important;
}

body .cell-color-details {
  border: 1px solid rgba(135, 38, 73, .12) !important;
  border-radius: 18px !important;
  background: #fff !important;
  overflow: hidden !important;
  margin-bottom: 12px !important;
}

body .cell-color-details summary {
  cursor: pointer !important;
  padding: 12px 14px !important;
  color: #5f1932 !important;
  font-weight: 900 !important;
  background: #fbf7f9 !important;
  list-style: none !important;
}

body .cell-color-grid {
  display: grid !important;
  grid-template-columns: repeat(17, 1fr) !important;
  gap: 5px !important;
  padding: 12px !important;
  max-height: 245px !important;
  overflow: auto !important;
}

body .cell-color-btn {
  appearance: none !important;
  -webkit-appearance: none !important;
  width: 24px !important;
  height: 24px !important;
  border-radius: 7px !important;
  border: 1px solid rgba(95, 25, 50, .22) !important;
  cursor: pointer !important;
  padding: 0 !important;
}

body .cell-color-remove {
  appearance: none !important;
  -webkit-appearance: none !important;
  width: 100% !important;
  border: 1px solid rgba(135, 38, 73, .20) !important;
  background: #fff !important;
  color: #5f1932 !important;
  border-radius: 999px !important;
  padding: 11px 14px !important;
  font-weight: 900 !important;
  cursor: pointer !important;
  box-shadow: none !important;
}

body .cell-color-help {
  margin-top: 9px !important;
  font-size: .78rem !important;
  color: #75636b !important;
}

@media (max-width: 768px) {
  body .cell-color-popover {
    left: 12px !important;
    right: 12px !important;
    top: auto !important;
    bottom: 12px !important;
    width: auto !important;
    max-width: none !important;
    max-height: 82vh !important;
  }
  body .cell-color-quick-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
  body .cell-color-tools {
    grid-template-columns: 1fr !important;
  }
  body .cell-color-custom-apply {
    width: 100% !important;
  }
  body .cell-color-grid {
    grid-template-columns: repeat(8, 1fr) !important;
  }
}
