
.macro-item {
  cursor: grab;
  user-select: none;
}

.macro-item:active {
  cursor: grabbing;
}

.macro-item.active {
  border-color: rgba(105, 155, 255, 0.78);
  background: rgba(35, 58, 95, 0.52);
}

.macro-item.selected {
  border-color: rgba(108, 169, 255, 0.9);
  box-shadow: 0 0 0 1px rgba(108, 169, 255, 0.35) inset;
}

.macro-list.drag-active .macro-item {
  transition: border-color 120ms ease, box-shadow 120ms ease, opacity 120ms ease;
}

.macro-item.dragging {
  opacity: 0.52;
  border-style: dashed;
  border-color: rgba(132, 164, 226, 0.75);
}

.macro-item.drop-before {
  box-shadow: inset 0 3px 0 rgba(124, 184, 255, 0.95);
}

.macro-item.drop-after {
  box-shadow: inset 0 -3px 0 rgba(124, 184, 255, 0.95);
}

.macro-select-check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-right: 2px;
  min-width: 24px;
  min-height: 24px;
}

.macro-select-check input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: #5f9eff;
}

.plugin-item .title,
.macro-item .title {
  font-weight: 700;
}

.plugin-item .meta,
.macro-item .meta {
  font-size: 12px;
  color: var(--text-2);
}

.macro-builder-footer {
  border-top: 1px dashed var(--line-strong);
  padding: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.macro-detail {
  padding: 12px;
  min-height: 180px;
}

.macro-detail-title {
  margin: 0 0 6px;
  font-size: 16px;
  line-height: 1.2;
  font-weight: 700;
  color: #e6edf7;
}

.card-callout {
  margin: 12px;
  border: 1px dashed rgba(141, 164, 198, 0.45);
  border-radius: 10px;
  background: rgba(28, 37, 50, 0.72);
  padding: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.card-notice {
  margin: 12px;
  border: 1px dashed rgba(141, 164, 198, 0.45);
  border-radius: 10px;
  background: rgba(31, 41, 55, 0.74);
  padding: 11px;
  color: #d8e0ed;
  font-weight: 600;
}

.page-placeholder {
  max-width: 1080px;
}

.placeholder-card {
  padding: 15px;
}

.logs-card {
  padding-bottom: 12px;
}

.terminal-log {
  margin: 12px;
  height: 52vh;
  border: 1px solid rgba(113, 152, 213, 0.34);
  border-radius: 10px;
  background: linear-gradient(180deg, #121a24 0%, #0e151f 100%);
  color: #cfe0ff;
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.4;
  padding: 10px;
  overflow: auto;
}

.incident-card {
  margin-top: 12px;
  padding-bottom: 12px;
}

.incident-filters {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.incident-filters select {
  width: auto;
  min-width: 180px;
  max-width: 280px;
}

.incident-list {
  margin: 12px;
  display: grid;
  gap: 8px;
  max-height: 38vh;
  overflow: auto;
}

.incident-item {
  border: 1px solid rgba(111, 152, 216, 0.24);
  border-radius: 10px;
  background: #101828;
  padding: 9px 10px;
  display: grid;
  gap: 5px;
}

.incident-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.incident-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 1px solid rgba(114, 154, 220, 0.5);
  background: rgba(35, 65, 107, 0.62);
  color: #ddebff;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  padding: 3px 8px;
  text-transform: uppercase;
}

.incident-pill.macro-start {
  border-color: rgba(81, 166, 120, 0.55);
  background: rgba(35, 95, 59, 0.55);
  color: #dbffe8;
}

.incident-pill.macro-end {
  border-color: rgba(97, 161, 220, 0.55);
  background: rgba(33, 72, 118, 0.58);
  color: #dcefff;
}

.incident-pill.warn {
  border-color: rgba(194, 150, 73, 0.55);
  background: rgba(106, 77, 31, 0.56);
  color: #ffefcb;
}

.incident-pill.error {
  border-color: rgba(211, 96, 96, 0.55);
  background: rgba(112, 42, 42, 0.56);
  color: #ffd9d9;
}

.incident-ts {
  color: var(--text-2);
  font-size: 11px;
}

.incident-message {
  color: var(--text-1);
  word-break: break-word;
}

.incident-meta {
  color: var(--text-2);
  font-size: 12px;
}

.notifications-card,
.schedule-card,
.team-card {
  padding-bottom: 12px;
}

.notifications-filters {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.notifications-filters select {
  width: auto;
  min-width: 160px;
}

.notifications-list,
.schedule-list,
.team-list {
  margin: 12px;
  display: grid;
  gap: 8px;
  max-height: 56vh;
  overflow: auto;
}

.notice-item,
.schedule-item,
.team-item {
  border: 1px solid rgba(112, 154, 220, 0.24);
  border-radius: 10px;
  background: #101828;
  padding: 10px;
}

.notice-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.notice-level {
  font-size: 11px;
  font-weight: 700;
  border-radius: 999px;
  padding: 2px 8px;
  border: 1px solid rgba(114, 156, 222, 0.46);
  background: rgba(35, 66, 107, 0.58);
  color: #dcecff;
}

.notice-item.warn .notice-level {
  border-color: rgba(194, 150, 73, 0.55);
  background: rgba(106, 77, 31, 0.56);
  color: #ffefcb;
}

.notice-item.error .notice-level {
  border-color: rgba(211, 96, 96, 0.55);
  background: rgba(112, 42, 42, 0.56);
  color: #ffd9d9;
}

.notice-ts,
.notice-meta,
.schedule-meta,
.team-meta {
  color: var(--text-2);
  font-size: 12px;
}

.notice-message,
.team-name {
  color: var(--text-1);
  font-weight: 700;
  margin-top: 4px;
}

.schedule-form-grid {
  margin: 12px;
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.schedule-select {
  display: flex;
  gap: 8px;
  align-items: center;
  font-weight: 700;
  color: var(--text-1);
}

.team-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.team-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.team-status {
  border-radius: 999px;
  padding: 3px 8px;
  font-size: 11px;
  font-weight: 700;
  border: 1px solid rgba(112, 154, 220, 0.48);
  background: rgba(27, 57, 98, 0.56);
  color: #deedff;
}

.team-status.running {
  border-color: rgba(81, 166, 120, 0.55);
  background: rgba(35, 95, 59, 0.55);
  color: #dbffe8;
}

.team-status.error {
  border-color: rgba(211, 96, 96, 0.55);
  background: rgba(112, 42, 42, 0.56);
  color: #ffd9d9;
}

.overlay {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: rgba(3, 9, 19, 0.62);
  backdrop-filter: blur(2px);
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
}

.modal-card {
  width: min(620px, calc(100vw - 30px));
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, rgba(10, 20, 36, 0.98) 0%, rgba(7, 14, 26, 0.98) 100%);
  box-shadow: var(--shadow-xl);
  color: var(--text-0);
  padding: 14px;
}

.modal-card.dark {
  border-color: rgba(122, 168, 240, 0.44);
  background: linear-gradient(180deg, rgba(6, 14, 28, 0.99) 0%, rgba(3, 10, 20, 0.99) 100%);
}

.modal-head {
  margin-bottom: 10px;
}

.modal-head strong {
  font-size: 16px;
  font-weight: 700;
}

.target-list {
  max-height: 380px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(8, 16, 30, 0.78);
}

.target-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 10px;
  border-bottom: 1px solid rgba(122, 159, 213, 0.15);
}

.target-item:last-child {
  border-bottom: 0;
}

.target-item .info {
  display: grid;
  gap: 2px;
}

.target-item .name {
  font-weight: 700;
}
