/* === ENTITY MODAL === */

.entity-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.65);
  display: none;
  z-index: 9999;
}

.entity-modal-overlay.is-open {
  display: flex;
}


.entity-modal {
  background: #0f172a;
  width: 100%;
  max-height: 85vh;
  border-radius: 1.25rem 1.25rem 0 0;
  overflow: hidden;
  animation: slideUp .25s ease;
}

@keyframes slideUp {
  from { transform: translateY(30px); opacity: .6 }
  to   { transform: translateY(0); opacity: 1 }
}

.entity-modal-close {
  position: absolute;
  top: .75rem;
  right: .75rem;
  font-size: 1.5rem;
  background: none;
  color: #fff;
  border: 0;
  cursor: pointer;
}

.entity-modal-shell {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.entity-header {
  display: flex;
  gap: 1rem;
  padding: 1.25rem;
  border-bottom: 1px solid rgba(255,255,255,.08);
}

.entity-avatar {
  width: 48px;
  height: 48px;
  background: #1e293b;
  border-radius: 50%;
  display: grid;
  place-items: center;
}

.entity-head-meta h2 {
  margin: 0;
  font-size: 1.25rem;
}

.entity-type {
  font-size: .75rem;
  opacity: .7;
}

.entity-content {
  padding: 1.25rem;
  overflow-y: auto;
  flex: 1;
}

.entity-actions {
  padding: 1rem;
  border-top: 1px solid rgba(255,255,255,.08);
  display: flex;
  gap: .5rem;
}
.meta-item.meta-entity {
  all: unset;
  display: flex;
  gap: .75rem;
  align-items: center;
  cursor: pointer;
  width: 100%;
}
/* =========================
   ENTITY MODAL
========================= */

.entity-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.7);
  backdrop-filter: blur(2px);
  display: none;
  z-index: 9999;
}

.entity-modal-overlay.is-open {
  display: flex;
  align-items: center;
  justify-content: center;
}

.entity-modal {
  background: #0f172a;
  color: #e5e7eb;
  width: min(92vw, 640px);
  max-height: 90vh;
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0,0,0,.6);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: modalIn .25s ease-out;
}

@keyframes modalIn {
  from {
    transform: translateY(20px);
    opacity: 0;
  }
}

.entity-modal-close {
  position: absolute;
  top: .75rem;
  right: .75rem;
  background: none;
  border: none;
  font-size: 1.8rem;
  color: #94a3b8;
  cursor: pointer;
}

.entity-modal-body {
  padding: 1.5rem;
  overflow-y: auto;
}

.entity-header {
  display: flex;
  flex-direction: column;
  gap: .5rem;
  margin-bottom: 1rem;
}

.entity-header h2 {
  margin: 0;
  font-size: 1.4rem;
  font-weight: 700;
}

.entity-content {
  line-height: 1.6;
  color: #cbd5f5;
}

.entity-content p {
  margin: 0 0 1rem;
}

@media (min-width: 640px) {
  .entity-header {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }
}
.detail-entities {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px,1fr));
  gap: 1rem;
  margin: 1.5rem 0;
}

.meta-entity {
  background: #020617;
  border: 1px solid #1e293b;
  border-radius: 14px;
  padding: .75rem 1rem;
  display: flex;
  align-items: center;
  gap: .75rem;
  cursor: pointer;
}

.meta-entity .meta-icon {
  font-size: 1.5rem;
}

.meta-entity:hover {
  border-color: var(--cat-color);
}
.entity-modal {
  max-width: 720px;
  width: 92vw;
  max-height: 90vh;
  border-radius: 16px;
  background: #0b0b0d;
  color: #fff;
  overflow: hidden;
}

.entity-modal-header {
  display: flex;
  gap: 1rem;
  padding: 1rem;
  background: linear-gradient(180deg,#111,#0b0b0d);
}

.entity-modal-header img {
  width: 96px;
  height: 96px;
  object-fit: cover;
  border-radius: 12px;
}

.entity-header-text h2 {
  margin: 0;
  font-size: 1.4rem;
}

.entity-link {
  font-size: .85rem;
  color: #38bdf8;
}

.entity-modal-body {
  padding: 1.25rem;
  overflow-y: auto;
}

.entity-modal-body h3 {
  margin-top: 1.2rem;
  font-size: 1.05rem;
  color: #38bdf8;
}
.events-modal-overlay{
  position:fixed;
  inset:0;
  background:rgba(0,0,0,.6);
  display:none;
  align-items:center;
  justify-content:center;
  z-index:9999;
}

.events-modal-overlay.is-open{
  display:flex;
}

.events-modal{
  background:#111827;
  padding:30px;
  border-radius:20px;
  max-width:420px;
  width:90%;
  text-align:center;
  box-shadow:0 20px 60px rgba(0,0,0,.6);
}

.events-modal.success{
  border:2px solid #10b981;
}

.events-modal.error{
  border:2px solid #ef4444;
}
