/* ── Activity Admin Modal ── */

.act-admin-overlay {
  position: fixed;
  inset: 0; padding-top: 60px;
  background: rgba(0,0,0,.65);
  backdrop-filter: blur(6px);
  z-index: 900;
  display: none;
  align-items: center;
  justify-content: center;
}
.act-admin-overlay.open { display: flex; }

.act-admin-modal {
  background: var(--bg2, #1a1a2e);
  border: 1px solid var(--border, rgba(255,255,255,.12));
  border-radius: 14px;
  width: min(580px, 92vw);
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 60px rgba(0,0,0,.5);
}

.act-admin-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .8rem 1rem;
  border-bottom: 1px solid var(--border, rgba(255,255,255,.1));
}

.act-admin-title {
  font-size: .95rem;
  font-weight: 600;
}

.act-admin-close {
  background: none;
  border: none;
  color: var(--muted, #888);
  font-size: 1.1rem;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
  transition: background .15s;
}
.act-admin-close:hover { background: rgba(255,255,255,.08); }

.act-admin-tabs {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--border, rgba(255,255,255,.08));
}

.act-admin-tab {
  flex: 1;
  background: none;
  border: none;
  color: var(--muted, #888);
  font-size: .78rem;
  font-weight: 500;
  padding: .55rem .5rem;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: color .15s, border-color .15s;
}
.act-admin-tab.active {
  color: var(--accent, #007aff);
  border-bottom-color: var(--accent, #007aff);
}

.act-admin-body {
  flex: 1;
  overflow-y: auto;
  padding: .6rem .8rem;
}

.act-admin-panel { display: none; }
.act-admin-panel.active { display: block; }

/* Add form row */
.act-add-row {
  display: flex;
  gap: .4rem;
  margin-bottom: .6rem;
  align-items: center;
}

.act-input {
  background: var(--bg3, rgba(255,255,255,.06));
  border: 1px solid var(--border, rgba(255,255,255,.12));
  border-radius: 6px;
  color: inherit;
  font-size: .78rem;
  padding: 5px 8px;
  outline: none;
  flex: 1;
  min-width: 0;
}
.act-input:focus { border-color: var(--accent, #007aff); }

.act-select {
  background: var(--bg3, rgba(255,255,255,.06));
  border: 1px solid var(--border, rgba(255,255,255,.12));
  border-radius: 6px;
  color: inherit;
  font-size: .78rem;
  padding: 5px 6px;
  outline: none;
  min-width: 80px;
}

.act-btn {
  background: var(--accent, #007aff);
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: .72rem;
  font-weight: 600;
  padding: 5px 12px;
  cursor: pointer;
  white-space: nowrap;
  transition: opacity .15s;
}
.act-btn:hover { opacity: .85; }

.act-check {
  display: flex;
  align-items: center;
  gap: .3rem;
  font-size: .72rem;
  opacity: .7;
  white-space: nowrap;
}

/* List */
.act-list {
  display: flex;
  flex-direction: column;
  gap: .2rem;
}

.act-item {
  display: flex;
  align-items: center;
  gap: .5rem;
  padding: .35rem .5rem;
  border-radius: 6px;
  font-size: .78rem;
  transition: background .15s;
}
.act-item:hover { background: rgba(255,255,255,.04); }

.act-item-name {
  flex: 1;
  font-weight: 500;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.act-item-cat {
  font-size: .68rem;
  font-weight: 500;
  padding: 2px 8px;
  border-radius: 10px;
  background: rgba(0,122,255,.12);
  color: var(--accent, #007aff);
  white-space: nowrap;
}

.act-item-browser {
  font-size: .6rem;
  opacity: .4;
}

.act-item-del {
  background: none;
  border: none;
  color: var(--muted, #888);
  font-size: .75rem;
  cursor: pointer;
  opacity: .2;
  padding: 2px 4px;
  transition: opacity .15s, color .15s;
}
.act-item-del:hover { opacity: .9; color: #ff453a; }

/* Category color pills */
.act-item-cat.cat-code    { background: rgba(88,166,255,.15); color: #58a6ff; }
.act-item-cat.cat-web     { background: rgba(0,122,255,.12);  color: #007aff; }
.act-item-cat.cat-design  { background: rgba(191,90,242,.15); color: #bf5af2; }
.act-item-cat.cat-social  { background: rgba(255,159,10,.15); color: #ff9f0a; }
.act-item-cat.cat-music   { background: rgba(52,199,89,.15);  color: #34c759; }
.act-item-cat.cat-video   { background: rgba(255,69,58,.12);  color: #ff453a; }
.act-item-cat.cat-gaming  { background: rgba(255,214,10,.15); color: #ffd60a; }
.act-item-cat.cat-news    { background: rgba(100,210,255,.15);color: #64d2ff; }
.act-item-cat.cat-reading { background: rgba(172,142,104,.15);color: #ac8e68; }
.act-item-cat.cat-system  { background: rgba(255,255,255,.08);color: var(--muted, #888); }
.act-item-cat.cat-other   { background: rgba(255,255,255,.06);color: var(--muted, #888); }

/* Settings gear on widget */
.act-settings-btn {
  background: none;
  border: none;
  color: var(--muted, #888);
  font-size: .85rem;
  cursor: pointer;
  opacity: .35;
  padding: 2px 6px;
  transition: opacity .15s;
}
.act-settings-btn:hover { opacity: .85; }

/* Rule priority */
.act-item-priority {
  font-size: .62rem;
  opacity: .3;
  font-family: var(--mono, monospace);
  min-width: 1.5rem;
  text-align: center;
}

.act-item-pattern {
  flex: 1;
  font-family: var(--mono, monospace);
  font-size: .72rem;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  opacity: .75;
}

/* ── Labels / Visuels ── */
.act-labels-hint {
  font-size: .65rem;
  opacity: .5;
  margin-bottom: .8rem;
  padding: .5rem .6rem;
  background: rgba(124, 138, 255, 0.05);
  border-left: 2px solid rgba(124, 138, 255, 0.3);
  border-radius: 4px;
  line-height: 1.4;
}
.act-labels-hint kbd {
  font-family: var(--mono, monospace);
  font-size: .58rem;
  padding: 1px 5px;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.15);
  border-radius: 3px;
}
.act-label-item {
  display: grid;
  grid-template-columns: 6rem 3rem 1fr;
  gap: .5rem;
  align-items: center;
  padding: .35rem .5rem;
  border-radius: 5px;
  font-size: .72rem;
  transition: background .15s;
}
.act-label-item:hover { background: rgba(255,255,255,.03); }
.act-label-key {
  font-family: var(--mono, monospace);
  font-size: .65rem;
  opacity: .55;
}
.act-label-emoji {
  background: rgba(255,255,255,.05);
  border: 1px solid var(--border, rgba(255,255,255,.12));
  border-radius: 5px;
  color: inherit;
  font-size: 1.1rem;
  padding: 3px 6px;
  text-align: center;
  outline: none;
  width: 100%;
}
.act-label-emoji:focus { border-color: var(--accent, #007aff); }
.act-label-text {
  background: rgba(255,255,255,.05);
  border: 1px solid var(--border, rgba(255,255,255,.12));
  border-radius: 5px;
  color: inherit;
  font-size: .75rem;
  padding: 5px 8px;
  outline: none;
  width: 100%;
}
.act-label-text:focus { border-color: var(--accent, #007aff); }
