.edit-map-modal {
  width: 500px;
  max-width: 92vw;
  max-height: 88vh;
  overflow-y: auto;
}

.edit-map-form {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
  padding-bottom: 0.5rem;
}

/* ── Section dividers ── */
.edit-section {
  border-top: 1px solid #2e3348;
  padding-top: 1rem;
  margin-top: 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.edit-section h3 {
  margin: 0;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #6b7280;
}

.edit-loading {
  font-size: 0.82rem;
  color: #6b7280;
  margin: 0;
}

/* ── Permission list ── */
.perm-list {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.perm-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  background: #141622;
  border: 1px solid #2e3348;
  border-radius: 6px;
  padding: 0.45rem 0.75rem;
}

.perm-username {
  flex: 1;
  font-size: 0.85rem;
  color: #e2e8f0;
}

.perm-role-badge {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
}

.role-owner {
  background: rgba(99, 102, 241, 0.2);
  color: #818cf8;
}
.role-editor {
  background: rgba(234, 179, 8, 0.15);
  color: #fbbf24;
}
.role-viewer {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
}

.perm-remove {
  background: none;
  border: none;
  color: #6b7280;
  cursor: pointer;
  font-size: 0.8rem;
  padding: 0.1rem 0.3rem;
  line-height: 1;
  transition: color 0.12s;
}
.perm-remove:hover {
  color: #ef4444;
}

.perm-empty {
  font-size: 0.8rem;
  color: #4b5563;
  margin: 0;
}

/* ── Add permission form ── */
.add-perm-form {
  display: flex;
  gap: 0.4rem;
  align-items: center;
  flex-wrap: wrap;
}

.add-perm-input {
  flex: 1;
  min-width: 120px;
  background: #111827;
  border: 1px solid #4b5563;
  border-radius: 6px;
  color: #e5e7eb;
  padding: 0.35rem 0.6rem;
  font-size: 0.82rem;
  outline: none;
}
.add-perm-input:focus {
  border-color: #6366f1;
}

.add-perm-role {
  background: #1f2937;
  border: 1px solid #4b5563;
  border-radius: 6px;
  color: #e5e7eb;
  padding: 0.35rem 0.6rem;
  font-size: 0.82rem;
  outline: none;
  cursor: pointer;
}

/* ── Access request list ── */
.req-list {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.req-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  background: #141622;
  border: 1px solid #2e3348;
  border-radius: 6px;
  padding: 0.45rem 0.75rem;
}

.req-username {
  flex: 1;
  font-size: 0.85rem;
  color: #e2e8f0;
}

.req-actions {
  display: flex;
  gap: 0.35rem;
}

.btn-approve {
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: 5px;
  color: #34d399;
  cursor: pointer;
  font-size: 0.75rem;
  padding: 0.2rem 0.55rem;
  transition: background 0.12s;
}
.btn-approve:hover {
  background: rgba(16, 185, 129, 0.25);
}

.btn-deny {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.25);
  border-radius: 5px;
  color: #f87171;
  cursor: pointer;
  font-size: 0.75rem;
  padding: 0.2rem 0.55rem;
  transition: background 0.12s;
}
.btn-deny:hover {
  background: rgba(239, 68, 68, 0.2);
}

/* ── Small variant of primary button ── */
.btn-sm {
  padding: 0.35rem 0.75rem !important;
  font-size: 0.8rem !important;
}
