/* Notifikasi: warna per tipe, baris daftar, popover bel sidebar, dan halaman module.html#notification. */

.notif-tone--blue {
  --tone: var(--blue-500);
  --tone-soft: var(--blue-100);
}

.notif-tone--green {
  --tone: var(--green-500);
  --tone-soft: var(--green-100);
}

.notif-tone--red {
  --tone: var(--red-500);
  --tone-soft: var(--red-100);
}

.notif-tone--orange {
  --tone: var(--orange-600);
  --tone-soft: var(--orange-100);
}

.notif-tone--purple {
  --tone: var(--purple-500);
  --tone-soft: var(--purple-100);
}

.notif-tone--gold {
  --tone: var(--gold-700);
  --tone-soft: rgb(226 205 156 / 38%);
}

.notif-tone--slate {
  --tone: var(--text-secondary);
  --tone-soft: var(--surface-muted);
}

/* ---------- baris notifikasi ---------- */

.notif-list {
  display: grid;
  gap: 2px;
}

.notif-row {
  position: relative;
  display: grid;
  gap: 6px;
  padding: 10px 12px 10px 20px;
  border-radius: var(--radius-sm);
  transition: background var(--duration) var(--ease);
}

.notif-row:hover {
  background: var(--surface-soft);
}

.notif-row.is-unread {
  background: var(--surface-active);
}

.notif-row.is-unread::before {
  position: absolute;
  top: 20px;
  left: 8px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--gold-600);
  content: "";
}

.notif-row__main {
  display: flex;
  gap: 10px;
  width: 100%;
  text-align: left;
}

.notif-row__icon {
  display: grid;
  flex-shrink: 0;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: var(--radius-md);
  color: var(--tone);
  background: var(--tone-soft);
}

.notif-row__icon .icon {
  width: 17px;
  height: 17px;
}

.notif-row__content {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.notif-row__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  font-size: var(--fs-xs);
  color: var(--text-muted);
}

.notif-row__label {
  font-weight: 700;
  color: var(--tone);
}

.notif-row__pill {
  padding: 1px 6px;
  border-radius: var(--radius-full);
  font-size: var(--fs-2xs);
  font-weight: 700;
  color: var(--red-500);
  background: var(--red-100);
}

.notif-row__title {
  overflow: hidden;
  font-size: var(--fs-md);
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text);
}

.notif-row__body {
  display: -webkit-box;
  overflow: hidden;
  font-size: var(--fs-sm);
  line-height: 1.5;
  color: var(--text-secondary);
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.notif-row__tools {
  display: flex;
  align-items: center;
  gap: 6px;
  padding-left: 44px;
}

.notif-row__quick {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  font-size: var(--fs-xs);
  font-weight: 700;
  color: var(--text-secondary);
  background: var(--surface);
}

.notif-row__quick:hover {
  color: var(--ink-700);
  border-color: var(--gold-500);
  background: var(--surface-active);
}

.notif-row__tool {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
}

.notif-row__tool:hover {
  color: var(--ink-700);
  background: var(--surface-pill);
}

/* ---------- kelompok & kosong ---------- */

.notif-group {
  display: grid;
  gap: 4px;
}

.notif-group + .notif-group {
  margin-top: 14px;
}

.notif-group__title {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 4px;
  font-size: var(--fs-xs);
  font-weight: 800;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: var(--text-muted);
}

.notif-group__title span {
  padding: 0 6px;
  border-radius: var(--radius-full);
  font-size: var(--fs-2xs);
  color: var(--text-secondary);
  background: var(--surface-count);
}

.notif-empty {
  display: grid;
  justify-items: center;
  gap: 10px;
  padding: 32px 20px;
  text-align: center;
}

.notif-empty__icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-full);
  color: var(--gold-700);
  background: var(--surface-pill);
}

.notif-empty__text {
  max-width: 34ch;
  font-size: var(--fs-sm);
  line-height: 1.6;
  color: var(--text-secondary);
}

.notif-mark-all {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: var(--fs-sm);
  font-weight: 700;
  color: var(--gold-700);
}

.notif-mark-all:disabled {
  color: var(--text-faint);
  cursor: default;
}

/* ---------- popover bel ---------- */

.popover--notifications {
  width: 392px;
  max-width: calc(100vw - 24px);
  padding: 0;
}

.notif-panel {
  display: grid;
  max-height: min(560px, 80vh);
  grid-template-rows: auto auto minmax(0, 1fr) auto;
}

.notif-panel__head {
  display: grid;
  grid-template-areas:
    "title mark"
    "sub mark";
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 2px 10px;
  align-items: center;
  padding: 14px 16px 10px;
}

.notif-panel__title {
  grid-area: title;
  font-size: var(--fs-lg);
  font-weight: 800;
  color: var(--text);
}

.notif-panel__sub {
  grid-area: sub;
  font-size: var(--fs-sm);
  color: var(--text-muted);
}

.notif-panel__head .notif-mark-all {
  grid-area: mark;
}

.notif-panel__tabs {
  display: flex;
  gap: 6px;
  padding: 0 16px 10px;
  border-bottom: 1px solid var(--border-soft);
}

.notif-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: var(--radius-full);
  font-size: var(--fs-sm);
  font-weight: 700;
  color: var(--text-secondary);
  background: var(--surface-pill);
}

.notif-tab[aria-pressed="true"] {
  color: var(--ink-800);
  background: var(--gold-300);
}

.notif-tab__count {
  padding: 0 6px;
  border-radius: var(--radius-full);
  font-size: var(--fs-2xs);
  color: #fff;
  background: var(--red-500);
}

.notif-panel__body {
  overflow-y: auto;
  padding: 8px;
}

.notif-panel__foot {
  padding: 8px 16px 12px;
  border-top: 1px solid var(--border-soft);
}

.notif-panel__link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: var(--fs-sm);
  font-weight: 700;
  color: var(--gold-700);
}

/* ---------- halaman Notifikasi ---------- */

.notif-page {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 20px;
  align-items: start;
}

.notif-page__main {
  display: grid;
  gap: 14px;
  padding: 18px;
  border-radius: var(--radius-xs);
  background: var(--surface);
  box-shadow: 0 4px 24px 0 rgb(34 41 47 / 10%);
}

.notif-page__toolbar {
  flex-wrap: wrap;
  align-items: end;
  gap: 12px;
}

.notif-page__search {
  flex: 1 1 220px;
}

.notif-page__toolbar .notif-mark-all {
  margin-left: auto;
}

.notif-page__summary {
  font-size: var(--fs-sm);
  color: var(--text-muted);
}

.notif-settings {
  display: grid;
  gap: 16px;
  padding: 18px;
  border-radius: var(--radius-xs);
  background: var(--surface);
  box-shadow: 0 4px 24px 0 rgb(34 41 47 / 10%);
}

.notif-settings__title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: var(--fs-base);
  font-weight: 800;
  color: var(--text);
}

.notif-settings__group {
  display: grid;
  gap: 4px;
}

.notif-settings__heading {
  padding-bottom: 4px;
  font-size: var(--fs-xs);
  font-weight: 800;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: var(--text-muted);
}

.notif-setting {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border-soft);
  cursor: pointer;
}

.notif-setting:last-child {
  border-bottom: 0;
}

.notif-setting__text {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.notif-setting__label {
  font-size: var(--fs-md);
  font-weight: 700;
  color: var(--text);
}

.notif-setting__hint {
  font-size: var(--fs-xs);
  line-height: 1.5;
  color: var(--text-muted);
}

.notif-setting__select {
  width: 110px;
}

@media (max-width: 1099px) {
  .notif-page {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 639px) {
  .notif-row__tools {
    padding-left: 0;
  }

  .notif-page__main,
  .notif-settings {
    padding: 14px;
  }
}

/* ---------- daftar Task dari mention ---------- */

.task-list {
  display: grid;
  gap: 6px;
}

.task-row {
  display: grid;
  gap: 8px;
  padding: 10px 12px;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm);
  background: var(--surface-active);
}

.task-row.is-done {
  background: var(--surface);
}

.task-row__main {
  display: grid;
  gap: 4px;
  width: 100%;
  text-align: left;
}

.task-row__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 10px;
  font-size: var(--fs-xs);
  color: var(--text-muted);
}

.task-row__chat {
  font-weight: 700;
  color: var(--text-secondary);
}

.task-row__body {
  font-size: var(--fs-sm);
  line-height: 1.5;
  color: var(--text);
}

.task-row.is-done .task-row__body {
  color: var(--text-secondary);
}

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

.task-row__done {
  font-size: var(--fs-xs);
  color: var(--text-muted);
}

.task-check,
.task-status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-size: var(--fs-xs);
  font-weight: 700;
  color: var(--orange-600);
  background: var(--orange-100);
}

.task-check.is-done,
.task-status.is-done {
  color: var(--green-500);
  background: var(--green-100);
}

.task-check:hover {
  box-shadow: inset 0 0 0 1px currentColor;
}
