/* ===============================
   Global Reset & Defaults
=============================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

main {
  flex: 1;
  margin-top: 75px;
  /* Takes up all remaining space */
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  font-family: "Avenir Next", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  background: #f6f8fd;
  color: var(--text-dark);
  flex: 1;
}

a {
  text-decoration: none;
  color: inherit;
}

/* ===============================
   Hero Section
=============================== */
.hero {
  text-align: center;
}

.hero-container {
  max-width: 1050px;
  margin: 0 auto;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(37, 99, 235, 0.1);
  color: var(--fintech-blue);
  padding: 8px 16px;
  border-radius: 50px;
  font-size: 1.3rem;
  font-weight: 550;
}

.hero-description {
  font-size: 1rem;
  color: var(--text-black);
  max-width: 1050px;
  margin: 10px auto 0px;
  text-align: left;
}

/* ===============================
   Section Toggle Buttons
=============================== */
.toggle-btn {
  align-self: flex-start;
  margin-top: 1rem;
  padding: 0.6rem 1rem;
  background: #2563eb;
  color: white;
  border: none;
  border-radius: 0.5rem;
  cursor: pointer;
  transition: background 0.2s ease;
  font-size: 1rem;
  font-weight: 554;
}

.toggle-btn:hover {
  background: #1d4ed8;
}

.hidden {
  display: none;
}

/* ===============================
   Containers & Animations
=============================== */
.inline-container {
  display: block;
  opacity: 1;
  transform: translateY(0);
  transition: all 0.35s ease;
}

.animated-container {
  font-family: "Avenir Next", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  background: #ffffff;
  border-radius: 12px;
  width: 100%;
  overflow: visible;
  opacity: 0;
  transform: translateY(-10px);
  transition: all 0.35s ease;
}

.animated-container.show {
  opacity: 1;
  transform: translateY(0);
}

/* ===============================
   Table Containers
=============================== */
#internalTableContainer,
#externalTableContainer {
  width: 90%;
  margin: 1rem auto;
  padding: 1rem;
  border-radius: 10px;
  box-shadow: 2px 3px 8px #0000004d;
  background: linear-gradient(90deg, rgb(205 201 237 / 62%), rgb(191 228 245 / 77%));
}

#internalTable,
#externalTable {
  background: #ffffffa1;
}

#internalOperationsTypeFilter{
    padding: 8px 10px;
    border: 1px solid rgb(255, 255, 255);
    border-radius: 10px;
    font-family: inherit;
    font-size: 14px;
    cursor: pointer;
    background-color: rgba(37, 99, 235, 0.1);
    color: rgb(15, 15, 15);
}
/* ===============================
   Table Structure
=============================== */
table {
  border-collapse: collapse;
  width: 100%;
  table-layout: fixed;
}

thead th {
  font-family: "Avenir Next", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  padding: 4px 4px;
  font-size: 0.7rem;
  letter-spacing: 0.2px;
  font-weight: 600;
  text-align: left;
  text-transform: uppercase;
  border: 1px solid #ddd;
  white-space: normal;
  word-wrap: break-word;
  overflow: visible;
}

tbody td {
  font-family: "Avenir Next", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  padding: 4px 8px;
  font-size: 12px;
  font-weight: 500;
  border: 1px solid #ddd;
  white-space: normal;
  word-wrap: break-word;
  overflow: visible;
}

thead {
  display: table;
  width: calc(100% - 16.5px);
  table-layout: fixed;
}

tbody {
  display: block;
  max-height: 500px;
  overflow-y: scroll;
  width: 100%;
}

tbody tr {
  font-family: "Avenir Next", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  display: table;
  width: 100%;
  table-layout: fixed;
}

/* ===============================
   Info Icon & Tooltip
=============================== */
.info-container {
  position: relative;
  /* anchor for popover */
  display: inline-flex;
  align-items: center;
}

.info-icon {
  cursor: pointer;
  font-size: 14px;
  color: #e6eaee3b;
  user-select: none;
  line-height: 1;
  margin-left: 6px;
}

.info-popover {
  display: none;
  margin-top: 6px;
  padding: 8px 12px;
  background: #f5f8ffa1;
  border-left: 4px solid #e1eaf8;
  border-radius: 6px;
  font-size: 13px;
  color: #555;
  box-shadow: none;
  width: 100%;
}

.info-container:hover .info-popover,
.info-popover.active {
  display: block;
}

/* ===============================
   Dropdown Editors
=============================== */
.event-category-dropdown,
.activity-type-dropdown {
  width: 100%;
  height: 34px;
  padding: 6px 36px 6px 12px;
  font-size: 13px;
  font-weight: 500;
  font-family: "Avenir Next", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  color: #1f2937;
  background-color: #ffffff;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  cursor: pointer;
  outline: none;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;

  background-image:
    linear-gradient(45deg, transparent 50%, #6b7280 50%),
    linear-gradient(135deg, #6b7280 50%, transparent 50%),
    linear-gradient(to right, #e5e7eb, #e5e7eb);
  background-position:
    calc(100% - 18px) 14px,
    calc(100% - 12px) 14px,
    calc(100% - 32px) 50%;
  background-size:
    6px 6px,
    6px 6px,
    1px 60%;
  background-repeat: no-repeat;

  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    background-color 0.2s ease;
}

.event-category-dropdown:focus,
.activity-type-dropdown:focus {
  background-color: #ffffff;
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.18);
}

.event-category-dropdown:disabled,
.activity-type-dropdown:disabled {
  background-color: #f3f4f6;
  color: #9ca3af;
  border-color: #e5e7eb;
  cursor: not-allowed;
}

/* ===============================
   Buttons
=============================== */
button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 14px;
  margin-right: 8px;
  margin-bottom: 10px;
  font-size: 14px;
  font-weight: 500;
  color: #ffffff;
  background-color: #467ef7;
  /* blue */
  border: none;
  width: fit-content;
  border-radius: 6px;
  cursor: pointer;
  transition: background-color 0.2s, transform 0.1s;
}

button {
  transform: translateY(-1px);
}

.delete-btn:hover {
  background-color: red;
}

/* ===============================
   Modals
=============================== */
.modal {
  position: fixed;
  inset: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  background: rgba(0, 0, 0, 0.6);
  z-index: 9999;
}

.innermodal {
  position: relative;
  background: linear-gradient(90deg, rgba(205, 201, 237, 0.971));
  border-radius: 12px;
  max-width: 800px;
  width: 90%;
  padding: 1rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.library-innermodal {
  position: relative;
  background: linear-gradient(90deg, rgba(205, 201, 237, 0.971));
  border-radius: 12px;
  top: 45px;
  max-height: 630px;
  width: auto;
  padding: 1rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

#statusMessage {
  margin: 5px auto;
  padding: 5px;
  border-radius: 5px;
  text-align: center;
}

.deleteModal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  justify-content: center;
  align-items: center;
}

/* ===============================
   Modal Controls
=============================== */
.closeVideoModal {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  cursor: pointer;
  font-size: 1.8rem;
  color: #080808;
  font-weight: bold;
  z-index: 10;
}

.videoLibraryModal-searchbar {
  margin-bottom: 15px;
  display: flex;
}

.videoSearchInput {
  width: 35%;
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid #ccc;
  margin: 0px auto;
}

/* ===============================
   Table Empty / No Results State
=============================== */
.no-result-msg {
  display: none;
  text-align: center;
  padding: 16px;
  color: #0b0b0b;
  font-style: italic;
}

/* ===============================
   Time Filter (Table Utility)
=============================== */
/* Wrapper for the time filter (optional, for positioning next to Add Row or search) */
.time-filter-wrapper {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: 12px;
  position: relative;
  font-family: "Avenir Next", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
}

/* The actual input field */
.single-time-picker {
  padding: 6px 0px;
  font-size: 14px;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  outline: none;
  width: fit-content;
  cursor: pointer;
  transition: var(--transition-smooth);
  background-color: rgba(230, 230, 230, 0.05);
  color: var(--text-dark);
}

/* Focus state with subtle glow */
.single-time-picker:focus {
  border-color: var(--fintech-blue);
  box-shadow: var(--shadow-glow);
}

/* Optional hover effect */
.single-time-picker:hover {
  border-color: var(--fintech-blue);
}

/* Placeholder styling (if browser supports) */
.single-time-picker::placeholder {
  color: var(--text-muted);
  font-style: italic;
}

/* Optional: make input consistent with buttons */
.time-filter-btn {
  padding: 6px 12px;
  font-size: 14px;
  font-weight: 500;
  background-color: var(--fintech-blue);
  color: #fff !important;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.time-filter-btn:hover {
  background-color: #1d4ed8;
  /* slightly darker blue */
  color: #fff;
}

/* ===============================
   Table Search
=============================== */
.table-search {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  /* exactly what you asked */
}

.table-search-input {
  width: 100%;
  max-width: 320px;
  padding: 6px 10px;
  font-size: 14px;
}

/* Search input */
.table-search input {
  padding: 6px 10px;
  font-size: 20px;
  border-radius: 6px;
  border: 1px solid #ccc;
  outline: none;
}

.table-search input:focus {
  border-color: #4f7cff;
  box-shadow: 0 0 0 2px rgba(79, 124, 255, 0.15);
}

/* ===============================
   Table Row Actions
=============================== */
.row-actions {
  text-align: center;
  white-space: nowrap;
}

.row-actions .save-btn {
  display: none;
  margin-right: 6px;
}

/* ===============================
   Editable Cell Enhancements
=============================== */
.auto-resize {
  min-height: 40px;
  max-height: 150px;
  overflow-y: hidden;
  resize: none;
  transition: height 0.2s ease;
}

/* ===============================
   Label Wrappers
=============================== */
.label-wrapper {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  position: relative;
  margin-bottom: 6px;
}

.label-wrapper {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 6px;
}

label {
  font-weight: 500;
}

/* ================= FIX INLINE DROPDOWNS ================= */

/* Allow dropdowns inside cells */
td.event-category-view,
td.activity-type-view {
  position: relative;
  overflow: visible !important;
}

/* Style + stabilize selects */
td.event-category-view select,
td.activity-type-view select {
  width: 100%;
  min-width: 100px;
  padding: 4px 6px;
  font-size: 12px;
  font-weight: 500;
  border: 1px solid #999;
  border-radius: 4px;
  background: #ffffff;
  z-index: 10000;
}

/* =====================================
   ACTIVITY TYPE DROPDOWN (TABLE CELL)
   ===================================== */

select.activity-type-dropdown {
  width: 100%;
  min-width: 100px;
  padding: 3px 30px 3px 6px;
  font-size: 12px;

  border: 1px solid #cbd5e1;
  border-radius: 6px;
  background-color: #ffffff;

  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;

  background-image:
    linear-gradient(45deg, transparent 50%, #6b7280 50%),
    linear-gradient(135deg, #6b7280 50%, transparent 50%);
  background-position:
    calc(100% - 15px) 50%,
    calc(100% - 10px) 50%;
  background-size: 5px 5px;
  background-repeat: no-repeat;
}

/* Hover */
select.activity-type-dropdown:hover {
  border-color: #94a3b8;
}

/* Focus */
select.activity-type-dropdown:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.2);
}

/* Placeholder option */
select.activity-type-dropdown option[value=""] {
  color: black;
}

/* Disabled (if you later disable it) */
select.activity-type-dropdown:disabled {
  background-color: #f1f5f9;
  color: #9ca3af;
  cursor: not-allowed;
}

.InternalContainer-top-section {
  display: flex;
  flex-direction: column;
}

/* ===============================
   Internal Events Header
=============================== */
.saved-config-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;

  margin-bottom: 14px;
  padding: 6px 4px;
}

/* LEFT: title + buttons */
.saved-config-header-title {
  display: flex;
  align-items: center;
  gap: 12px;
}

.saved-config-header-title h2 {
  margin: 0;
  font-size: 1.4rem;
  font-weight: 600;
  color: #111827;
}

/* RIGHT: search + filter */
.saved-config-header-controls {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Search input */
.saved-config-header-controls .table-search-input {
  width: 280px;
  padding: 8px 12px;
  font-size: 14px;
  border-radius: 8px;
  border: 1px solid #d1d5db;
}

/* Ensure dropdown matches height */
.saved-config-header-controls .event-category-dropdown {
  min-width: 200px;
  height: 38px;
}

.video-icon-btn {
  background: linear-gradient(135deg, #4f7df3, #5f8cff);
  color: white;
  border: none;
  padding: 8px 14px;
  border-radius: 8px;
  font-weight: 500;
  cursor: pointer;
}

.video-icon-btn:hover {
  background: linear-gradient(135deg, #3e6ce6, #4a79ff);
}

#deleteModalText {
  font-size: 18px;
}

#confirmDeleteBtn {
  font-size: 18px;
  background: rgb(244, 66, 66);
  color: #ffffff;
}

#confirmDeleteBtn:hover {
  background: rgb(251, 12, 12);
  color: #ffffff;
}

#cancelDeleteBtn {
  font-size: 18px;
}

.empty-state {
  display: none;
  text-align: center;
  padding: 50px 20px;
  margin-top: 20px;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 10px;
}

.empty-state h3 {
  color: #1f2937;
  margin-bottom: 10px;
}

.empty-state p {
  color: #6b7280;
}

.switch {
  position: relative;
  display: inline-block;
  width: 64px;
  height: 34px;
}

.switch input {
  display: none;
}

.slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background: #cbd5e1;
  transition: .3s;
  border-radius: 30px;
}

/* ==========================
   Modern Toggle Switch
========================== */

.switch {
  position: relative;
  display: inline-block;
  width: 56px;
  height: 30px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  inset: 0;
  cursor: pointer;

  background: #d1d5db;
  border-radius: 30px;

  transition: all .35s ease;

  box-shadow:
    inset 0 2px 5px rgba(0, 0, 0, .12),
    0 2px 8px rgba(0, 0, 0, .10);
}

.slider:before {
  position: absolute;
  content: "";

  width: 24px;
  height: 24px;

  left: 3px;
  top: 3px;

  border-radius: 50%;

  background: white;

  box-shadow:
    0 2px 8px rgba(0, 0, 0, .25);

  transition: all .35s ease;
}

/* ON */

.switch input:checked+.slider {

  background: linear-gradient(135deg,
      #3b82f6,
      #2563eb);

  box-shadow:
    0 0 10px rgba(59, 130, 246, .35),
    inset 0 1px 3px rgba(255, 255, 255, .25);
}

.switch input:checked+.slider:before {

  transform: translateX(26px);
}

/* Hover */

.switch:hover .slider {

  transform: scale(1.03);
}

/* Focus */

.switch input:focus+.slider {

  box-shadow:
    0 0 0 4px rgba(59, 130, 246, .18);
}

.scheduler-dropdown {

  width: 100px;

  height: 36px;

  border-radius: 10px;

  border: 1px solid #d7dce5;

  background: white;

  padding: 0 12px;

  font-size: 14px;

  font-weight: 600;

  color: #1f2937;

  cursor: pointer;

  transition: .25s;

  appearance: none;

  box-shadow:
    0 2px 6px rgba(0, 0, 0, .08);

}

.scheduler-dropdown:hover {

  border-color: #3b82f6;

  box-shadow:
    0 4px 10px rgba(37, 99, 235, .12);
}

.scheduler-dropdown:focus {

  outline: none;

  border-color: #2563eb;

  box-shadow:
    0 0 0 3px rgba(37, 99, 235, .15);
}

thead {
  display: table-header-group;
}

tbody {
  display: table-row-group;
}

tbody tr {
  display: table-row;
}

#internalTableContainer,
#externalTableContainer {
  overflow-x: auto;
}

#internalTable,
#externalTable {
  width: 100%;
  table-layout: fixed;
}

/* =========================================================
   Professional event workspace and EECO configuration
   ========================================================= */
.event-workspace {
  width: min(1800px, calc(100% - 48px));
  margin: 0px auto 0px;
  padding: 26px;
}

.workspace-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  margin-bottom: 24px;
}

.workspace-heading h2 {
  margin: 4px 0 5px;
  color: #0b1739;
  font-size: 1.55rem;
}

.workspace-heading p {
  margin: 0;
  color: #64748b;
}

.workspace-eyebrow {
  color: #2563eb;
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.workspace-stats {
  display: flex;
  gap: 10px;
}

.workspace-stat {
  min-width: 94px;
  padding: 12px 16px;
  text-align: center;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
}

.workspace-stat span {
  display: block;
  color: #0f172a;
  font-size: 1.35rem;
  font-weight: 800;
}

.workspace-stat small {
  color: #64748b;
  font-size: .72rem;
}

.workspace-stat.accent {
  background: #eff6ff;
  border-color: #bfdbfe;
}

.workspace-stat.accent span {
  color: #1d4ed8;
}

.event-family-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(250px, 335px));
  justify-content: center;
  gap: 28px;
  width: 100%;
  margin: 0 auto;
}

.event-family-tab {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 14px;
  width: 75%;
  padding: 16px 18px;
  color: #172554;
  text-align: left;
  background: #dbeafe;
  border: 1px solid #dbe5f3;
  border-radius: 15px;
  cursor: pointer;
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    transform 0.2s ease;
}

.event-family-tab:hover {
  border-color: #93c5fd;
  background: #80b3ed;
  color: #fff;
  box-shadow: 0 6px 18px rgba(37, 99, 235, 0.1);
  transform: translateY(-1px);

  .event-family-tab small:hover {
    color: #fff;
  }
}

/* .event-family-tab.active {
   color: #4c525a;
    background: #dbeafe;
} */

@media (max-width: 800px) {
  .event-family-tabs {
    grid-template-columns: minmax(280px, 420px);
    gap: 12px;
  }
}

.event-family-tab strong,
.event-family-tab small {
  display: block;
}

.event-family-tab strong {
  font-size: .95rem;
  font-weight: 500;
}

.event-family-tab small {
  margin-top: 3px;
  color: #4c525a;
  font-size: .72rem;
}

.tab-icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  color: #2563eb;
  background: #dbeafe;
  border-radius: 11px;
  font-size: 1.25rem;
}

.tab-count {
  color: #4c525a;
  text-align: center;
  border-radius: 999px;
  font-weight: 800;
}

.eeco-column-heading {
  min-width: 185px;
}

.eeco-config-cell {
  min-width: 190px;
  padding: 10px !important;
  background: #f8fbff;
}

.eeco-open-btn {
  width: 100%;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 9px;
  padding: 10px;
  color: #1e3a8a;
  text-align: left;
  background: #fff;
  border: 1px solid #bfdbfe;
  border-radius: 12px;
  cursor: pointer;
  transition: .18s ease;
}

.eeco-open-btn:hover:not(:disabled) {
  border-color: #2563eb;
  box-shadow: 0 7px 18px rgba(37, 99, 235, .14);
  transform: translateY(-1px);
}

.eeco-open-btn:disabled {
  opacity: .55;
  cursor: not-allowed;
}

.eeco-open-btn strong,
.eeco-open-btn small {
  display: block;
}

.eeco-open-btn strong {
  font-size: .78rem;
}

.eeco-open-btn small {
  margin-top: 2px;
  color: #64748b;
  font-size: .64rem;
}

.eeco-open-icon {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  background: #dbeafe;
  border-radius: 8px;
}

.eeco-open-arrow {
  font-size: 1rem;
}

body.modal-open {
  overflow: hidden;
}

.eeco-modal {
  position: fixed;
  inset: 0;
  z-index: 10020;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(8, 18, 42, .68);
  backdrop-filter: blur(5px);
}

.eeco-dialog {
  display: flex;
  flex-direction: column;
  width: min(1420px, 96vw);
  height: min(900px, 92vh);
  overflow: hidden;
  background: #f7f9fc;
  border: 1px solid rgba(255, 255, 255, .45);
  border-radius: 22px;
  box-shadow: 0 35px 90px rgba(3, 10, 28, .34);
}

.eeco-dialog-header {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 24px 28px 20px;
  color: #fff;
  background: linear-gradient(120deg, #0b1739, #173d79 62%, #215fbd);
}

.eeco-dialog-header h2 {
  margin: 4px 0 4px;
  font-size: 1.65rem;
}

.eeco-dialog-header p {
  margin: 0;
  color: #cbdaf3;
}

.eeco-dialog-header .workspace-eyebrow {
  color: #93c5fd;
}

.eeco-close-btn {
  align-self: flex-start;
  width: 42px;
  height: 42px;
  color: #fff;
  font-size: 1.8rem;
  line-height: 1;
  background: rgba(255, 255, 255, .12);
  border: 1px solid rgba(255, 255, 255, .22);
  border-radius: 12px;
  cursor: pointer;
}

.eeco-message {
  margin: 14px 28px 0;
  padding: 11px 14px;
  border-radius: 10px;
  font-size: .85rem;
  font-weight: 600;
}

.eeco-message.info {
  color: #1e40af;
  background: #dbeafe;
}

.eeco-message.success {
  color: #166534;
  background: #dcfce7;
}

.eeco-message.error {
  color: #991b1b;
  background: #fee2e2;
}

.eeco-overview {
  display: grid;
  grid-template-columns: repeat(3, 130px) minmax(260px, 1fr);
  gap: 12px;
  padding: 18px 28px 12px;
}

.eeco-overview-card,
.eeco-readiness-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 13px;
}

.eeco-overview-card {
  padding: 12px 15px;
}

.eeco-overview-card span {
  display: block;
  color: #0f2e67;
  font-size: 1.25rem;
  font-weight: 800;
}

.eeco-overview-card small,
.eeco-readiness-card small {
  color: #64748b;
}

.eeco-readiness-card {
  padding: 12px 16px;
}

.eeco-readiness-card>div:first-child {
  display: flex;
  justify-content: space-between;
}

.eeco-progress {
  height: 7px;
  margin-top: 10px;
  overflow: hidden;
  background: #e2e8f0;
  border-radius: 99px;
}

.eeco-progress span {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, #2563eb, #22c55e);
  border-radius: 99px;
  transition: width .3s;
}

.eeco-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 28px 14px;
}

.eeco-search {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  max-width: 620px;
  padding: 0 13px;
  background: #fff;
  border: 1px solid #dbe5f3;
  border-radius: 11px;
}

.eeco-search input {
  width: 100%;
  padding: 11px 0;
  border: 0;
  outline: 0;
  font: inherit;
}

.eeco-active-filter {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #475569;
  font-size: .82rem;
}

.eeco-parameter-list {
  flex: 1;
  overflow: auto;
  padding: 0 28px 24px;
}

.eeco-loading-state,
.eeco-empty-state {
  padding: 70px 30px;
  color: #64748b;
  text-align: center;
  background: #fff;
  border: 1px dashed #cbd5e1;
  border-radius: 15px;
}

.eeco-empty-state h3 {
  margin: 8px 0;
  color: #0f172a;
}

.eeco-empty-icon {
  color: #2563eb;
  font-size: 2rem;
}

.eeco-parameter-card {
  margin-bottom: 12px;
  overflow: hidden;
  background: #fff;
  border: 1px solid #dbe5f3;
  border-radius: 15px;
  box-shadow: 0 5px 14px rgba(15, 23, 42, .035);
}

.eeco-parameter-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 16px;
}

.eeco-parameter-expander {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  min-width: 0;
  padding: 0;
  text-align: left;
  background: none;
  border: 0;
  cursor: pointer;
}

.eeco-sequence {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  color: #1d4ed8;
  background: #eff6ff;
  border-radius: 9px;
  font-size: .72rem;
  font-weight: 800;
}

.eeco-parameter-title {
  flex: 1;
  min-width: 180px;
}

.eeco-parameter-title>span {
  display: flex;
  align-items: center;
  gap: 9px;
  color: #172554;
  font-weight: 700;
}

.eeco-parameter-title strong {
  padding: 3px 7px;
  color: #fff;
  background: #255ec2;
  border-radius: 6px;
  font-size: .72rem;
}

.eeco-parameter-title small {
  display: block;
  margin-top: 3px;
  color: #64748b;
  font-size: .7rem;
}

.eeco-card-counts {
  color: #64748b;
  font-size: .72rem;
}

.eeco-composite-badge {
  padding: 4px 7px;
  color: #6d28d9;
  background: #ede9fe;
  border-radius: 6px;
  font-size: .65rem;
  font-weight: 700;
}

.eeco-chevron {
  color: #64748b;
  font-size: 1.1rem;
  transition: transform .2s;
}

.eeco-parameter-expander[aria-expanded="true"] .eeco-chevron {
  transform: rotate(180deg);
}

.eeco-parameter-content {
  padding: 0 16px 16px;
  border-top: 1px solid #edf2f7;
}

.eeco-formula {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 13px 0;
  padding: 9px 11px;
  color: #475569;
  background: #f8fafc;
  border-radius: 8px;
  font-size: .72rem;
}

.eeco-formula span {
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .05em;
}

.eeco-formula code {
  overflow-wrap: anywhere;
  color: #1e3a8a;
}

.eeco-hierarchy-grid {
  display: grid;
  grid-template-columns: minmax(260px, .75fr) minmax(420px, 1.25fr);
  gap: 14px;
}

.eeco-hierarchy-grid section {
  padding: 13px;
  background: #f8fafc;
  border: 1px solid #edf2f7;
  border-radius: 11px;
}

.eeco-hierarchy-grid h4 {
  margin: 0 0 9px;
  color: #334155;
  font-size: .77rem;
  text-transform: uppercase;
  letter-spacing: .05em;
}

.eeco-hierarchy-grid h4 span {
  margin-left: 4px;
  color: #2563eb;
}

.eeco-objective-row,
.eeco-check-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px;
  margin-top: 7px;
  background: #fff;
  border: 1px solid #e5eaf2;
  border-radius: 9px;
}

.eeco-code {
  flex: none;
  padding: 4px 6px;
  border-radius: 5px;
  font-size: .64rem;
  font-weight: 800;
}

.eeco-code.objective {
  color: #7c2d12;
  background: #ffedd5;
}

.eeco-code.check {
  color: #155e75;
  background: #cffafe;
}

.eeco-item-copy {
  flex: 1;
  min-width: 0;
}

.eeco-item-copy strong,
.eeco-item-copy small {
  display: block;
}

.eeco-item-copy strong {
  color: #1e293b;
  font-size: .76rem;
}

.eeco-item-copy small {
  margin-top: 3px;
  color: #64748b;
  font-size: .65rem;
}

.eeco-item-copy details {
  margin-top: 6px;
  color: #475569;
  font-size: .66rem;
}

.eeco-item-copy summary {
  color: #2563eb;
  cursor: pointer;
}

.eeco-item-copy dl {
  margin: 7px 0 0;
}

.eeco-item-copy dl div {
  display: grid;
  grid-template-columns: 68px 1fr;
  gap: 5px;
  margin-top: 3px;
}

.eeco-item-copy dt {
  font-weight: 700;
}

.eeco-item-copy dd {
  margin: 0;
  overflow-wrap: anywhere;
}

.eeco-required-badge {
  flex: none;
  padding: 3px 6px;
  border-radius: 5px;
  font-size: .6rem;
  font-weight: 700;
}

.eeco-required-badge.required {
  color: #991b1b;
  background: #fee2e2;
}

.eeco-required-badge.optional {
  color: #475569;
  background: #e2e8f0;
}

.eeco-none-state {
  padding: 18px;
  color: #94a3b8;
  text-align: center;
  border: 1px dashed #cbd5e1;
  border-radius: 8px;
  font-size: .72rem;
}

.eeco-status-switch {
  position: relative;
  flex: none;
  width: 38px;
  height: 22px;
}

.eeco-status-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.eeco-status-switch span {
  position: absolute;
  inset: 0;
  background: #cbd5e1;
  border-radius: 99px;
  cursor: pointer;
  transition: .2s;
}

.eeco-status-switch span::before {
  content: "";
  position: absolute;
  width: 16px;
  height: 16px;
  left: 3px;
  top: 3px;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 1px 4px rgba(0, 0, 0, .2);
  transition: .2s;
}

.eeco-status-switch input:checked+span {
  background: #2563eb;
}

.eeco-status-switch input:checked+span::before {
  transform: translateX(16px);
}

.eeco-status-switch input:disabled+span {
  opacity: .48;
  cursor: not-allowed;
}

.eeco-dialog-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 28px;
  background: #fff;
  border-top: 1px solid #dbe5f3;
}

.eeco-footer-note {
  color: #64748b;
  font-size: .72rem;
}

.eeco-secondary-btn,
.eeco-primary-btn {
  padding: 10px 16px;
  border-radius: 10px;
  font-weight: 700;
  cursor: pointer;
}

.eeco-secondary-btn {
  color: #334155;
  background: #fff;
  border: 1px solid #cbd5e1;
}

.eeco-primary-btn {
  margin-left: 8px;
  color: #fff;
  background: #2563eb;
  border: 1px solid #2563eb;
}

.eeco-primary-btn:disabled {
  opacity: .55;
  cursor: not-allowed;
}

@media (max-width: 900px) {
  .event-workspace {
    width: calc(100% - 24px);
    padding: 18px;
  }

  .workspace-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .event-family-tabs,
  .eeco-hierarchy-grid {
    grid-template-columns: 1fr;
  }

  .eeco-overview {
    grid-template-columns: repeat(3, 1fr);
  }

  .eeco-readiness-card {
    grid-column: 1 / -1;
  }

  .eeco-dialog {
    width: 100%;
    height: 96vh;
  }

  .eeco-modal {
    padding: 8px;
  }

  .eeco-card-counts {
    display: none;
  }
}

/* =========================================================
   EECO authoring studio
   ========================================================= */
.eeco-author-hint {
  display: flex;
  align-items: center;
  gap: 6px;
  max-width: 470px;
  color: #475569;
  font-size: .75rem;
  line-height: 1.4;
}

.eeco-author-hint strong {
  padding: 3px 7px;
  color: #1d4ed8;
  background: #dbeafe;
  border-radius: 6px;
  font-size: .68rem;
}

.eeco-author-section {
  margin-top: 14px;
  padding: 16px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
}

.eeco-section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}

.eeco-section-heading h4 {
  margin: 0;
  color: #172554;
  font-size: .84rem;
  letter-spacing: .02em;
}

.eeco-section-heading p {
  margin: 3px 0 0;
  color: #64748b;
  font-size: .7rem;
}

.eeco-add-item {
  flex: none;
  padding: 8px 11px;
  color: #1d4ed8;
  background: #fff;
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  font: inherit;
  font-size: .7rem;
  font-weight: 700;
  cursor: pointer;
  transition: border-color .18s, box-shadow .18s, transform .18s;
}

.eeco-add-item:hover {
  border-color: #2563eb;
  box-shadow: 0 5px 14px rgba(37, 99, 235, .12);
  transform: translateY(-1px);
}

.eeco-objective-editors,
.eeco-sub-parameter-editors {
  display: grid;
  gap: 10px;
}

.eeco-author-row {
  display: grid;
  grid-template-columns: 105px minmax(280px, 1fr) 100px auto 34px;
  align-items: end;
  gap: 10px;
  padding: 12px;
  background: #fff;
  border: 1px solid #dbe5f3;
  border-radius: 10px;
  box-shadow: 0 3px 10px rgba(15, 23, 42, .025);
}

.eeco-field {
  min-width: 0;
}

.eeco-field label {
  display: block;
  margin-bottom: 5px;
  color: #475569;
  font-size: .63rem;
  font-weight: 700;
  letter-spacing: .03em;
  text-transform: uppercase;
}

.eeco-field input,
.eeco-field select {
  box-sizing: border-box;
  width: 100%;
  height: 38px;
  padding: 8px 10px;
  color: #172554;
  background: #fff;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  outline: none;
  font: inherit;
  font-size: .74rem;
  transition: border-color .18s, box-shadow .18s;
}

.eeco-field input:focus,
.eeco-field select:focus {
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, .12);
}

.eeco-field input:disabled,
.eeco-field select:disabled {
  color: #64748b;
  background: #f1f5f9;
  cursor: not-allowed;
}

.eeco-inline-check,
.eeco-check-options label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 38px;
  color: #475569;
  font-size: .7rem;
  font-weight: 600;
}

.eeco-inline-check input,
.eeco-check-options input {
  accent-color: #2563eb;
}

.eeco-remove-item {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  align-self: end;
  color: #b91c1c;
  background: #fff1f2;
  border: 1px solid #fecdd3;
  border-radius: 8px;
  font-size: 1.1rem;
  cursor: pointer;
}

.eeco-remove-item:hover {
  color: #fff;
  background: #dc2626;
  border-color: #dc2626;
}

.eeco-author-check {
  overflow: hidden;
  background: #fff;
  border: 1px solid #dbe5f3;
  border-radius: 11px;
  box-shadow: 0 3px 10px rgba(15, 23, 42, .025);
}

.eeco-author-check>header {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 42px;
  padding: 8px 11px;
  background: linear-gradient(90deg, #eff6ff, #f8fafc);
  border-bottom: 1px solid #e2e8f0;
}

.eeco-author-check>header strong {
  flex: 1;
  overflow: hidden;
  color: #1e293b;
  font-size: .74rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.eeco-author-check>header .eeco-remove-item {
  width: 28px;
  height: 28px;
  align-self: center;
}

.eeco-author-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(145px, 1fr));
  gap: 11px;
  padding: 13px;
}

.eeco-author-grid .span-2 {
  grid-column: span 2;
}

.eeco-check-options {
  display: flex;
  align-items: end;
  gap: 16px;
}

.eeco-primary-btn,
.eeco-secondary-btn,
.eeco-add-item,
.eeco-remove-item {
  font-family: "Avenir Next", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
}

.eeco-primary-btn:focus-visible,
.eeco-secondary-btn:focus-visible,
.eeco-add-item:focus-visible,
.eeco-remove-item:focus-visible,
.eeco-close-btn:focus-visible,
.eeco-parameter-expander:focus-visible {
  outline: 3px solid rgba(37, 99, 235, .24);
  outline-offset: 2px;
}

@media (max-width: 1080px) {
  .eeco-author-grid {
    grid-template-columns: repeat(2, minmax(180px, 1fr));
  }

  .eeco-author-row {
    grid-template-columns: 95px minmax(220px, 1fr) 90px auto 34px;
  }
}

@media (max-width: 720px) {

  .eeco-toolbar,
  .eeco-section-heading,
  .eeco-dialog-footer {
    align-items: stretch;
    flex-direction: column;
  }

  .eeco-author-hint {
    max-width: none;
  }

  .eeco-author-grid,
  .eeco-author-row {
    grid-template-columns: 1fr;
  }

  .eeco-author-grid .span-2 {
    grid-column: auto;
  }

  .eeco-remove-item {
    justify-self: end;
  }
}

/* =========================================================
   EECO Studio v2 — focused, guided authoring experience
   ========================================================= */
.eeco-modal {
  position: fixed;
  inset: 0;
  z-index: 3000;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  padding: 24px;
  background: rgba(8, 17, 33, .72);
  backdrop-filter: blur(8px);
}

.eeco-studio-dialog {
  position: relative;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  width: min(1480px, calc(100vw - 48px));
  height: min(900px, calc(100vh - 48px));
  min-height: 620px;
  overflow: hidden;
  color: rgb(15, 37, 81);
  background: #f8fafc;
  border: 1px solid rgba(148, 163, 184, .38);
  border-radius: 22px;
  box-shadow: 0 30px 90px rgba(2, 8, 23, .42);
}

.eeco-studio-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 104px;
  padding: 22px 28px;
  color: rgb(15, 37, 81);
  background: linear-gradient(90deg, rgb(205 201 237 / 62%), rgb(191 228 245 / 77%));
}

.eeco-studio-heading {
  display: flex;
  align-items: center;
  gap: 15px;
  min-width: 0;
}

.eeco-product-mark {
  display: grid;
  place-items: center;
  flex: none;
  width: 46px;
  height: 46px;
  color: #0f1217;
  background: rgba(59, 130, 246, .18);
  border: 1px solid rgba(147, 197, 253, .2);
  border-radius: 14px;
  font-size: 1.3rem;
}

.eeco-studio-header .workspace-eyebrow {
  color: #93c5fd;
  font-size: .64rem;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.eeco-studio-header h2 {
  margin: 4px 0 3px;
  color: #474343;
  font-size: 20px;
  font-weight: 600;
  line-height: 1.15;
}

.eeco-studio-header p {
  max-width: 720px;
  margin: 0;
  overflow: hidden;
  color: #474343;
  font-size: .8rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.eeco-header-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.eeco-save-state {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 10px;
  color: #ffff;
  background: #2563eb;
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 999px;
  font-size: .66rem;
  font-weight: 700;
}

.eeco-save-state span {
  width: 7px;
  height: 7px;
  background: #22c55e;
  border-radius: 50%;
  box-shadow: 0 0 0 3px rgba(34, 197, 94, .16);
}

.eeco-save-state.unsaved span {
  background: #f59e0b;
  box-shadow: 0 0 0 3px rgba(245, 158, 11, .16);
}

.eeco-close-btn,
.eeco-drawer-close {
  display: grid;
  place-items: center;
  flex: none;
  width: 38px;
  height: 38px;
  padding: 0;
  color: #dbeafe;
  background: rgba(255, 255, 255, .08);
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 11px;
  font: inherit;
  font-size: 1.25rem;
  cursor: pointer;
  transition: background .18s, transform .18s;
}

.eeco-close-btn:hover {
  background: rgba(222, 157, 157, 0.616);
  transform: rotate(3deg);
}

.eeco-message {
  z-index: 4;
  margin: 0;
  padding: 10px 24px;
  border-radius: 0;
  font-size: .74rem;
  font-weight: 650;
}

.eeco-studio-shell {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  min-height: 0;
  overflow: hidden;
}

.eeco-studio-sidebar {
  display: flex;
  flex-direction: column;
  min-height: 0;
  padding: 20px 16px 16px;
  background: linear-gradient(135deg, #eff6ff, #f8fafc);
  border-right: 1px solid #dbe5f3;
}

.eeco-sidebar-top {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  padding: 0 6px 13px;
}

.eeco-sidebar-kicker {
  color: #64748b;
  font-size: .58rem;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.eeco-sidebar-top h3 {
  margin: 2px 0 0;
  color: #0f2551;
  font-size: 1rem;
}

.eeco-total-pill {
  display: grid;
  place-items: center;
  min-width: 30px;
  height: 26px;
  padding: 0 7px;
  color: #1d4ed8;
  background: #dbeafe;
  border-radius: 8px;
  font-size: .68rem;
  font-weight: 800;
}

.eeco-nav-search {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 12px;
  padding: 0 10px;
  color: #64748b;
  background: #fff;
  border: 1px solid #d5dfec;
  border-radius: 10px;
}

.eeco-nav-search:focus-within {
  border-color: #60a5fa;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, .1);
}

.eeco-nav-search input {
  width: 100%;
  padding: 9px 0;
  color: #1e293b;
  background: transparent;
  border: 0;
  outline: 0;
  font: inherit;
  font-size: .72rem;
}

.eeco-parameter-navigation {
  display: grid;
  gap: 6px;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
}

.eeco-nav-loading {
  padding: 24px 10px;
  color: #64748b;
  text-align: center;
  font-size: .72rem;
}

.eeco-parameter-nav-item {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  width: 100%;
  padding: 9px;
  color: #334155;
  text-align: left;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 10px;
  font: inherit;
  cursor: pointer;
  transition: background .16s, border-color .16s, transform .16s;
}

.eeco-parameter-nav-item:hover {
  background: rgba(255, 255, 255, .75);
  border-color: #dbe5f3;
  transform: translateX(2px);
}

.eeco-parameter-nav-item.active {
  color: #1d4ed8;
  background: #fff;
  border-color: #bfdbfe;
  box-shadow: 0 5px 15px rgba(37, 99, 235, .09);
}

.eeco-nav-code {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  color: #1e40af;
  background: #e0e7ff;
  border-radius: 9px;
  font-size: .66rem;
  font-weight: 850;
}

.eeco-parameter-nav-item.active .eeco-nav-code {
  color: #fff;
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
}

.eeco-nav-copy {
  min-width: 0;
}

.eeco-nav-copy strong,
.eeco-nav-copy small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.eeco-nav-copy strong {
  color: inherit;
  font-size: .7rem;
}

.eeco-nav-copy small {
  margin-top: 2px;
  color: #64748b;
  font-size: .59rem;
}

.eeco-nav-count {
  display: grid;
  place-items: center;
  min-width: 24px;
  height: 22px;
  padding: 0 5px;
  color: #64748b;
  background: #e2e8f0;
  border-radius: 7px;
  font-size: .59rem;
  font-weight: 800;
}

.eeco-parameter-nav-item.configured .eeco-nav-count {
  color: #047857;
  background: #d1fae5;
}

.eeco-sidebar-summary {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 12px;
  margin-top: 14px;
  padding: 13px;
  background: #fff;
  border: 1px solid #dbe5f3;
  border-radius: 12px;
}

.eeco-sidebar-summary>div:not(.eeco-progress) {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.eeco-sidebar-summary span {
  color: #64748b;
  font-size: .59rem;
}

.eeco-sidebar-summary strong {
  color: #172554;
  font-size: .72rem;
}

.eeco-sidebar-summary .eeco-coverage-row,
.eeco-sidebar-summary .eeco-progress {
  grid-column: 1 / -1;
}

.eeco-sidebar-summary .eeco-progress {
  height: 5px;
  margin-top: 0;
}

.eeco-studio-workspace {
  min-width: 0;
  min-height: 0;
  overflow-y: auto;
  padding: 26px 30px 40px;
  background: #f8fafc;
  overscroll-behavior: contain;
}

.eeco-loading-state,
.eeco-workspace-empty {
  display: grid;
  place-items: center;
  min-height: 100%;
  padding: 48px;
  color: #64748b;
  text-align: center;
}

.eeco-empty-visual {
  display: grid;
  place-items: center;
  width: 66px;
  height: 66px;
  margin: 0 auto 16px;
  color: #2563eb;
  background: #dbeafe;
  border-radius: 20px;
  font-size: 1.5rem;
}

.eeco-workspace-empty h3 {
  margin: 0 0 7px;
  color: #172554;
  font-size: 1.15rem;
}

.eeco-workspace-empty p {
  max-width: 540px;
  margin: 0 auto 18px;
  font-size: .76rem;
  line-height: 1.65;
}

.eeco-parameter-workspace {
  max-width: 1040px;
  margin: 0 auto;
}

.eeco-selected-parameter-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 20px;
}

.eeco-selected-identity {
  display: flex;
  align-items: center;
  gap: 14px;
}

.eeco-selected-code {
  display: grid;
  place-items: center;
  flex: none;
  width: 52px;
  height: 52px;
  color: #fff;
  background: linear-gradient(145deg, #2563eb, #1e40af);
  border-radius: 15px;
  box-shadow: 0 9px 22px rgba(37, 99, 235, .2);
  font-size: .86rem;
  font-weight: 850;
}

.eeco-selected-parameter-header h3 {
  margin: 1px 0 5px;
  color: #0f2551;
  font-size: 1.28rem;
}

.eeco-selected-parameter-header p {
  margin: 0;
  color: #253244;
  font-size: 16px;
}

.eeco-parameter-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 7px;
}

.eeco-meta-pill {
  padding: 6px 9px;
  color: #475569;
  background: #fff;
  border: 1px solid #dbe5f3;
  border-radius: 8px;
  font-size: .62rem;
  font-weight: 700;
}

.eeco-meta-pill.composite {
  color: #6d28d9;
  background: #f5f3ff;
  border-color: #ddd6fe;
}

.eeco-formula-card {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
  padding: 12px 14px;
  color: #334155;
  background: linear-gradient(90deg, #eff6ff, #fff);
  border: 1px solid #dbeafe;
  border-radius: 11px;
}

.eeco-formula-card span {
  flex: none;
  color: #1d4ed8;
  font-size: .59rem;
  font-weight: 850;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.eeco-formula-card code {
  overflow-wrap: anywhere;
  color: #1e3a8a;
  font-size: .7rem;
}

.eeco-content-section {
  margin-top: 16px;
  background: #fff;
  border: 1px solid #dbe5f3;
  border-radius: 14px;
  box-shadow: 0 7px 20px rgba(15, 23, 42, .035);
}

.eeco-content-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 15px 17px;
  border-bottom: 1px solid #edf2f7;
}

.eeco-content-section-header h4 {
  margin: 0;
  color: #172554;
  font-size: .9rem;
}

.eeco-content-section-header p {
  margin: 3px 0 0;
  color: #64748b;
  font-size: .8rem;
}

.eeco-add-record-btn,
.eeco-add-item {
  flex: none;
  padding: 8px 11px;
  color: #fff;
  background: #2563eb;
  border: 1px solid #2563eb;
  border-radius: 8px;
  font: inherit;
  font-size: .66rem;
  font-weight: 750;
  cursor: pointer;
  transition: box-shadow .18s, transform .18s;
}

.eeco-add-record-btn:hover {
  box-shadow: 0 7px 16px rgba(37, 99, 235, .2);
  transform: translateY(-1px);
}

.eeco-record-list {
  display: grid;
  gap: 8px;
  padding: 12px;
  background: linear-gradient(135deg, #eff6ff, #f8fafc);
}

.eeco-record-card {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 12px;
  padding: 11px 12px;
  background: #fbfdff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  transition: border-color .16s, box-shadow .16s;
}

.eeco-record-card:hover {
  border-color: #bfdbfe;
  box-shadow: 0 5px 14px rgba(37, 99, 235, .06);
}

.eeco-record-code {
  display: grid;
  place-items: center;
  min-height: 31px;
  padding: 0 6px;
  color: #1d4ed8;
  background: #dbeafe;
  border-radius: 7px;
  font-size: .63rem;
  font-weight: 850;
}

.eeco-record-copy {
  min-width: 0;
}

.eeco-record-copy strong,
.eeco-record-copy small {
  display: block;
}

.eeco-record-copy strong {
  overflow: hidden;
  color: #1e293b;
  font-size: .72rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.eeco-record-copy small {
  margin-top: 3px;
  color: #64748b;
  font-size: .59rem;
}

.eeco-status-chip {
  padding: 5px 7px;
  color: #047857;
  background: #d1fae5;
  border-radius: 7px;
  font-size: .57rem;
  font-weight: 800;
}

.eeco-status-chip.inactive {
  color: #64748b;
  background: #e2e8f0;
}

.eeco-record-actions {
  display: flex;
  gap: 5px;
}

.eeco-icon-btn {
  display: grid;
  place-items: center;
  width: 31px;
  height: 31px;
  padding: 0;
  color: #475569;
  background: #fff;
  border: 1px solid #d5dfec;
  border-radius: 8px;
  font: inherit;
  cursor: pointer;
}

.eeco-icon-btn:hover {
  color: #1d4ed8;
  border-color: #93c5fd;
}

.eeco-icon-btn.remove:hover {
  color: #b91c1c;
  background: #fff1f2;
  border-color: #fecdd3;
}

.eeco-list-empty {
  padding: 30px 18px;
  color: #64748b;
  text-align: center;
  font-size: .7rem;
}

.eeco-list-empty strong {
  display: block;
  margin-bottom: 4px;
  color: #334155;
  font-size: .76rem;
}

.eeco-studio-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 68px;
  padding: 13px 24px;
  background: #fff;
  border-top: 1px solid #dbe5f3;
}

.eeco-footer-guidance {
  display: flex;
  align-items: center;
  gap: 9px;
  color: #64748b;
  font-size: .65rem;
}

.eeco-guidance-icon {
  display: grid;
  place-items: center;
  flex: none;
  width: 22px;
  height: 22px;
  color: #1d4ed8;
  background: #dbeafe;
  border-radius: 50%;
  font-weight: 800;
}

.eeco-footer-actions {
  display: flex;
  gap: 8px;
}

.eeco-secondary-btn,
.eeco-primary-btn,
.eeco-danger-btn {
  min-height: 39px;
  padding: 9px 15px;
  border-radius: 9px;
  font: inherit;
  font-size: .7rem;
  font-weight: 750;
  cursor: pointer;
}

.eeco-primary-btn {
  margin: 0;
  color: #fff;
  background: #1d4ed8;
  border: 1px solid #1d4ed8;
}

.eeco-secondary-btn {
  color: #fff;
  background: #e64646;
  border: 1px solid #cbd5e1;
}

.eeco-danger-btn {
  color: #b91c1c;
  background: #fff1f2;
  border: 1px solid #fecdd3;
}

.eeco-primary-btn:disabled {
  color: #94a3b8;
  background: #e2e8f0;
  border-color: #e2e8f0;
  cursor: not-allowed;
}

.eeco-button-icon {
  margin-right: 5px;
}

/* Guided editor drawer */
.eeco-editor-layer,
.eeco-decision-layer {
  position: absolute;
  inset: 0;
  z-index: 60;
}

.eeco-editor-backdrop {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  padding: 0;
  background: rgba(7, 21, 45, .46);
  border: 0;
  backdrop-filter: blur(2px);
  cursor: default;
}

.eeco-editor-drawer {
  position: absolute;
  top: 0;
  right: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  width: min(540px, 92vw);
  height: 100%;
  background: #fff;
  box-shadow: -20px 0 55px rgba(15, 23, 42, .24);
  animation: eecoDrawerIn .22s ease-out;
}

@keyframes eecoDrawerIn {
  from {
    transform: translateX(24px);
    opacity: .7;
  }

  to {
    transform: translateX(0);
    opacity: 1;
  }
}

.eeco-editor-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 24px 18px;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
}

.eeco-editor-header .workspace-eyebrow {
  color: #2563eb;
  font-size: .59rem;
  font-weight: 850;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.eeco-editor-header h3 {
  margin: 4px 0;
  color: #172554;
  font-size: 1.15rem;
}

.eeco-editor-header p {
  margin: 0;
  color: #64748b;
  font-size: .68rem;
}

.eeco-drawer-close {
  color: #475569;
  background: #fff;
  border-color: #dbe5f3;
}

.eeco-editor-body {
  min-height: 0;
  overflow-y: auto;
  padding: 22px 24px 32px;
  overscroll-behavior: contain;
}

.eeco-form-section+.eeco-form-section {
  margin-top: 22px;
  padding-top: 20px;
  border-top: 1px solid #e2e8f0;
}

.eeco-form-section-heading {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin-bottom: 14px;
}

.eeco-form-step {
  display: grid;
  place-items: center;
  flex: none;
  width: 24px;
  height: 24px;
  color: #1d4ed8;
  background: #dbeafe;
  border-radius: 7px;
  font-size: .6rem;
  font-weight: 850;
}

.eeco-form-section-heading h4 {
  margin: 0;
  color: #1e293b;
  font-size: .78rem;
}

.eeco-form-section-heading p {
  margin: 3px 0 0;
  color: #64748b;
  font-size: .61rem;
}

.eeco-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 13px;
}

.eeco-form-field {
  min-width: 0;
}

.eeco-form-field.full {
  grid-column: 1 / -1;
}

.eeco-form-field label {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-bottom: 6px;
  color: #334155;
  font-size: .65rem;
  font-weight: 750;
}

.eeco-required-mark {
  color: #dc2626;
}

.eeco-form-field input,
.eeco-form-field select,
.eeco-form-field textarea {
  box-sizing: border-box;
  width: 100%;
  padding: 10px 11px;
  color: #172554;
  background: #fff;
  border: 1px solid #cbd5e1;
  border-radius: 9px;
  outline: 0;
  font: inherit;
  font-size: .72rem;
  transition: border-color .16s, box-shadow .16s;
}

.eeco-form-field input,
.eeco-form-field select {
  height: 41px;
}

.eeco-form-field textarea {
  min-height: 92px;
  resize: vertical;
  line-height: 1.45;
}

.eeco-form-field input:focus,
.eeco-form-field select:focus,
.eeco-form-field textarea:focus {
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, .11);
}

.eeco-form-field.invalid input,
.eeco-form-field.invalid select,
.eeco-form-field.invalid textarea {
  border-color: #ef4444;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, .08);
}

.eeco-field-help,
.eeco-field-error {
  display: block;
  margin-top: 5px;
  color: #64748b;
  font-size: .58rem;
  line-height: 1.4;
}

.eeco-field-error {
  color: #dc2626;
  font-weight: 650;
}

.eeco-toggle-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  grid-column: 1 / -1;
}

.eeco-toggle-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex: 1;
  min-width: 180px;
  padding: 10px 12px;
  color: #334155;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 9px;
  font-size: .65rem;
  font-weight: 700;
}

.eeco-toggle-card input {
  width: 34px;
  height: 18px;
  accent-color: #2563eb;
}

.eeco-advanced-details {
  margin-top: 20px;
  overflow: hidden;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
}

.eeco-advanced-details summary {
  padding: 12px 14px;
  color: #334155;
  font-size: .68rem;
  font-weight: 750;
  cursor: pointer;
  list-style: none;
}

.eeco-advanced-details summary::after {
  content: "+";
  float: right;
  color: #2563eb;
}

.eeco-advanced-details[open] summary::after {
  content: "−";
}

.eeco-advanced-content {
  padding: 2px 14px 14px;
}

.eeco-editor-footer {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 14px 20px;
  background: #fff;
  border-top: 1px solid #e2e8f0;
}

/* Styled decisions and non-blocking undo */
.eeco-decision-layer {
  z-index: 90;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(7, 21, 45, .62);
  backdrop-filter: blur(4px);
}

.eeco-decision-card {
  width: min(430px, calc(100vw - 48px));
  padding: 27px;
  text-align: center;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 17px;
  box-shadow: 0 24px 70px rgba(2, 8, 23, .32);
  animation: eecoDecisionIn .18s ease-out;
}

@keyframes eecoDecisionIn {
  from {
    transform: translateY(8px) scale(.98);
    opacity: 0;
  }

  to {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
}

.eeco-decision-icon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  margin: 0 auto 13px;
  color: #b45309;
  background: #fef3c7;
  border-radius: 14px;
  font-size: 1.1rem;
  font-weight: 850;
}

.eeco-decision-card h3 {
  margin: 0 0 7px;
  color: #172554;
  font-size: 1.05rem;
}

.eeco-decision-card p {
  margin: 0 auto 20px;
  color: #64748b;
  font-size: .72rem;
  line-height: 1.55;
}

.eeco-decision-actions {
  display: flex;
  justify-content: center;
  gap: 8px;
}

.eeco-toast {
  position: absolute;
  left: 50%;
  bottom: 84px;
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 290px;
  max-width: calc(100% - 40px);
  padding: 11px 13px;
  color: #fff;
  background: #172554;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 10px;
  box-shadow: 0 14px 35px rgba(15, 23, 42, .26);
  transform: translateX(-50%);
  font-size: .68rem;
}

.eeco-toast span {
  flex: 1;
}

.eeco-toast button {
  padding: 0;
  color: #93c5fd;
  background: none;
  border: 0;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.eeco-modal [hidden] {
  display: none !important;
}

@media (max-width: 900px) {
  .eeco-modal {
    padding: 10px;
  }

  .eeco-studio-dialog {
    width: 100%;
    height: calc(100vh - 20px);
    min-height: 0;
    border-radius: 16px;
  }

  .eeco-studio-shell {
    grid-template-columns: 220px minmax(0, 1fr);
  }

  .eeco-studio-workspace {
    padding: 22px 20px 34px;
  }

  .eeco-save-state {
    display: none;
  }

  .eeco-selected-parameter-header {
    flex-direction: column;
  }

  .eeco-parameter-meta {
    justify-content: flex-start;
  }
}

@media (max-width: 650px) {
  .eeco-studio-header {
    min-height: 88px;
    padding: 16px;
  }

  .eeco-product-mark {
    display: none;
  }

  .eeco-studio-header p {
    max-width: 230px;
  }

  .eeco-studio-shell {
    grid-template-columns: 1fr;
    grid-template-rows: auto minmax(0, 1fr);
  }

  .eeco-studio-sidebar {
    padding: 10px 12px;
    border-right: 0;
    border-bottom: 1px solid #dbe5f3;
  }

  .eeco-sidebar-top,
  .eeco-nav-search,
  .eeco-sidebar-summary {
    display: none;
  }

  .eeco-parameter-navigation {
    display: flex;
    overflow-x: auto;
    overflow-y: hidden;
    padding-bottom: 2px;
  }

  .eeco-parameter-nav-item {
    display: flex;
    flex: none;
    width: auto;
    padding: 5px 8px;
  }

  .eeco-nav-code {
    width: 30px;
    height: 30px;
  }

  .eeco-nav-copy small,
  .eeco-nav-count {
    display: none;
  }

  .eeco-studio-workspace {
    padding: 18px 14px 28px;
  }

  .eeco-selected-code {
    width: 44px;
    height: 44px;
  }

  .eeco-content-section-header {
    align-items: flex-start;
  }

  .eeco-record-card {
    grid-template-columns: 48px minmax(0, 1fr) auto;
  }

  .eeco-status-chip {
    display: none;
  }

  .eeco-studio-footer {
    padding: 10px 12px;
  }

  .eeco-footer-guidance {
    display: none;
  }

  .eeco-footer-actions {
    width: 100%;
    justify-content: flex-end;
  }

  .eeco-form-grid {
    grid-template-columns: 1fr;
  }

  .eeco-form-field.full {
    grid-column: auto;
  }

  .eeco-decision-actions {
    flex-direction: column-reverse;
  }

  .eeco-decision-actions button {
    width: 100%;
  }
}

/* Save Event Details button */

.eeco-footer-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

/* Close button */
.cancelEecoConfiguration {
  min-height: 40px;
  margin: 0;
  padding: 9px 16px;
  color: #ffffff;
  background: #ef4444;
  border: 1px solid #ef4444;
  border-radius: 9px;
  font: inherit;
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
  transition: 0.2s ease;
}

.cancelEecoConfiguration:hover {
  background: #dc2626;
  border-color: #dc2626;
  transform: translateY(-1px);
}

/* Save event details button */
button.saveEecoeventdetails,
#saveEecoEventDetails {
  color: #ffffff !important;
  background: #2563eb !important;
  background-color: #2563eb !important;
  border: 1px solid #2563eb !important;
}

button.saveEecoeventdetails:hover:not(:disabled),
#saveEecoEventDetails:hover:not(:disabled) {
  background: #1d4ed8 !important;
  background-color: #1d4ed8 !important;
  border-color: #1d4ed8 !important;
}

button.saveEecoeventdetails:disabled,
#saveEecoEventDetails:disabled {
  color: #94a3b8 !important;
  background: #e2e8f0 !important;
  border-color: #cbd5e1 !important;
  cursor: not-allowed;
}

.eeco-button-icon {
  margin-right: 5px;
}

.eeco-button-icon {
  margin-right: 5px;
}

/* =========================================================
   FINAL EECO ACTION ICONS
   Pure CSS: no SVG, emoji, icon font, or external dependency.
   ========================================================= */
.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.eeco-record-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  min-width: 84px;
}

.eeco-icon-btn {
  position: relative !important;
  display: inline-grid !important;
  place-items: center !important;
  width: 38px !important;
  height: 38px !important;
  min-width: 38px !important;
  padding: 0 !important;
  border-radius: 10px !important;
  cursor: pointer;
  overflow: visible !important;
}

.eeco-edit-action {
  color: #1d4ed8 !important;
  background: #eff6ff !important;
  border: 1px solid #bfdbfe !important;
}

.eeco-edit-action::before {
  content: "" !important;
  display: block !important;
  width: 6px !important;
  height: 19px !important;
  background: currentColor !important;
  border-radius: 2px !important;
  clip-path: polygon(0 0, 100% 0, 100% 78%, 50% 100%, 0 78%);
  transform: rotate(45deg) !important;
}

.edit-video-btn {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
}

.edit-video-btn>svg {
  display: none !important;
}

.edit-video-btn::before {
  content: "" !important;
  display: block !important;
  width: 5px !important;
  height: 16px !important;
  background: currentColor !important;
  border-radius: 2px !important;
  clip-path: polygon(0 0, 100% 0, 100% 78%, 50% 100%, 0 78%);
  transform: rotate(45deg) !important;
}

.eeco-edit-action:hover {
  color: #ffffff !important;
  background: #2563eb !important;
  border-color: #2563eb !important;
}

.eeco-remove-action {
  color: #b42318 !important;
  background: #fff1f2 !important;
  border: 1px solid #fecdd3 !important;
}

/* =========================================================
   COMPACT EVENT TABLE + INLINE EECO AUTHORING
   ========================================================= */

/* The overview table intentionally shows only the nine fields used most
   often. Remaining event fields are edited inside the EECO studio. */
#internalTable,
#externalTable {
  min-width: 1240px;
  table-layout: fixed;
}

#internalTable th:nth-child(1),
#internalTable td:nth-child(1),
#externalTable th:nth-child(1),
#externalTable td:nth-child(1) {
  width: 110px;
}

#internalTable th:nth-child(2),
#internalTable td:nth-child(2),
#externalTable th:nth-child(2),
#externalTable td:nth-child(2) {
  width: 125px;
}

#internalTable th:nth-child(3),
#internalTable td:nth-child(3),
#externalTable th:nth-child(3),
#externalTable td:nth-child(3) {
  width: 130px;
}

#internalTable th:nth-child(4),
#internalTable td:nth-child(4),
#externalTable th:nth-child(4),
#externalTable td:nth-child(4) {
  width: 135px;
}

#internalTable th:nth-child(5),
#internalTable td:nth-child(5),
#externalTable th:nth-child(5),
#externalTable td:nth-child(5) {
  width: 130px;
}

#internalTable th:nth-child(6),
#internalTable td:nth-child(6),
#externalTable th:nth-child(6),
#externalTable td:nth-child(6) {
  width: 260px;
}

#internalTable th:nth-child(7),
#internalTable td:nth-child(7),
#externalTable th:nth-child(7),
#externalTable td:nth-child(7) {
  width: 130px;
}

#internalTable th:nth-child(8),
#internalTable td:nth-child(8),
#externalTable th:nth-child(8),
#externalTable td:nth-child(8) {
  width: 180px;
}

#internalTable th:nth-child(9),
#internalTable td:nth-child(9),
#externalTable th:nth-child(9),
#externalTable td:nth-child(9) {
  width: 96px;
}

#internalTable th,
#internalTable td,
#externalTable th,
#externalTable td {
  overflow-wrap: normal;
  word-break: normal;
}

.eeco-studio-dialog {
  grid-template-rows: auto auto auto minmax(0, 1fr) auto;
}

.eeco-event-details-panel {
  padding: 14px 24px 16px;
  background: #ffffff;
  border-bottom: 1px solid #dbe5f3;
  transition: background-color .18s ease, box-shadow .18s ease;
}

.eeco-event-details-panel.has-unsaved-changes {
  background: #fffbeb;
  box-shadow: inset 3px 0 #f59e0b;
}

.eeco-event-details-loading {
  padding: 10px 0;
  color: #64748b;
  font-size: .72rem;
}

.eeco-event-details-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 11px;
}

.eeco-event-details-header h3 {
  margin: 2px 0 1px;
  color: #172554;
  font-size: .9rem;
}

.eeco-event-details-header p {
  margin: 0;
  color: #1e293b;
  font-size: 15px;
}

.eeco-event-details-kicker {
  display: block;
  color: #2563eb;
  font-size: .56rem;
  font-weight: 850;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.eeco-event-details-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.eeco-event-detail-field {
  display: grid;
  gap: 5px;
  min-width: 0;
  margin: 0;
}

.eeco-event-detail-field>span {
  color: #475569;
  font-size: .8rem;
  font-weight: 750;
}

.eeco-event-detail-field input,
.eeco-event-detail-field select {
  width: 100%;
  min-width: 0;
  height: 37px;
  box-sizing: border-box;
  padding: 7px 10px;
  color: #172554;
  background: #fff;
  border: 1px solid #cbd5e1;
  border-radius: 9px;
  font: inherit;
  font-size: .68rem;
  outline: none;
}

.eeco-event-detail-field input:focus,
.eeco-event-detail-field select:focus {
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, .12);
}

.eeco-event-detail-field.readonly input {
  color: #64748b;
  background: #f1f5f9;
  cursor: not-allowed;
}

.eeco-inline-editor-slot {
  margin-top: 14px;
}

.eeco-inline-editor-slot[hidden] {
  display: none !important;
}

.eeco-inline-editor-slot .eeco-editor-layer {
  position: static;
  inset: auto;
  display: block;
  z-index: auto;
}

.eeco-inline-editor-slot .eeco-editor-backdrop {
  display: none !important;
}

.eeco-inline-editor-slot .eeco-editor-drawer {
  position: static;
  display: grid;
  grid-template-rows: auto auto auto;
  width: 100%;
  height: auto;
  max-height: none;
  overflow: visible;
  background: #fff;
  border: 1px solid #93c5fd;
  border-radius: 14px;
  box-shadow: 0 12px 30px rgba(30, 64, 175, .1);
  animation: eecoInlineEditorIn .2s ease-out;
}

@keyframes eecoInlineEditorIn {
  from {
    transform: translateY(-6px);
    opacity: .35;
  }

  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.eeco-inline-editor-slot .eeco-editor-header {
  position: static;
  padding: 17px 19px 14px;
  background: linear-gradient(135deg, #eff6ff, #f8fafc);
  border-radius: 14px 14px 0 0;
}

.eeco-inline-editor-slot .eeco-editor-body {
  max-height: none;
  overflow: visible;
  padding: 18px 19px;
  background: linear-gradient(135deg, #eff6ff, #f8fafc);
}

.eeco-inline-editor-slot .eeco-editor-footer {
  position: static;
  padding: 13px 19px;
  background: #f8fafc;
  border-radius: 0 0 14px 14px;
}

@media (max-width: 900px) {
  .eeco-event-details-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 650px) {
  .eeco-event-details-panel {
    padding: 12px 14px;
  }

  .eeco-event-details-header {
    align-items: flex-start;
  }

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

.eeco-remove-action::before {
  content: "" !important;
  position: absolute !important;
  left: 50% !important;
  top: 13px !important;
  display: block !important;
  width: 12px !important;
  height: 13px !important;
  border: 2px solid currentColor !important;
  border-top: 0 !important;
  border-radius: 0 0 3px 3px !important;
  transform: translateX(-50%) !important;
}

.eeco-remove-action::after {
  content: "" !important;
  position: absolute !important;
  left: 50% !important;
  top: 7px !important;
  display: block !important;
  width: 17px !important;
  height: 8px !important;
  background:
    linear-gradient(currentColor, currentColor) center top / 7px 2px no-repeat,
    linear-gradient(currentColor, currentColor) center bottom / 17px 2px no-repeat !important;
  transform: translateX(-50%) !important;
}

.eeco-remove-action:hover {
  color: #ffffff !important;
  background: #dc2626 !important;

}

.eeco-add-record-btn {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
}

.eeco-add-record-btn::before,
.eeco-add-item::before {
  content: "" !important;
  display: block !important;
  flex: 0 0 15px !important;
  width: 15px !important;
  height: 15px !important;
  background:
    linear-gradient(currentColor, currentColor) center / 2px 15px no-repeat,
    linear-gradient(currentColor, currentColor) center / 15px 2px no-repeat !important;
}

.eeco-close-btn,
.eeco-drawer-close {
  position: relative !important;
  z-index: 10 !important;
  font-family: "Avenir Next", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  font-size: 20px !important;
  font-weight: 800 !important;
  line-height: 1 !important;
  background: #f200009c;
  color: #fff;
}

/* Keep the complete studio header and its X button above the fixed site header. */
.eeco-modal {
  z-index: 2147483000 !important;
}

/* ==========================================================
   Professional Add / Edit Event Form
   ========================================================== */
body.event-form-open {
  overflow: hidden;
}

.event-add-btn {
  min-height: 42px;
  padding: 10px 18px;
  border-radius: 9px;
  background: linear-gradient(135deg, #316ef5, #4f83f7);
  box-shadow: 0 8px 18px rgba(49, 110, 245, 0.22);
  font-weight: 600;
}

.event-add-btn:hover {
  background: linear-gradient(135deg, #245fdc, #3d73e6);
  box-shadow: 0 10px 22px rgba(49, 110, 245, 0.3);
}

.event-form-modal,
.event-confirm-overlay {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 22px;
  background: rgba(15, 23, 42, 0.56);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
}

.event-form-modal {
  z-index: 2147483000;
}

.event-confirm-overlay {
  z-index: 2147483600;
}

/* Select-video library */
#videoLibraryModal {
  z-index: 2147483400 !important;
}

/* Video preview must appear above the library */
#videoModal {
  z-index: 2147483600 !important;
}

.event-form-dialog {
  display: grid;
  grid-template-rows: auto auto auto minmax(0, 1fr) auto;
  width: min(980px, 96vw);
  max-height: min(890px, 94vh);
  overflow: hidden;
  background: #ffffff;
  border: 1px solid rgba(99, 102, 241, 0.2);
  border-radius: 20px;
  box-shadow: 0 28px 80px rgba(15, 23, 42, 0.28);
  animation: eventFormEnter 0.22s ease-out;
}

@keyframes eventFormEnter {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.985);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.event-form-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  padding: 22px 26px 19px;
  color: #172554;
  background: linear-gradient(90deg, rgb(229 227 250 / 90%), rgb(218 241 252 / 92%));
  border-bottom: 1px solid rgba(99, 102, 241, 0.14);
}

.event-form-eyebrow {
  display: block;
  margin-bottom: 4px;
  color: #2563eb;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.event-form-header h2 {
  margin: 0;
  color: #172554;
  font-size: clamp(22px, 2.6vw, 30px);
  line-height: 1.2;
}

.event-form-header p {
  margin: 6px 0 0;
  color: #53627a;
  font-size: 13px;
}

.event-form-close {
  flex: 0 0 38px;
  width: 38px;
  height: 38px;
  margin: 0;
  padding: 0;
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: 10px;
  color: #334155;
  background: rgba(255, 255, 255, 0.8);
  font-size: 25px;
  line-height: 1;
}

.event-form-close:hover {
  color: #ffffff;
  background: #dc2626;
  border-color: #dc2626;
}

.event-form-scope {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  padding: 13px 26px;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
}

.event-form-scope span {
  min-width: 0;
}

.event-form-scope small,
.event-form-scope strong {
  display: block;
}

.event-form-scope small {
  margin-bottom: 2px;
  color: #64748b;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.event-form-scope strong {
  overflow: hidden;
  color: #1e293b;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.event-form-message {
  margin: 14px 26px 0;
  padding: 11px 13px;
  color: #991b1b;
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 9px;
  font-size: 13px;
  font-weight: 500;
}

#eventDetailsForm {
  overflow-y: auto;
  padding: 20px 26px 24px;
  scrollbar-width: thin;
  scrollbar-color: #b7c7e8 transparent;
}

.event-form-section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.event-form-section-heading h3 {
  margin: 0;
  color: #1e3a8a;
  font-size: 16px;
}

.event-form-section-heading p {
  margin: 3px 0 0;
  color: #64748b;
  font-size: 11px;
}

.event-form-section-heading p span,
.event-form-field>span b {
  color: #dc2626;
}

.event-form-section-heading.automation-heading {
  margin-top: 24px;
  padding-top: 19px;
  border-top: 1px solid #e2e8f0;
}

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

.event-form-grid.compact-grid {
  align-items: start;
}

.event-form-field {
  display: flex;
  flex-direction: column;
  min-width: 0;
  margin: 0;
}

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

.event-form-field>span {
  margin-bottom: 7px;
  color: #25324a;
  font-size: 12px;
  font-weight: 600;
}

.event-form-field>small {
  margin-top: 6px;
  color: #718096;
  font-size: 10.5px;
  font-weight: 400;
}

.event-form-field input[type="text"],
.event-form-field input[type="time"],
.event-form-field select,
.event-form-field textarea {
  width: 100%;
  min-height: 44px;
  margin: 0;
  padding: 10px 12px;
  color: #172554;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 9px;
  outline: none;
  font: 500 13px/1.4 'Poppins', system-ui, sans-serif;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;
}

.event-form-field textarea {
  min-height: 86px;
  resize: vertical;
}

.event-form-field input:hover,
.event-form-field select:hover,
.event-form-field textarea:hover {
  border-color: #7ca4f8;
  background: #fbfdff;
}

.event-form-field input:focus,
.event-form-field select:focus,
.event-form-field textarea:focus {
  border-color: #467ef7;
  box-shadow: 0 0 0 4px rgba(70, 126, 247, 0.14);
  background: #ffffff;
}

.event-form-field [aria-invalid="true"] {
  border-color: #dc2626;
  background: #fffafa;
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
}

.event-form-field select:disabled {
  color: #94a3b8;
  background: #f1f5f9;
  cursor: not-allowed;
}

.event-toggle-field {
  min-height: 96px;
  padding: 13px 14px;
  background: linear-gradient(135deg, #f8f7ff, #f1f9ff);
  border: 1px solid #dbe6f7;
  border-radius: 11px;
}

.event-form-switch {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  width: fit-content;
  cursor: pointer;
}

.event-form-switch input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.event-form-switch>span {
  position: relative;
  display: block;
  width: 42px;
  height: 24px;
  background: #cbd5e1;
  border-radius: 999px;
  transition: background 0.2s ease;
}

.event-form-switch>span::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  background: #ffffff;
  border-radius: 50%;
  box-shadow: 0 2px 5px rgba(15, 23, 42, 0.25);
  transition: transform 0.2s ease;
}

.event-form-switch input:checked+span {
  background: #3b82f6;
}

.event-form-switch input:checked+span::after {
  transform: translateX(18px);
}

.event-form-switch em {
  color: #475569;
  font-size: 12px;
  font-style: normal;
  font-weight: 600;
}

.event-video-picker {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 12px;
  min-height: 66px;
  padding: 12px 14px;
  background: linear-gradient(90deg, rgb(239 237 255 / 80%), rgb(235 248 255 / 86%));
  border: 1px solid #cbdcf4;
  border-radius: 11px;
}

.event-video-picker strong,
.event-video-picker small {
  display: block;
}

.event-video-picker strong {
  color: #1e3a8a;
  font-size: 12px;
}

.event-video-picker small {
  margin-top: 2px;
  color: #64748b;
  font-size: 10.5px;
}

.event-form-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 15px 26px;
  background: #f8fafc;
  border-top: 1px solid #e2e8f0;
}

.event-form-footer p {
  display: flex;
  align-items: center;
  gap: 7px;
  max-width: 520px;
  margin: 0;
  color: #64748b;
  font-size: 10.5px;
}

.event-form-footer p>span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
  color: #2563eb;
  background: #dbeafe;
  border-radius: 50%;
  font-weight: 700;
}

.event-form-footer>div,
.event-confirm-actions {
  display: flex;
  justify-content: center;
  gap: 10px;
}

.event-btn-primary,
.event-btn-secondary,
.event-btn-danger,
.event-link-danger {
  min-height: 40px;
  margin: 0;
  padding: 9px 16px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
}

.event-btn-primary {
  color: #ffffff;
  background: linear-gradient(135deg, #316ef5, #4f83f7);
  box-shadow: 0 7px 16px rgba(49, 110, 245, 0.2);
}

.event-btn-secondary {
  color: #334155;
  background: #ffffff;
  border: 1px solid #cbd5e1;
}

.event-btn-secondary:hover {
  color: #1d4ed8;
  background: #eff6ff;
  border-color: #93c5fd;
}

.event-btn-danger {
  color: #ffffff;
  background: #dc2626;
  box-shadow: 0 7px 16px rgba(220, 38, 38, 0.18);
}

.event-link-danger {
  min-height: auto;
  padding: 7px 2px;
  color: #b91c1c;
  background: transparent;
}

.event-confirm-card {
  width: min(450px, 94vw);
  padding: 27px;
  text-align: center;
  background: #ffffff;
  border: 1px solid rgba(99, 102, 241, 0.18);
  border-radius: 18px;
  box-shadow: 0 26px 70px rgba(15, 23, 42, 0.3);
  animation: eventFormEnter 0.18s ease-out;
}

.event-confirm-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  margin-bottom: 14px;
  color: #2563eb;
  background: linear-gradient(135deg, #e0e7ff, #dff4ff);
  border-radius: 14px;
  font-size: 21px;
  font-weight: 800;
}

.event-confirm-icon.danger {
  color: #b91c1c;
  background: #fee2e2;
}

.event-confirm-card h3 {
  margin: 0;
  color: #172554;
  font-size: 20px;
}

.event-confirm-card>p {
  margin: 8px auto 0;
  color: #64748b;
  font-size: 12.5px;
  line-height: 1.6;
}

.event-confirm-summary {
  margin: 16px 0 0;
  padding: 11px 13px;
  overflow-wrap: anywhere;
  color: #334155;
  background: linear-gradient(90deg, rgb(239 237 255 / 74%), rgb(235 248 255 / 80%));
  border: 1px solid #d8e2f3;
  border-radius: 9px;
  font-size: 11.5px;
  font-weight: 600;
  text-align: left;
}

.event-confirm-actions {
  margin-top: 21px;
}

.row-actions .edit-btn,
.row-actions .delete-btn,
.row-actions .save-btn {
  box-sizing: border-box;
  width: 34px;
  min-width: 34px;
  height: 34px;
  margin: 2px;
  padding: 0;
  border-radius: 8px;
}

.row-actions .edit-btn {
  color: #ffffff;
  background: #2563eb;
  font-size: 18px;
}

.row-actions .edit-btn:hover {
  background: #1d4ed8;
}

.eeco-event-context-item {
  min-width: 0;
  padding: 10px 12px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 9px;
}

.eeco-event-context-item span,
.eeco-event-context-item strong {
  display: block;
}

.eeco-event-context-item span {
  margin-bottom: 3px;
  color: #64748b;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
}

.eeco-event-context-item strong {
  overflow: hidden;
  color: #1e293b;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 760px) {
  .event-form-modal {
    padding: 8px;
  }

  .event-form-dialog {
    width: 100%;
    max-height: 98vh;
    border-radius: 14px;
  }

  .event-form-header,
  .event-form-footer {
    padding-left: 17px;
    padding-right: 17px;
  }

  .event-form-scope {
    grid-template-columns: 1fr;
    padding-left: 17px;
    padding-right: 17px;
  }

  #eventDetailsForm {
    padding-left: 17px;
    padding-right: 17px;
  }

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

  .event-form-field-wide {
    grid-column: auto;
  }

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

  .event-form-footer {
    align-items: stretch;
    flex-direction: column;
  }

  .event-form-footer>div {
    width: 100%;
  }

  .event-form-footer button {
    flex: 1;
  }
}

/* ==========================================================
   Refined form layout and operational video experience
   ========================================================== */
.event-form-dialog {
  width: min(940px, 94vw);
  max-height: 91vh;
  border-radius: 16px;
}

.event-form-header {
  padding: 18px 24px 16px;
}

.event-form-header h2 {
  font-size: 27px;
}

.event-form-scope {
  display: flex;
  gap: 34px;
  padding: 10px 24px;
}

.event-form-scope span {
  flex: 1 1 0;
}

#eventDetailsForm {
  padding: 16px 22px 20px;
  background: #f6f8fc;
}

.event-form-section-heading {
  margin: 0 0 9px;
  padding: 0 4px;
}

.event-form-section-heading h3 {
  position: relative;
  padding-left: 11px;
  font-size: 15px;
}

.event-form-section-heading h3::before {
  content: "";
  position: absolute;
  left: 0;
  top: 2px;
  width: 3px;
  height: 17px;
  background: linear-gradient(#6d67dc, #3f9bd8);
  border-radius: 999px;
}

.event-form-section-heading.automation-heading {
  margin-top: 15px;
  padding: 0 4px;
  border-top: 0;
}

.event-form-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  padding: 4px 20px;
  background: #ffffff;
  border: 1px solid #dde5f0;
  border-radius: 12px;
  box-shadow: 0 7px 20px rgba(37, 55, 92, 0.06);
}

.event-form-field,
.event-toggle-field {
  display: grid;
  grid-template-columns: 175px minmax(0, 1fr);
  grid-template-areas:
    "label control"
    ". help";
  align-items: center;
  column-gap: 18px;
  row-gap: 3px;
  min-height: 61px;
  padding: 10px 0;
  background: transparent;
  border: 0;
  border-bottom: 1px solid #edf1f6;
  border-radius: 0;
}

.event-form-grid>.event-form-field:last-child,
.event-form-grid>.event-toggle-field:last-child {
  border-bottom: 0;
}

.event-form-field-wide {
  grid-column: auto;
}

.event-form-field>span {
  grid-area: label;
  align-self: start;
  margin: 11px 0 0;
  color: #273650;
  font-size: 12.5px;
  font-weight: 600;
}

.event-form-field>small {
  grid-area: help;
  margin: 2px 0 0;
  font-size: 10px;
}

.event-form-field input[type="text"],
.event-form-field input[type="time"],
.event-form-field select,
.event-form-field textarea {
  grid-area: control;
  min-height: 40px;
  padding: 8px 11px;
  border-radius: 7px;
  font-size: 12.5px;
}

.event-form-field textarea {
  min-height: 72px;
}

.event-form-switch {
  grid-area: control;
}

.event-video-picker {
  grid-area: control;
  min-height: 56px;
  padding: 9px 11px;
  background: #f8fbff;
  border-color: #dbe5f2;
  border-radius: 8px;
}

.event-form-footer {
  padding: 12px 22px;
}

/* Compact table video controls */
.event-video-actions {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.video-cell-btn {
  width: 34px;
  min-width: 34px;
  height: 34px;
  margin: 0;
  padding: 0;
  color: #2866df;
  background: #ffffff;
  border: 1px solid #a9c5fb;
  border-radius: 9px;
  box-shadow: 0 3px 9px rgba(37, 99, 235, 0.1);
}

.video-cell-btn svg,
.row-actions button svg,
.video-preview-btn svg,
.video-select-btn svg,
.video-library-mark svg,
.video-library-search svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.video-cell-btn:hover {
  color: #ffffff;
  background: #316ef5;
  border-color: #316ef5;
  box-shadow: 0 6px 14px rgba(49, 110, 245, 0.25);
}

.video-cell-btn-add {
  color: #475569;
  border-style: dashed;
  border-color: #9fb2ca;
  box-shadow: none;
}

.row-actions button svg {
  width: 17px;
  height: 17px;
}

/* Clean operational-video picker dialog */
.video-library-dialog.library-innermodal {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  top: auto;
  width: min(880px, 94vw);
  max-width: none !important;
  max-height: 82vh;
  padding: 0;
  overflow: hidden;
  background: #ffffff;
  border: 1px solid rgba(99, 102, 241, 0.2);
  border-radius: 16px;
  box-shadow: 0 28px 80px rgba(15, 23, 42, 0.3);
  animation: eventFormEnter 0.2s ease-out;
}

.video-library-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 20px;
  background: linear-gradient(90deg, rgb(231 229 251 / 94%), rgb(220 242 252 / 96%));
  border-bottom: 1px solid #dce5f2;
}

.video-library-title-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
}

.video-library-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 42px;
  width: 42px;
  height: 42px;
  color: #316ef5;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(49, 110, 245, 0.18);
  border-radius: 11px;
}

.video-library-mark svg {
  width: 22px;
  height: 22px;
}

.video-library-eyebrow {
  display: block;
  margin-bottom: 2px;
  color: #316ef5;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.video-library-header h3 {
  margin: 0;
  color: #172554;
  font-size: 20px;
  line-height: 1.2;
}

.video-library-header p {
  margin: 4px 0 0;
  color: #64748b;
  font-size: 11px;
}

.video-library-close {
  flex: 0 0 36px;
  width: 36px;
  height: 36px;
  margin: 0;
  padding: 0;
  color: #475569;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid #cbd5e1;
  border-radius: 9px;
  font-size: 23px;
  line-height: 1;
}

.video-library-close:hover {
  color: #ffffff;
  background: #dc2626;
  border-color: #dc2626;
}

.video-library-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 13px 20px;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
}

.video-library-search {
  position: relative;
  display: block;
  width: min(430px, 100%);
}

.video-library-search svg {
  position: absolute;
  top: 50%;
  left: 12px;
  width: 16px;
  height: 16px;
  color: #64748b;
  transform: translateY(-50%);
  pointer-events: none;
}

.video-library-search .videoSearchInput {
  width: 100%;
  min-height: 40px;
  margin: 0;
  padding: 8px 12px 8px 38px;
  color: #1e293b;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  outline: none;
  font: 500 12px 'Poppins', system-ui, sans-serif;
}

.video-library-search .videoSearchInput:focus {
  border-color: #467ef7;
  box-shadow: 0 0 0 3px rgba(70, 126, 247, 0.13);
}

.video-library-help {
  color: #64748b;
  font-size: 10.5px;
}

.video-library-table-wrap {
  position: relative;
  min-height: 0;
  padding: 0 20px 18px;
  overflow: hidden;
  background: #ffffff;
}

#videoLibraryTable {
  width: 100%;
  table-layout: fixed;
  border-collapse: separate;
  border-spacing: 0;
  background: #ffffff;
}

#videoLibraryTable thead {
  display: table;
  width: 100%;
  table-layout: fixed;
}

#videoLibraryTable tbody {
  display: block;
  width: 100%;
  max-height: min(470px, 53vh);
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: #b8c8df transparent;
}

#videoLibraryTable tbody tr {
  display: table;
  width: 100%;
  table-layout: fixed;
  background: #ffffff;
  transition: background-color 0.16s ease;
}

#videoLibraryTable tbody tr:nth-child(even) {
  background: #f8fbff;
}

#videoLibraryTable tbody tr:hover {
  background: #eef5ff;
}

#videoLibraryTable th,
#videoLibraryTable td {
  height: auto;
  padding: 10px 12px;
  color: #26354d;
  border: 0;
  border-bottom: 1px solid #e5ebf3;
  font-family: "Avenir Next", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  text-align: left;
  vertical-align: middle;
}

#videoLibraryTable th {
  padding-top: 12px;
  padding-bottom: 8px;
  color: #64748b;
  background: #ffffff;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

#videoLibraryTable th:first-child,
#videoLibraryTable td:first-child {
  width: 58%;
}

#videoLibraryTable th:nth-child(2),
#videoLibraryTable td:nth-child(2) {
  width: 18%;
  text-align: center;
}

#videoLibraryTable th:nth-child(3),
#videoLibraryTable td:nth-child(3) {
  width: 24%;
  text-align: right;
}

.video-purpose-text {
  display: block;
  color: #25324a;
  font-size: 11.5px;
  font-weight: 500;
  line-height: 1.45;
}

.video-preview-btn,
.video-select-btn {
  min-height: 34px;
  margin: 0;
  padding: 7px 11px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 600;
  gap: 6px;
}

.video-preview-btn {
  color: #315a9e;
  background: #ffffff;
  border: 1px solid #b7cae7;
}

.video-preview-btn:hover {
  color: #1d4ed8;
  background: #eff6ff;
  border-color: #7fa7ec;
}

.video-select-btn {
  color: #ffffff;
  background: #316ef5;
  border: 1px solid #316ef5;
  box-shadow: 0 4px 10px rgba(49, 110, 245, 0.18);
}

.video-select-btn:hover {
  background: #245fdc;
  border-color: #245fdc;
}

.video-preview-btn svg,
.video-select-btn svg {
  width: 15px;
  height: 15px;
}

.video-library-empty {
  margin: 18px 0 0;
  padding: 28px 18px;
  text-align: center;
  background: #f8fafc;
  border: 1px dashed #cbd5e1;
  border-radius: 10px;
}

.video-library-empty strong,
.video-library-empty span {
  display: block;
}

.video-library-empty strong {
  color: #334155;
  font-size: 13px;
}

.video-library-empty span {
  margin-top: 4px;
  color: #64748b;
  font-size: 11px;
}

@media (max-width: 760px) {
  .event-form-scope {
    display: grid;
    gap: 8px;
  }

  .event-form-grid {
    padding: 5px 14px;
  }

  .event-form-field,
  .event-toggle-field {
    grid-template-columns: 1fr;
    grid-template-areas: "label" "control" "help";
    gap: 4px;
    padding: 11px 0;
  }

  .event-form-field>span {
    margin: 0 0 3px;
  }

  .video-library-toolbar {
    align-items: stretch;
    flex-direction: column;
    gap: 8px;
  }

  .video-library-help {
    display: none;
  }

  .video-library-table-wrap {
    padding: 0 10px 12px;
  }

  #videoLibraryTable th:first-child,
  #videoLibraryTable td:first-child {
    width: 50%;
  }

  #videoLibraryTable th:nth-child(2),
  #videoLibraryTable td:nth-child(2) {
    width: 20%;
  }

  #videoLibraryTable th:nth-child(3),
  #videoLibraryTable td:nth-child(3) {
    width: 30%;
  }

  .video-preview-btn span,
  .video-select-btn span {
    display: none;
  }
}

/* ==========================================================
   Table action containment and fixed form footer
   ========================================================== */
#internalTable,
#externalTable {
  min-width: 1300px;
}

#internalTable th:last-child,
#internalTable td:last-child,
#externalTable th:last-child,
#externalTable td:last-child {
  box-sizing: border-box;
  width: 96px;
  min-width: 96px;
  max-width: 96px;
}

#internalTable td.row-actions,
#externalTable td.row-actions {
  padding: 4px;
  text-align: center;
  white-space: nowrap;
}

.event-form-dialog {
  height: min(820px, calc(100dvh - 44px));
  max-height: calc(100dvh - 44px);
  min-height: 0;
  grid-template-areas:
    "event-header"
    "event-scope"
    "event-message"
    "event-body"
    "event-footer";
}

#eventFormModal .event-form-header {
  grid-area: event-header;
}

#eventFormModal .event-form-scope {
  grid-area: event-scope;
}

#eventFormMessage {
  grid-area: event-message;
}

#eventDetailsForm {
  grid-area: event-body;
  min-height: 0;
  overscroll-behavior: contain;
}

.event-form-footer {
  grid-area: event-footer;
  position: relative;
  z-index: 2;
  flex: none;
  min-height: 64px;
  box-sizing: border-box;
  box-shadow: 0 -8px 20px rgba(15, 23, 42, 0.06);
}

@media (max-width: 760px) {
  .event-form-dialog {
    height: calc(100dvh - 16px);
    max-height: calc(100dvh - 16px);
  }
}


/* MicroClips appearance layer. Existing layout, typography, state and interaction rules are preserved. */
body:has(.event-workspace) {
  background: #f6f8fd;
}

main:has(.event-workspace) {
  --mc-accent: #5264d9;
  --mc-accent-hover: #4051bd;
  --mc-ink: #30364b;
  --mc-body: #596176;
  --mc-muted: #69738b;
  --mc-line: #e0e4f1;
  --mc-lavender: #efedfc;
  --mc-sky: #eaf5fc;
  --fintech-blue: #5264d9;
  --text-dark: #30364b;
  --text-black: #596176;
  color: var(--mc-body);
}

main .hero-badge {
  color: var(--mc-accent);
  background: rgba(255, 255, 255, .82);
  border-radius: 999px;
  box-shadow: 0 5px 18px rgba(85, 95, 148, .06);
}

main .hero-description {
  color: var(--mc-body);
}

main :is(.workspace-heading h2, .saved-config-header-title h2) {
  color: var(--mc-ink);
}

main :is(.workspace-eyebrow, .event-form-eyebrow, .video-library-eyebrow) {
  color: var(--mc-accent);
}

main .event-family-tab {
  background: #f5f2fc;
  border-color: #ddd9f0;
  color: var(--mc-ink);
  border-radius: 18px;
  box-shadow: 0 6px 20px rgba(85, 95, 148, .05);
}

main .event-family-tab:nth-child(even) {
  background: #edf7fc;
  border-color: #d8e9f1;
}

main .event-family-tab:hover {
  background: #e9e5fa;
  border-color: #b5bde4;
}

main .event-family-tab.active,
main .event-family-tab[aria-selected="true"] {
  background: linear-gradient(110deg, #e8e4fa, #e5f2fc);
  border-color: #aeb8e4;
  color: var(--mc-accent);
  box-shadow: 0 8px 22px rgba(85, 95, 148, .09);
}

main .event-family-tab strong {
  color: var(--mc-ink);
}

main .event-family-tab small {
  color: var(--mc-muted);
}

main :is(.tab-count, .tab-icon, .workspace-stat.accent, .eeco-open-icon) {
  color: var(--mc-accent);
  background: #efedfc;
  border-color: #ddd9f1;
}

main :is(.workspace-stat, .empty-state, .animated-container) {
  background: #fff;
  border-color: var(--mc-line);
  border-radius: 20px;
  box-shadow: 0 10px 26px rgba(85, 95, 148, .06);
}

main :is(#internalTableContainer, #externalTableContainer) {
  background: rgba(255, 255, 255, .85);
  border-color: var(--mc-line);
  border-radius: 22px;
  box-shadow: 0 10px 30px rgba(85, 95, 148, .06);
}

main :is(.saved-config-header, .InternalContainer-top-section) {
  background: #f8f7fd;
  border-color: var(--mc-line);
}

main :is(#internalTable, #externalTable, #videoLibraryTable) {
  background: #fff;
  color: var(--mc-ink);
  border-color: var(--mc-line);
}

main :is(#internalTable, #externalTable, #videoLibraryTable) thead th {
  background: #efedfc;
  color: var(--mc-ink);
  border-color: var(--mc-line);
}

main :is(#internalTable, #externalTable, #videoLibraryTable) tbody td {
  border-color: var(--mc-line);
}

main :is(#internalTable, #externalTable, #videoLibraryTable) tbody tr:nth-child(odd) {
  background-color: #fff;
}

main :is(#internalTable, #externalTable, #videoLibraryTable) tbody tr:nth-child(even) {
  background-color: #f8f9fd;
}

main :is(#internalTable, #externalTable, #videoLibraryTable) tbody tr:hover {
  background-color: #f1effb;
}

main :is(.table-search-input, .event-category-dropdown, .activity-type-dropdown, .scheduler-dropdown, .single-time-picker, .videoSearchInput) {
  background: #fff;
  color: var(--mc-ink);
  border-color: #d5dcef;
  border-radius: 12px;
}

main :is(.table-search-input, .event-category-dropdown, .activity-type-dropdown, .scheduler-dropdown, .single-time-picker, .videoSearchInput):focus {
  border-color: #8e9bdd;
  box-shadow: 0 0 0 3px rgba(82, 100, 217, .12);
}

main :is(.toggle-btn, .event-add-btn, .time-filter-btn, .video-select-btn) {
  background: var(--mc-accent);
  color: #fff;
  border-color: var(--mc-accent);
  border-radius: 999px;
  box-shadow: 0 6px 16px rgba(82, 100, 217, .14);
}

main :is(.toggle-btn, .event-add-btn, .time-filter-btn, .video-select-btn):hover:not(:disabled) {
  background: var(--mc-accent-hover);
  border-color: var(--mc-accent-hover);
  color: #fff;
}

main .row-actions .save-btn {
  background: #efedfc;
  color: var(--mc-accent);
  border-color: #dcd8ef;
}

main .video-icon-btn {
  background: linear-gradient(135deg, #7a88e8, #5264d9);
  color: #fff;
  box-shadow: 0 5px 14px rgba(82, 100, 217, .16);
}

main .video-icon-btn:hover {
  background: linear-gradient(135deg, #6979dc, #4051bd);
}

main .info-icon {
  color: var(--mc-accent);
}

main .info-popover {
  background: #fff;
  color: var(--mc-ink);
  border-color: var(--mc-line);
  border-radius: 14px;
  box-shadow: 0 10px 28px rgba(85, 95, 148, .14);
}

main :is(.innermodal, .library-innermodal, .event-form-dialog, .event-confirm-card, .eeco-studio-dialog, .eeco-dialog, .eeco-decision-card) {
  background: #fff;
  border-color: var(--mc-line);
  border-radius: 24px;
  box-shadow: 0 24px 70px rgba(61, 70, 110, .18);
}

main :is(.event-form-header, .video-library-header, .eeco-dialog-header, .eeco-studio-header) {
  background: linear-gradient(110deg, #f0edfc, #eaf5fc);
  color: var(--mc-ink);
  border-color: var(--mc-line);
}

main :is(.event-form-header, .video-library-header, .eeco-dialog-header, .eeco-studio-header) :is(h2, h3) {
  color: var(--mc-ink);
}

main :is(.event-form-header, .video-library-header, .eeco-dialog-header, .eeco-studio-header) p {
  color: var(--mc-body);
}

main :is(.event-form-scope, .event-form-footer, .video-library-toolbar, .event-toggle-field) {
  background: #f8f7fd;
  border-color: var(--mc-line);
}

main .event-form-scope span {
  background: #eeebfc;
  border-color: #ded9f1;
  color: var(--mc-accent);
  border-radius: 999px;
}

main .event-form-section-heading h3 {
  color: var(--mc-ink);
}

main .event-form-section-heading h3::before {
  background: var(--mc-accent);
}

main .event-form-field>span {
  color: var(--mc-ink);
}

main .event-form-field>small {
  color: var(--mc-muted);
}

main .event-form-field :is(input[type="text"], input[type="time"], select, textarea):not([aria-invalid="true"]):not(:disabled) {
  background: #fff;
  border-color: #d6dded;
  color: var(--mc-ink);
  border-radius: 12px;
}

main .event-form-field :is(input, select, textarea):focus:not([aria-invalid="true"]) {
  border-color: #8e9bdd;
  box-shadow: 0 0 0 3px rgba(82, 100, 217, .12);
}

main .event-form-switch input:checked+span {
  background: var(--mc-accent);
}

main .switch input:checked+.slider {
  background: linear-gradient(110deg, #7685e7, #5264d9);
}

main :is(.event-form-close, .video-library-close, .eeco-close-btn) {
  background: #fff;
  color: var(--mc-accent);
  border-color: var(--mc-line);
}

main .video-library-mark {
  background: #ece8fb;
  color: var(--mc-accent);
  border-color: #dfdaf1;
}

main .video-preview-btn {
  background: #fff;
  color: var(--mc-accent);
  border-color: #ccd4ee;
  border-radius: 999px;
}

main .video-preview-btn:hover {
  background: #f0edfc;
  color: var(--mc-accent);
  border-color: #adb9e3;
}

main :is(.video-library-empty, .eeco-config-cell, .eeco-formula, .eeco-hierarchy-grid section) {
  background: #f7f6fd;
  border-color: var(--mc-line);
}

main .eeco-open-btn {
  background: #fff;
  color: var(--mc-accent);
  border-color: var(--mc-line);
  border-radius: 14px;
}

main .eeco-open-btn:hover:not(:disabled) {
  border-color: #aab6e4;
  box-shadow: 0 7px 18px rgba(82, 100, 217, .12);
}

main :is(.eeco-parameter-card, .eeco-overview-card, .eeco-readiness-card) {
  background: #fff;
  border-color: var(--mc-line);
  border-radius: 18px;
  box-shadow: 0 6px 18px rgba(85, 95, 148, .04);
}

main .eeco-sequence {
  background: #efedfc;
  color: var(--mc-accent);
}

main .eeco-parameter-title>span {
  color: var(--mc-ink);
}

main .eeco-parameter-title strong {
  background: var(--mc-accent);
  color: #fff;
}

main .eeco-progress span {
  background: linear-gradient(90deg, #8b83d2, #79bbd2);
}

main .dataTables_wrapper .dataTables_paginate .paginate_button.current,
main .dataTables_wrapper .dataTables_paginate .paginate_button.current:hover {
  background: #efedfc;
  border-color: #c9cfee;
  border-radius: 10px;
}

main :is(.event-btn-primary, .eeco-primary-btn) {
  background: var(--mc-accent);
  color: #fff;
  border-color: var(--mc-accent);
  border-radius: 999px;
  box-shadow: 0 6px 16px rgba(82, 100, 217, .14);
}

main :is(.event-btn-primary, .eeco-primary-btn):hover:not(:disabled) {
  background: var(--mc-accent-hover);
  border-color: var(--mc-accent-hover);
}

main :is(.event-btn-secondary, .eeco-secondary-btn) {
  background: #fff;
  color: var(--mc-accent);
  border-color: #ccd4ee;
  border-radius: 999px;
}

main :is(.event-btn-secondary, .eeco-secondary-btn):hover:not(:disabled) {
  background: #f0edfc;
  border-color: #b5bfe6;
}

/* Keep the original definition hidden inside the table. */
.info-container > .info-popover {
  display: none !important;
}

/* Floating definition card, outside the table container. */
.column-definition-tooltip {
  position: fixed;
  z-index: 10000;
  box-sizing: border-box;
  width: min(22rem, calc(100vw - 2rem));
  padding: 14px 16px;
  background: #ffffff;
  border: 1px solid #dce1f3;
  border-top: 3px solid #5964dc;
  border-radius: 12px;
  box-shadow: 0 10px 32px rgba(36, 47, 91, 0.18);
  color: #39445d;
  font-family: "Avenir Next", "Segoe UI", system-ui,
    -apple-system, "Helvetica Neue", Arial, sans-serif;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.6;
  text-align: left;
  text-transform: none;
  white-space: normal;
  overflow-wrap: anywhere;
}

.column-definition-tooltip[hidden] {
  display: none;
}

.column-definition-title {
  display: block;
  margin-bottom: 6px;
  color: #323c79;
  font-size: 14px;
  font-weight: 600;
}

.info-icon:focus-visible {
  outline: 2px solid #5964dc;
  outline-offset: 3px;
  border-radius: 50%;
}

/* Hide the info icon and its original definition. */
#internalTable th .info-container,
#externalTable th .info-container {
    display: none !important;
}

th.column-definition-trigger {
    cursor: help;
}

th.column-definition-trigger:focus-visible {
    outline: 2px solid #5964dc;
    outline-offset: -2px;
}