/* ============ BUTTONS ============ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1px solid var(--line);
  background: var(--carbon-2);
  color: var(--bone);
  padding: 8px 13px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 13px;
  transition: 0.12s;
  white-space: nowrap;
}

.btn:hover {
  border-color: #3a3a40;
  background: #222226;
}

.btn .ic {
  width: 15px;
  height: 15px;
}

.btn.red {
  background: var(--red);
  border-color: var(--red);
  color: #fff;
}

.btn.red:hover {
  background: #2d73bc;
  border-color: #2d73bc;
}

.btn.ghost {
  background: transparent;
}

.btn.sm {
  padding: 5px 9px;
  font-size: 12px;
}

/* ============ FORMS ============ */
.filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 16px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.field label {
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--faint);
  font-family: var(--mono);
}

select.ctl,
input.ctl,
textarea.ctl {
  background: var(--carbon);
  border: 1px solid var(--line);
  color: var(--bone);
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  min-width: 120px;
}

input.ctl::placeholder,
textarea.ctl::placeholder {
  color: var(--faint);
}

select.ctl:hover,
input.ctl:hover {
  border-color: #3a3a40;
}

.search {
  position: relative;
}

.search input {
  padding-left: 32px;
  min-width: 200px;
}

.search svg {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 15px;
  height: 15px;
  color: var(--faint);
}

/* ============ AVATARS & PILLS ============ */
.av {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  color: #fff;
  flex: none;
  letter-spacing: 0.02em;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.av.lg {
  width: 36px;
  height: 36px;
  font-size: 12px;
}

.av.sm {
  width: 21px;
  height: 21px;
  font-size: 9px;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 20px;
  border: 1px solid var(--line);
  color: var(--muted);
  white-space: nowrap;
}

.pill .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.pri-high {
  color: #fff;
  background: var(--red);
  border-color: var(--red);
}

.pri-med {
  color: #ff6b78;
  border-color: #5a2228;
  background: rgba(229, 20, 43, 0.06);
}

.pri-low {
  color: var(--faint);
  border-color: var(--line);
}

.tag {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--muted);
  background: var(--carbon-2);
  border: 1px solid var(--line-soft);
  padding: 2px 7px;
  border-radius: 5px;
  letter-spacing: 0.02em;
}

.byline {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--faint);
  letter-spacing: 0.02em;
}

/* ============ ICON BUTTONS ============ */
.iconbtn {
  background: transparent;
  border: 1px solid transparent;
  border-radius: 6px;
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  cursor: pointer;
  transition: 0.12s;
}

.iconbtn:hover {
  background: var(--carbon-2);
  border-color: var(--line);
  color: var(--bone);
}

.iconbtn.danger:hover {
  color: var(--red);
  border-color: #3a181c;
}

.iconbtn svg {
  width: 15px;
  height: 15px;
}

/* ============ PULSE / STATUS ============ */
.pulse {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
}

.pulse .p {
  display: flex;
  align-items: baseline;
  gap: 6px;
  background: var(--carbon);
  border: 1px solid var(--line-soft);
  padding: 5px 10px;
  border-radius: 20px;
}

.pulse .p .n {
  font-family: var(--mono);
  font-weight: 700;
  font-size: 13px;
}

.pulse .p .l {
  font-size: 10px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.pulse .p.hot .n {
  color: var(--red);
}

/* ============ NOTIFICATION BELL ============ */
.bell-wrap {
  position: relative;
}

.bell {
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  background: var(--carbon-2);
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: 0.12s;
}

.bell:hover {
  border-color: #3a3a40;
  color: var(--bone);
}

.bell .badge {
  position: absolute;
  top: -5px;
  right: -5px;
  background: var(--red);
  color: #fff;
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 700;
  min-width: 16px;
  height: 16px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  border: 2px solid var(--ink);
}

.notif-panel {
  position: absolute;
  top: 44px;
  right: 0;
  width: 340px;
  max-width: 88vw;
  background: var(--carbon);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow);
  display: none;
  z-index: var(--z-dropdown);
  overflow: hidden;
}

.notif-panel.open {
  display: block;
}

.notif-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line-soft);
  font-family: var(--display);
  font-weight: 600;
  font-size: 14px;
}

.notif-list {
  max-height: 380px;
  overflow: auto;
}

.notif {
  display: flex;
  gap: 10px;
  padding: 11px 14px;
  border-bottom: 1px solid var(--line-soft);
  cursor: pointer;
  transition: 0.1s;
}

.notif:hover {
  background: var(--carbon-2);
}

.notif.unread {
  background: rgba(229, 20, 43, 0.05);
}

.notif .ni {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--carbon-2);
  border: 1px solid var(--line);
}

.notif .ni svg {
  width: 15px;
  height: 15px;
  color: var(--muted);
}

.notif.unread .ni {
  border-color: var(--red);
  color: var(--red);
}

.notif.unread .ni svg {
  color: var(--red);
}

.notif .nt {
  font-size: 12.5px;
  line-height: 1.35;
}

.notif .nm {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--faint);
  margin-top: 3px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.notif .nm .actor {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.notif-empty {
  padding: 30px 14px;
  text-align: center;
  color: var(--faint);
  font-family: var(--mono);
  font-size: 12px;
}

/* ============ USER CHIP ============ */
.userchip {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--carbon-2);
  border: 1px solid var(--line);
  border-radius: 30px;
  padding: 4px 12px 4px 5px;
  font-size: 13px;
  font-weight: 600;
}

.userchip .nm {
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#logoutBtn {
  padding: 8px 9px;
}

/* ============ ACCEPT BUTTON ============ */
.accept {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: var(--red);
  border: 1px solid var(--red);
  color: #fff;
  border-radius: 6px;
  padding: 3px 9px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  transition: 0.12s;
}

.accept:hover {
  background: #c8101f;
}

.accept svg {
  width: 12px;
  height: 12px;
}

.await {
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.06em;
  color: var(--red);
  border: 1px solid #5a2228;
  border-radius: 5px;
  padding: 2px 6px;
  text-transform: uppercase;
}

/* ============ TOAST ============ */
.toast {
  position: fixed;
  bottom: 22px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--carbon-2);
  border: 1px solid var(--line);
  color: var(--bone);
  padding: 11px 18px;
  border-radius: 30px;
  font-size: 13px;
  font-weight: 500;
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  transition: 0.25s;
  z-index: var(--z-scrim);
  display: flex;
  align-items: center;
  gap: 9px;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.toast .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--red);
}

@media (max-width: 680px) {
  .userchip .nm {
    display: none;
  }

  .userchip {
    padding: 4px;
  }
}
