.ccest-page {
  min-height: 100vh;
  background: #f8fafc;
}

.ccest-shell {
  flex: 1;
  overflow: auto;
  padding: 18px;
}

.ccest-action-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.ccest-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
  width: 100%;
  max-width: none;
  margin: 0 auto;
  align-items: start;
}

.ccest-panel {
  min-width: 0;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.05);
  overflow: hidden;
}

.ccest-panel-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
  margin-left: auto;
}

.ccest-inline-filter {
  display: inline-flex;
  align-items: center;
  min-width: 280px;
}

.ccest-inline-filter span {
  color: #64748b;
  font-size: 11px;
  font-weight: 750;
  text-transform: uppercase;
}

.ccest-inline-filter select {
  min-height: 40px;
  width: 100%;
  border: 1px solid #cbd5e1;
  border-radius: 7px;
  padding: 0 38px 0 13px;
  background: #ffffff;
  color: #334155;
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.ccest-panel__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 13px 14px;
  border-bottom: 1px solid #e2e8f0;
  background: #ffffff;
}

.ccest-panel__title {
  margin: 0;
  color: #0f172a;
  font-size: 16px;
  font-weight: 750;
}

.ccest-panel__text {
  margin: 4px 0 0;
  color: #64748b;
  font-size: 13px;
}

.ccest-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: #334155;
  font-weight: 700;
  line-height: 1;
  cursor: default;
}

.ccest-btn {
  gap: 8px;
  min-height: 36px;
  padding: 0 13px;
  border-radius: 7px;
  font-size: 13px;
}

.ccest-btn .material-symbols-outlined {
  font-size: 18px;
}

.ccest-btn--primary {
  border-color: #0f766e;
  background: #0f766e;
  color: #ffffff;
}

.ccest-btn--ghost {
  border-color: #cbd5e1;
  background: #f8fafc;
}

.ccest-btn--danger {
  border-color: #fecdd3;
  background: #fff1f2;
  color: #be123c;
}

.ccest-btn:disabled {
  opacity: 0.62;
  cursor: wait;
}

.ccest-search {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 14px 14px 0;
  min-height: 40px;
  padding: 0 12px;
  border: 1px solid #cbd5e1;
  border-radius: 7px;
  background: #ffffff;
  color: #64748b;
}

.ccest-search .material-symbols-outlined {
  font-size: 18px;
}

.ccest-search input {
  min-width: 0;
  width: 100%;
  border: 0;
  outline: 0;
  color: #0f172a;
  font-size: 14px;
}

.ccest-search input::placeholder {
  color: #94a3b8;
}

.ccest-state-list {
  display: grid;
  gap: 10px;
  padding: 14px;
  max-height: calc(100vh - 220px);
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: #cbd5e1 transparent;
}

.ccest-state-list::-webkit-scrollbar {
  width: 6px;
}

.ccest-state-list::-webkit-scrollbar-track {
  background: transparent;
}

.ccest-state-list::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: #cbd5e1;
}

.ccest-state-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  padding: 12px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #f8fafc;
}

.ccest-state-card__main {
  min-width: 0;
}

.ccest-state-card__badge {
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  padding: 0 7px;
  border-radius: 999px;
  background: #e0f2fe;
  color: #075985;
  font-size: 11px;
  font-weight: 750;
}

.ccest-state-card h3 {
  margin: 8px 0 2px;
  color: #0f172a;
  font-size: 15px;
  font-weight: 750;
}

.ccest-state-card p {
  margin: 0;
  color: #64748b;
  font-size: 13px;
}

.ccest-substate-list {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.ccest-substate-list span {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  background: #ffffff;
  color: #475569;
  font-size: 12px;
  font-weight: 650;
}

.ccest-empty-state {
  display: grid;
  place-items: center;
  gap: 8px;
  min-height: 180px;
  border: 1px dashed #cbd5e1;
  border-radius: 8px;
  background: #ffffff;
  color: #64748b;
  text-align: center;
}

.ccest-empty-state .material-symbols-outlined {
  color: #94a3b8;
  font-size: 28px;
}

.ccest-empty-state p {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
}

.ccest-assignment-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding: 0;
  margin-bottom: 14px;
}

.ccest-field {
  display: grid;
  gap: 7px;
}

.ccest-field span {
  color: #475569;
  font-size: 12px;
  font-weight: 750;
  text-transform: uppercase;
}

.ccest-field select {
  min-width: 0;
  width: 100%;
  min-height: 42px;
  border: 1px solid #cbd5e1;
  border-radius: 7px;
  padding: 0 11px;
  background: #ffffff;
  color: #0f172a;
  font-size: 14px;
}

.ccest-field input {
  min-width: 0;
  width: 100%;
  min-height: 42px;
  border: 1px solid #cbd5e1;
  border-radius: 7px;
  padding: 0 11px;
  background: #ffffff;
  color: #0f172a;
  font-size: 14px;
}

.ccest-campaign-view {
  margin: 0 0 14px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  overflow: hidden;
  background: #ffffff;
}

.ccest-campaign-view__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-bottom: 1px solid #e2e8f0;
  background: #f8fafc;
}

.ccest-campaign-view__head h3 {
  margin: 0;
  color: #0f172a;
  font-size: 14px;
  font-weight: 750;
}

.ccest-campaign-view__head span {
  color: #64748b;
  font-size: 12px;
  font-weight: 700;
}

.ccest-campaign-states {
  display: grid;
}

.ccest-campaign-states article {
  display: grid;
  gap: 3px;
  padding: 12px 14px;
  border-bottom: 1px solid #e2e8f0;
}

.ccest-campaign-states article:last-child {
  border-bottom: 0;
}

.ccest-campaign-states strong {
  color: #0f172a;
  font-size: 14px;
}

.ccest-campaign-states span {
  color: #64748b;
  font-size: 12px;
}

.ccest-campaign-empty {
  margin: 0;
  padding: 14px;
  color: #64748b;
  font-size: 13px;
}

.ccest-transfer {
  margin: 0 0 14px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  overflow: hidden;
}

.ccest-transfer__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
}

.ccest-transfer__head h3 {
  margin: 0;
  color: #0f172a;
  font-size: 14px;
  font-weight: 750;
}

.ccest-transfer__head span {
  color: #0f766e;
  font-size: 12px;
  font-weight: 750;
}

.ccest-link-button {
  border: 0;
  background: transparent;
  color: #0f766e;
  font-size: 12px;
  font-weight: 750;
  cursor: pointer;
}

.ccest-link-button:hover {
  color: #115e59;
  text-decoration: underline;
}

.ccest-check-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 13px 14px;
  border-bottom: 1px solid #e2e8f0;
  background: #ffffff;
}

.ccest-check-row:last-child {
  border-bottom: 0;
}

.ccest-check-row input {
  width: 16px;
  height: 16px;
  margin-top: 2px;
  accent-color: #0f766e;
}

.ccest-check-row span {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.ccest-check-row strong {
  color: #0f172a;
  font-size: 14px;
}

.ccest-check-row small {
  color: #64748b;
  font-size: 12px;
}

.ccest-summary {
  margin: 0;
  padding: 12px;
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  background: #eff6ff;
}

.ccest-summary h3 {
  margin: 0 0 12px;
  color: #1e3a8a;
  font-size: 14px;
  font-weight: 750;
}

.ccest-summary dl {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
}

.ccest-summary div {
  min-width: 0;
  padding: 9px 10px;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.7);
}

.ccest-summary dt {
  color: #475569;
  font-size: 11px;
  font-weight: 750;
  text-transform: uppercase;
}

.ccest-summary dd {
  margin: 4px 0 0;
  color: #0f172a;
  font-size: 14px;
  font-weight: 750;
}

.ccest-replace-option {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 12px;
  padding: 10px 11px;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.72);
}

.ccest-replace-option input {
  width: 16px;
  height: 16px;
  margin-top: 2px;
  accent-color: #0f766e;
}

.ccest-replace-option span {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.ccest-replace-option strong {
  color: #0f172a;
  font-size: 13px;
}

.ccest-replace-option small {
  color: #64748b;
  font-size: 12px;
}

.ccest-feedback {
  margin: 12px 0 0;
  padding: 10px 11px;
  border-radius: 7px;
  color: #334155;
  background: rgba(255, 255, 255, 0.72);
  font-size: 13px;
  font-weight: 650;
}

.ccest-feedback[data-type="success"] {
  color: #065f46;
  background: #d1fae5;
}

.ccest-feedback[data-type="danger"] {
  color: #9f1239;
  background: #ffe4e6;
}

.ccest-modal[hidden] {
  display: none;
}

body.ccest-modal-open {
  overflow: hidden;
}

.ccest-modal {
  position: fixed;
  inset: 0;
  z-index: 2190;
  display: grid;
  place-items: center;
  padding: 1.5rem;
}

.ccest-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.22);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.ccest-modal-panel {
  position: relative;
  width: min(38rem, calc(100vw - 3rem));
  max-height: min(38rem, calc(100vh - 3rem));
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(203, 213, 225, 0.9);
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.97);
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.22);
}

.ccest-modal-panel--wide {
  width: min(48rem, calc(100vw - 3rem));
}

.ccest-modal-footer {
  border-color: #e5e7eb;
}

.ccest-modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.15rem 1.2rem 1rem;
  border-bottom: 1px solid #e5e7eb;
}

.ccest-modal-eyebrow {
  margin: 0 0 0.2rem;
  color: #9ca3af;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.ccest-modal-title {
  margin: 0;
  color: #111827;
  font-size: 1.25rem;
  font-weight: 760;
  line-height: 1.2;
}

.ccest-modal-close {
  width: 2rem;
  height: 2rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 2rem;
  border: 0;
  border-radius: 0.45rem;
  background: transparent;
  color: #6b7280;
  cursor: pointer;
}

.ccest-modal-close:hover {
  background: #f3f4f6;
  color: #111827;
}

.ccest-modal-close .material-symbols-outlined {
  font-size: 1.15rem;
}

.ccest-modal-body {
  overflow: auto;
  padding: 1.2rem;
}

.ccest-modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 0.65rem;
  padding: 1rem 1.2rem 1.15rem;
  border-top: 1px solid #e5e7eb;
  background: rgba(249, 250, 251, 0.72);
}


@media (max-width: 1280px) {
  .ccest-assignment-form,
  .ccest-summary dl {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .ccest-shell {
    padding: 14px;
  }

  .ccest-panel__head {
    flex-direction: column;
  }

  .ccest-action-row,
  .ccest-btn {
    width: 100%;
  }

  .ccest-assignment-form,
  .ccest-summary dl {
    grid-template-columns: 1fr;
  }

  .ccest-grid {
    grid-template-columns: 1fr;
  }

  .ccest-panel-actions {
    width: 100%;
    justify-content: stretch;
  }
}
