.modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(7, 11, 20, 0.85);
  backdrop-filter: blur(6px);
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 24px;
}

.modal.is-visible,
.modal.open {
  display: flex;
}

.modal .modal-content {
  position: relative;
  width: min(880px, 92vw);
  max-height: 90vh;
  overflow-y: auto;
  padding: 24px;
  border-radius: 12px;
  background: rgba(12, 19, 33, 0.95);
  border: 1px solid rgba(148, 163, 184, 0.25);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(10px);
}

/* Disable the secondary gradient outline from rebrand.css on modal content to avoid double borders */
.modal .modal-content::before,
.modal .modal-content::after {
  display: none !important;
}

.modal .modal-content.modal-large {
  width: min(1100px, 96vw);
}

/* Workspace modals — tables, multi-tab interfaces, data-heavy views */
.modal .modal-content.modal-workspace {
  width: min(1400px, 94vw);
  max-height: 85vh;
}

.modal .modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  background: none;
  border: none;
  color: #cbd5e1;
  font-size: 18px;
  cursor: pointer;
}

.modal .panel {
  position: relative;
  background: rgba(12, 19, 33, 0.95);
  border: 1px solid rgba(148, 163, 184, 0.25);
  border-radius: var(--radius);
  padding: 24px;
  width: min(700px, 90vw);
  box-shadow: var(--shadow-lg);
}
