.create-event-module {
  max-width: 1280px;
  margin: 0 auto;
  padding: 24px;
}

.create-event-card {
  background: #ffffff;
  border: 1px solid #dbe4ea;
  border-radius: 22px;
  padding: 22px;
  box-shadow: 0 10px 30px rgba(7, 29, 43, 0.06);
  margin-bottom: 18px;
}

.create-event-card h1,
.create-event-card h2 {
  color: #071d2b;
  margin-top: 0;
}

.create-event-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.create-event-field {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.create-event-field span {
  font-size: 13px;
  font-weight: 800;
  color: #071d2b;
}

.create-event-field input,
.create-event-field select,
.create-event-field textarea {
  min-height: 46px;
  border: 1px solid #dbe4ea;
  border-radius: 14px;
  padding: 11px 13px;
  outline: none;
}

.create-event-field.wide {
  grid-column: 1 / -1;
}

.create-event-actions {
  position: sticky;
  bottom: 14px;
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid #dbe4ea;
  border-radius: 18px;
  padding: 14px;
  backdrop-filter: blur(14px);
}

.create-event-btn {
  border: none;
  border-radius: 14px;
  padding: 12px 18px;
  font-weight: 900;
  cursor: pointer;
}

.create-event-btn.primary {
  background: #071d2b;
  color: #ffffff;
}

.create-event-btn.success {
  background: #12a86b;
  color: #ffffff;
}

.create-event-btn.secondary {
  background: #edf3f6;
  color: #071d2b;
}

.create-event-status {
  display: inline-flex;
  background: #e6f2a4;
  color: #071d2b;
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 900;
  margin-bottom: 12px;
}

.create-event-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.create-event-item {
  border: 1px solid #dbe4ea;
  border-radius: 14px;
  padding: 12px;
  background: #fbfdfe;
}

@media (max-width: 860px) {
  .create-event-module {
    padding: 14px;
  }

  .create-event-grid {
    grid-template-columns: 1fr;
  }

  .create-event-actions {
    position: static;
    flex-direction: column;
  }

  .create-event-btn {
    width: 100%;
  }
}

.create-event-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 18px;
  align-items: start;
}

.create-event-main {
  min-width: 0;
}

.create-event-summary {
  position: sticky;
  top: 88px;
}

.create-event-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
}

.create-event-head-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.create-event-summary-line {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 11px 0;
  border-bottom: 1px solid #dbe4ea;
  font-size: 13px;
}

.create-event-summary-line span {
  color: #667786;
}

.create-event-summary-line strong {
  color: #071d2b;
  text-align: right;
}

.create-event-summary-box {
  margin-top: 14px;
  border-radius: 16px;
  padding: 14px;
  background: #071d2b;
  color: #ffffff;
}

.create-event-summary-box.soft {
  background: rgba(230, 242, 164, 0.55);
  color: #071d2b;
}

.create-event-summary-box h3 {
  margin: 0 0 8px;
  font-size: 15px;
}

.create-event-summary-box p {
  margin: 0;
  font-size: 13px;
}

@media (max-width: 1100px) {
  .create-event-layout {
    grid-template-columns: 1fr;
  }

  .create-event-summary {
    position: static;
  }
}

@media (max-width: 860px) {
  .create-event-head {
    flex-direction: column;
  }

  .create-event-head-actions {
    width: 100%;
  }

  .create-event-head-actions .create-event-btn {
    width: 100%;
  }
}

#createEventModule #ceNewEventBtn {
  background: #E6F2A4;
  color: #01283F;
  border: 1px solid #d4e58a;
  font-weight: 700;
  box-shadow: 0 6px 18px rgba(1, 40, 63, 0.10);
  transition: all 0.2s ease;
}

#createEventModule #ceNewEventBtn:hover {
  background: #ddeb8d;
  color: #001c2c;
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(1, 40, 63, 0.16);
}

#createEventModule #ceNewEventBtn:active {
  transform: translateY(0);
  box-shadow: 0 4px 10px rgba(1, 40, 63, 0.10);
}

/* BOTÓN NUEVO EVENTO - AJUSTE VISUAL */
#ceNewEventBtn {
  background: #E6F2A4 !important;
  color: #061D2C !important;
  border: 1px solid #cfe276 !important;
  font-weight: 900 !important;
  box-shadow: 0 8px 18px rgba(6, 29, 44, 0.14) !important;
  transition: all 0.18s ease !important;
}

#ceNewEventBtn:hover {
  background: #d8ec82 !important;
  color: #061D2C !important;
  transform: translateY(-1px);
  box-shadow: 0 12px 24px rgba(6, 29, 44, 0.20) !important;
}

#ceNewEventBtn:active {
  transform: translateY(0);
  box-shadow: 0 6px 14px rgba(6, 29, 44, 0.14) !important;
}


/* SECCIONES COMPLETAS CREAR EVENTO */
.create-event-section-row {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
}

.create-event-section-row p {
  margin: 4px 0 0;
  color: #667786;
}

.create-event-btn.warning {
  background: #f2b84b;
  color: #061D2C;
}

.create-event-empty {
  border: 1px dashed #dce7ee;
  border-radius: 14px;
  padding: 14px;
  color: #667786;
  background: #fbfdfe;
}

.ce-item-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.ce-small-btn {
  border: 1px solid #dce7ee;
  background: #ffffff;
  color: #061D2C;
  border-radius: 12px;
  padding: 8px 10px;
  font-weight: 900;
}

.ce-danger-btn {
  border: 1px solid rgba(226, 87, 87, 0.35);
  background: #fff4f4;
  color: #e25757;
  border-radius: 12px;
  padding: 8px 10px;
  font-weight: 900;
}

.ce-modal {
  position: fixed;
  inset: 0;
  background: rgba(6, 29, 44, 0.58);
  z-index: 200;
  display: grid;
  place-items: center;
  padding: 18px;
}

.ce-modal.hidden {
  display: none;
}

.ce-modal-panel {
  width: min(680px, 100%);
  max-height: 88vh;
  overflow: auto;
  background: #ffffff;
  border-radius: 24px;
  padding: 22px;
  box-shadow: 0 24px 70px rgba(6, 29, 44, 0.28);
}

.ce-modal-panel.large {
  width: min(980px, 100%);
}

.ce-modal-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 16px;
}

.ce-modal-header h2 {
  margin: 0 0 6px;
  color: #061D2C;
}

.ce-modal-header p {
  margin: 0;
  color: #667786;
}

.ce-modal-close {
  width: 42px;
  height: 42px;
  border: none;
  border-radius: 14px;
  background: #edf3f6;
  color: #061D2C;
  font-size: 24px;
  font-weight: 900;
}

.ce-modal-filters {
  display: grid;
  grid-template-columns: minmax(260px, 1.7fr) minmax(180px, 0.9fr) minmax(140px, 0.7fr);
  gap: 12px;
  margin-bottom: 18px;
  align-items: center;
}

.ce-modal-filters input,
.ce-modal-filters select {
  width: 100%;
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid #c9d7e3;
  border-radius: 12px;
  background: #ffffff;
  font-size: 14px;
  font-weight: 500;
  color: #23384d;
}

.ce-modal-filters input::placeholder {
  color: #8a9aae;
  font-weight: 400;
}

.ce-inventory-row {
  display: grid;
  grid-template-columns: minmax(260px, 1.7fr) minmax(120px, 0.8fr) minmax(150px, 0.8fr);
  gap: 16px;
  align-items: center;
  padding: 14px 16px;
  border: 1px solid #d6e1ea;
  border-radius: 14px;
  background: #ffffff;
  margin-bottom: 10px;
}

.ce-inventory-row > div:first-child strong {
  display: block;
  margin-bottom: 4px;
  font-size: 16px;
  line-height: 1.2;
  font-weight: 500;
  color: #2f4254;
}

.ce-inventory-row > div:first-child span {
  display: block;
  font-size: 12px;
  line-height: 1.35;
  font-weight: 400;
  color: #7b8da1;
}

.ce-inventory-row > div:nth-child(2) {
  text-align: center;
}

.ce-inventory-row > div:nth-child(2) span {
  display: block;
  font-size: 12px;
  margin-bottom: 4px;
  color: #7b8da1;
  font-weight: 400;
}

.ce-inventory-row > div:nth-child(2) strong {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: #16324a;
}

.ce-qty-input {
  width: 86px;
  min-height: 36px;
  padding: 0 10px;
  border: 1px solid #c9d7e3;
  border-radius: 12px;
  background: #ffffff;
  font-size: 14px;
  font-weight: 500;
  color: #23384d;
  text-align: center;
}

.ce-inventory-row .create-event-btn {
  min-height: 36px;
  padding: 0 16px;
  font-size: 14px;
  font-weight: 700;
  border-radius: 12px;
}

@media (max-width: 860px) {
  .ce-modal-filters {
    grid-template-columns: 1fr;
  }

  .ce-inventory-row {
    grid-template-columns: 1fr;
  }

  .ce-inventory-row > div:nth-child(2) {
    text-align: left;
  }

  .ce-qty-input {
    max-width: 100%;
  }
}

.ce-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 18px;
}

@media (max-width: 860px) {
  .create-event-section-row {
    flex-direction: column;
  }

  .create-event-section-row .create-event-btn {
    width: 100%;
  }

  .ce-modal {
    padding: 0;
    place-items: stretch;
  }

  .ce-modal-panel,
  .ce-modal-panel.large {
    width: 100%;
    height: 100vh;
    max-height: 100vh;
    border-radius: 0;
  }

  .ce-modal-filters,
  .ce-inventory-row {
    grid-template-columns: 1fr;
  }

  .ce-item-actions {
    justify-content: flex-start;
  }
}


/* AUTOCOMPLETADO CLIENTES / PROVEEDORES */
.create-event-field {
  position: relative;
}

.ce-autocomplete-list {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 6px);
  background: #ffffff;
  border: 1px solid #dce7ee;
  border-radius: 16px;
  box-shadow: 0 18px 40px rgba(6, 29, 44, 0.18);
  z-index: 260;
  overflow: hidden;
  max-height: 280px;
  overflow-y: auto;
}

.ce-autocomplete-list.hidden {
  display: none;
}

.ce-autocomplete-option {
  width: 100%;
  border: none;
  background: #ffffff;
  padding: 12px 14px;
  text-align: left;
  cursor: pointer;
  border-bottom: 1px solid #edf3f6;
}

.ce-autocomplete-option:hover {
  background: #E6F2A4;
}

.ce-autocomplete-option strong {
  display: block;
  color: #061D2C;
  font-size: 14px;
}

.ce-autocomplete-option small {
  display: block;
  color: #667786;
  font-size: 12px;
  margin-top: 3px;
}


/* FIX FINAL MODAL INVENTARIO - BOTÓN AL LADO DE CANTIDAD */
.ce-inventory-row {
  display: grid !important;
  grid-template-columns: minmax(260px, 1fr) 110px 96px 100px !important;
  gap: 12px !important;
  align-items: center !important;
  padding: 14px 16px !important;
  border: 1px solid #d6e1ea !important;
  border-radius: 14px !important;
  background: #ffffff !important;
  margin-bottom: 10px !important;
}

.ce-inventory-row > div:first-child strong {
  display: block !important;
  margin-bottom: 4px !important;
  font-size: 14px !important;
  line-height: 1.25 !important;
  font-weight: 600 !important;
  color: #263f55 !important;
}

.ce-inventory-row > div:first-child span {
  display: block !important;
  font-size: 11px !important;
  line-height: 1.35 !important;
  font-weight: 400 !important;
  color: #71859a !important;
}

.ce-inventory-row > div:nth-child(2) {
  text-align: center !important;
}

.ce-inventory-row > div:nth-child(2) span {
  display: block !important;
  font-size: 11px !important;
  margin-bottom: 2px !important;
  color: #71859a !important;
  font-weight: 400 !important;
}

.ce-inventory-row > div:nth-child(2) strong {
  display: block !important;
  font-size: 14px !important;
  font-weight: 600 !important;
  color: #102a43 !important;
}

.ce-qty-input {
  width: 100% !important;
  max-width: 90px !important;
  min-height: 36px !important;
  padding: 0 10px !important;
  border: 1px solid #c9d7e3 !important;
  border-radius: 12px !important;
  background: #ffffff !important;
  font-size: 14px !important;
  font-weight: 500 !important;
  color: #23384d !important;
  text-align: center !important;
  box-sizing: border-box !important;
}

.ce-inventory-row .create-event-btn {
  width: 100% !important;
  min-height: 36px !important;
  padding: 0 12px !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  border-radius: 12px !important;
  white-space: nowrap !important;
}

.ce-modal-filters input,
.ce-modal-filters select {
  min-height: 38px !important;
  padding: 0 12px !important;
  font-size: 13px !important;
  font-weight: 500 !important;
  border-radius: 12px !important;
}

@media (max-width: 860px) {
  .ce-inventory-row {
    grid-template-columns: 1fr !important;
  }

  .ce-inventory-row > div:nth-child(2) {
    text-align: left !important;
  }

  .ce-qty-input {
    max-width: 100% !important;
  }
}


/* MODAL BUSCAR EVENTO */
.ce-event-search-filters {
  display: grid;
  grid-template-columns: 1fr 220px;
  gap: 12px;
  margin-bottom: 16px;
}

.ce-event-search-filters input,
.ce-event-search-filters select {
  width: 100%;
  min-height: 42px;
  border: 1px solid #dce7ee;
  border-radius: 14px;
  padding: 10px 13px;
  font-size: 14px;
  color: #061D2C;
  background: #ffffff;
  box-sizing: border-box;
}

.ce-event-search-list {
  display: grid;
  gap: 10px;
}

.ce-event-search-row {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) 130px 190px;
  gap: 12px;
  align-items: center;
  border: 1px solid #dce7ee;
  border-radius: 16px;
  padding: 14px;
  background: #fbfdfe;
}

.ce-event-search-row strong {
  display: block;
  color: #061D2C;
  font-size: 14px;
  font-weight: 700;
}

.ce-event-search-row span {
  display: block;
  color: #667786;
  font-size: 12px;
  margin-top: 4px;
  line-height: 1.35;
}

.ce-event-search-status {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  border-radius: 999px;
  padding: 8px 10px;
  background: #E6F2A4;
  color: #061D2C;
  font-size: 12px;
  font-weight: 700;
}

.ce-event-search-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

.ce-event-search-actions .create-event-btn {
  min-height: 36px;
  padding: 0 12px;
  font-size: 13px;
  font-weight: 600;
  border-radius: 12px;
}

@media (max-width: 860px) {
  .ce-event-search-filters,
  .ce-event-search-row {
    grid-template-columns: 1fr;
  }

  .ce-event-search-actions {
    justify-content: stretch;
  }

  .ce-event-search-actions .create-event-btn {
    width: 100%;
  }
}


/* ESTADOS EN MODAL BUSCAR EVENTO */
.ce-event-search-status {
  min-width: 120px;
  justify-content: center;
  text-align: center;
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 700;
}

.ce-event-search-status.status-draft {
  background: #E6F2A4;
  color: #061D2C;
}

.ce-event-search-status.status-confirmed {
  background: #dbeafe;
  color: #1d4ed8;
}

.ce-event-search-status.status-preparation {
  background: #d1fae5;
  color: #047857;
}

.ce-event-search-status.status-closed {
  background: #e5e7eb;
  color: #374151;
}

.ce-event-search-status.status-cancelled {
  background: #fee2e2;
  color: #b91c1c;
}

.ce-event-search-status.status-archived {
  background: #f3f4f6;
  color: #6b7280;
}


/* MODAL REVISAR CIERRE */
.ce-closure-summary {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 14px;
  align-items: center;
  border: 1px solid #dce7ee;
  border-radius: 18px;
  padding: 16px;
  margin-bottom: 14px;
  background: #fbfdfe;
}

.ce-closure-summary strong {
  display: block;
  color: #061D2C;
  font-size: 16px;
  font-weight: 700;
}

.ce-closure-summary span {
  display: block;
  color: #667786;
  font-size: 13px;
  margin-top: 4px;
}

.ce-closure-badge {
  border-radius: 999px;
  padding: 9px 14px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.ce-closure-badge.ok {
  background: #d1fae5;
  color: #047857;
}

.ce-closure-badge.warning {
  background: #fff3cd;
  color: #92400e;
}

.ce-closure-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

.ce-closure-metrics div {
  border: 1px solid #dce7ee;
  border-radius: 16px;
  padding: 14px;
  background: #ffffff;
}

.ce-closure-metrics span {
  display: block;
  color: #667786;
  font-size: 12px;
}

.ce-closure-metrics strong {
  display: block;
  color: #061D2C;
  font-size: 24px;
  margin-top: 4px;
}

.ce-closure-message {
  border-radius: 16px;
  padding: 14px;
  margin-bottom: 14px;
  font-weight: 700;
}

.ce-closure-message.ok {
  background: #d1fae5;
  color: #047857;
}

.ce-closure-message.warning {
  background: #fff7d6;
  color: #92400e;
}

.ce-closure-list {
  display: grid;
  gap: 10px;
}

.ce-closure-item {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) 90px 90px 90px;
  gap: 12px;
  align-items: center;
  border: 1px solid #dce7ee;
  border-radius: 16px;
  padding: 14px;
  background: #ffffff;
}

.ce-closure-item.missing {
  border-color: rgba(226, 87, 87, 0.35);
  background: #fffafa;
}

.ce-closure-item.ok {
  border-color: rgba(4, 120, 87, 0.25);
}

.ce-closure-item strong {
  display: block;
  color: #061D2C;
  font-size: 14px;
  font-weight: 700;
}

.ce-closure-item span {
  display: block;
  color: #667786;
  font-size: 12px;
  margin-top: 4px;
}

.ce-closure-item > div:not(:first-child) {
  text-align: center;
}

.ce-closure-item > div:not(:first-child) strong {
  font-size: 18px;
}

.ce-closure-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 18px;
}

@media (max-width: 860px) {
  .ce-closure-summary,
  .ce-closure-metrics,
  .ce-closure-item {
    grid-template-columns: 1fr;
  }

  .ce-closure-item > div:not(:first-child) {
    text-align: left;
  }

  .ce-closure-actions {
    flex-direction: column;
  }

  .ce-closure-actions .create-event-btn {
    width: 100%;
  }
}


/* AJUSTE BOTONES MODAL BUSCAR EVENTO */
.ce-event-search-row {
  grid-template-columns: minmax(260px, 1fr) 120px 280px !important;
}

.ce-event-search-actions {
  display: flex !important;
  gap: 8px !important;
  justify-content: flex-end !important;
  align-items: center !important;
}

.ce-event-search-actions .create-event-btn {
  min-width: 78px !important;
  width: auto !important;
  white-space: nowrap !important;
  font-size: 12px !important;
  font-weight: 600 !important;
}

.ce-event-search-actions [data-review-close-event] {
  min-width: 118px !important;
}

@media (max-width: 860px) {
  .ce-event-search-row {
    grid-template-columns: 1fr !important;
  }

  .ce-event-search-actions {
    justify-content: stretch !important;
    flex-direction: column !important;
  }

  .ce-event-search-actions .create-event-btn {
    width: 100% !important;
    min-width: 100% !important;
  }
}


/* BOTONES CIERRE EVENTO */
.create-event-btn.success {
  background: #18a66a;
  color: #ffffff;
}

.create-event-btn.success:hover {
  background: #128454;
}

.create-event-btn.danger {
  background: #fff4f4;
  color: #b91c1c;
  border: 1px solid rgba(185, 28, 28, 0.35);
}

.create-event-btn.danger:hover {
  background: #fee2e2;
}


/* ESTADOS DE CIERRE EVENTOS */
.ce-event-search-status.status-pending-close {
  background: #fff3cd;
  color: #92400e;
}

.ce-event-search-status.status-closed-issues {
  background: #fee2e2;
  color: #b91c1c;
}

