/* Bazuje na Twoich zmiennych z dashboard.css (root). Jeśli ich nie masz, skopiuj :root z poprzedniego pliku. */

.alerts-topbar{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap: 18px;
  padding: 12px 24px 12px;
  border-bottom: 1px solid rgba(255,255,255,.06);
  margin-bottom: 0;
  position: sticky; top: 0; z-index: 50;
  background: rgba(14,14,26,.95);
  backdrop-filter: blur(8px);
}

.alerts-topbar__left{
  display:flex;
  align-items:center;
  gap: 14px;
}

.alerts-appicon{
  width: 46px; height: 46px;
  border-radius: 14px;
  display:grid; place-items:center;
  background: rgba(59,130,246,.10);
  border: 1px solid rgba(59,130,246,.22);
  color: rgba(59,130,246,.95);
  box-shadow: 0 10px 30px rgba(0,0,0,.35);
}
.alerts-appicon svg{ width:20px; height:20px; }

.alerts-title{
  font-size: 22px;
  font-weight: 800;
  letter-spacing:-.02em;
}
.alerts-subtitle{
  margin-top: 4px;
  color: rgba(234,240,255,.50);
  font-size: 13px;
}

.alerts-topbar__right{
  display:flex;
  align-items:center;
  gap: 12px;
}

.live-pill{
  display:flex;
  align-items:center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid rgba(34,197,94,.25);
  background: rgba(34,197,94,.08);
  color: rgba(34,197,94,.95);
  font-weight: 800;
}
.live-dot{
  width: 10px; height: 10px;
  border-radius: 999px;
  background: rgba(34,197,94,.95);
  box-shadow: 0 0 18px rgba(34,197,94,.65);
}

.alerts-kpi{
  display:grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 14px;
}

.kpi2{
  padding: 18px;
  overflow:hidden;
}
.kpi2__head{
  display:flex;
  justify-content:space-between;
  align-items:center;
}
.kpi2__label{
  font-size: 12px;
  letter-spacing:.08em;
  font-weight: 700;
  color: rgba(234,240,255,.55);
}
.kpi2__value{
  margin-top: 12px;
  font-size: 32px;
  font-weight: 900;
  letter-spacing:-.02em;
}
.kpi2__icon{
  width: 44px; height: 44px;
  border-radius: 14px;
  display:grid; place-items:center;
  background: rgba(255,255,255,.03);
  border: 1px solid rgba(255,255,255,.08);
}
.kpi2__icon svg{ width:18px; height:18px; opacity:.95; }

.kpi2--neutral{ background: linear-gradient(180deg, rgba(11,18,32,.78), rgba(9,14,26,.70)); }
.kpi2--critical{
  border-color: rgba(239,68,68,.20);
  background: linear-gradient(180deg, rgba(25,10,18,.70), rgba(9,14,26,.70));
}
.kpi2--critical .kpi2__value{ color: rgba(239,68,68,.95); }
.kpi2--critical .kpi2__icon{ background: rgba(239,68,68,.12); border-color: rgba(239,68,68,.22); color: rgba(239,68,68,.95); }

.kpi2--warning{
  border-color: rgba(245,158,11,.20);
  background: linear-gradient(180deg, rgba(20,16,10,.70), rgba(9,14,26,.70));
}
.kpi2--warning .kpi2__value{ color: rgba(245,158,11,.95); }
.kpi2--warning .kpi2__icon{ background: rgba(245,158,11,.12); border-color: rgba(245,158,11,.22); color: rgba(245,158,11,.95); }

.kpi2--info{
  border-color: rgba(59,130,246,.22);
  background: linear-gradient(180deg, rgba(10,18,30,.78), rgba(9,14,26,.70));
}
.kpi2--info .kpi2__value{ color: rgba(59,130,246,.95); }
.kpi2--info .kpi2__icon{ background: rgba(59,130,246,.12); border-color: rgba(59,130,246,.22); color: rgba(59,130,246,.95); }

.trends{ margin-bottom: 14px; }
.trends__head{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap: 16px;
  padding: 18px 18px 10px;
}
.trends__left{ display:flex; align-items:center; gap: 12px; }
.trends__icon{
  width: 40px; height: 40px;
  border-radius: 14px;
  display:grid; place-items:center;
  background: rgba(59,130,246,.10);
  border: 1px solid rgba(59,130,246,.20);
  color: rgba(59,130,246,.95);
}
.trends__icon svg{ width:18px; height:18px; }

.trends__chips{
  padding: 0 18px 10px;
  display:flex;
  gap: 10px;
  flex-wrap:wrap;
}
.pillchip{
  display:inline-flex;
  align-items:center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.08);
  background: rgba(255,255,255,.03);
  color: rgba(234,240,255,.65);
  font-size: 13px;
}
.pillchip b{ color: rgba(234,240,255,.90); }

.pillchip--critical{ border-color: rgba(239,68,68,.18); background: rgba(239,68,68,.06); }
.pillchip--warning{ border-color: rgba(245,158,11,.18); background: rgba(245,158,11,.06); }
.pillchip--info{ border-color: rgba(59,130,246,.18); background: rgba(59,130,246,.06); }

.seg{
  display:flex;
  gap: 8px;
  padding: 6px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.08);
  background: rgba(255,255,255,.02);
}
.seg__btn{
  border: 0;
  background: transparent;
  color: rgba(234,240,255,.65);
  font-weight: 800;
  padding: 10px 12px;
  border-radius: 999px;
  cursor:pointer;
}
.seg__btn--active{
  background: rgba(59,130,246,.95);
  color: #031427;
}

.chart--trends{ height: 320px; padding: 0 10px 14px; }

.filters{ padding: 16px 18px 18px; margin-bottom: 18px; }
.search{
  display:flex;
  align-items:center;
  gap: 10px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.08);
  background: rgba(255,255,255,.02);
  padding: 12px 14px;
}
.search svg{ width:18px; height:18px; color: rgba(234,240,255,.45); }
.search input{
  width: 100%;
  border: 0;
  outline: none;
  background: transparent;
  color: rgba(234,240,255,.9);
  font-size: 14px;
}
.filters__row{
  margin-top: 14px;
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.filters__label{
  display:flex;
  gap: 8px;
  align-items:center;
  color: rgba(234,240,255,.45);
  font-size: 13px;
  margin-bottom: 10px;
}
.filters__label svg{ width:16px; height:16px; }

.chips{ display:flex; gap: 10px; flex-wrap:wrap; }
.chipbtn{
  border-radius: 12px;
  padding: 10px 12px;
  border: 1px solid rgba(255,255,255,.08);
  background: rgba(255,255,255,.02);
  color: rgba(234,240,255,.75);
  font-weight: 800;
  cursor:pointer;
}
.chipbtn:hover{ border-color: rgba(255,255,255,.14); }
.chipbtn--active{
  background: rgba(59,130,246,.95);
  border-color: rgba(59,130,246,.55);
  color: #021326;
}

.alerts-list__title{
  font-size: 18px;
  font-weight: 900;
  margin: 0 0 12px;
}

.alerts-cards{ display:flex; flex-direction:column; gap: 14px; }

.alertcard{
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,.08);
  background: rgba(255,255,255,.02);
  padding: 16px;
  display:flex;
  gap: 14px;
  align-items:flex-start;
}
.alertcard__icon{
  width: 42px; height: 42px;
  border-radius: 14px;
  display:grid; place-items:center;
  background: rgba(255,255,255,.02);
  border: 1px solid rgba(255,255,255,.08);
}
.alertcard__icon svg{ width:18px; height:18px; }

.alertcard__body{ flex:1; }
.alertcard__top{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap: 12px;
}
.alertcard__title{ font-weight: 900; font-size: 16px; }
.alertcard__text{ margin-top: 8px; color: rgba(234,240,255,.55); }
.alertcard__meta{
  margin-top: 12px;
  display:flex;
  gap: 14px;
  color: rgba(234,240,255,.45);
  font-size: 13px;
}
.meta{ display:inline-flex; align-items:center; gap: 8px; }
.meta svg{ width:16px; height:16px; }

.tag{
  font-weight: 900;
  font-size: 12px;
  padding: 8px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.02);
}
.tag--critical{ color: rgba(239,68,68,.95); border-color: rgba(239,68,68,.25); background: rgba(239,68,68,.08); }
.tag--warning{ color: rgba(245,158,11,.95); border-color: rgba(245,158,11,.25); background: rgba(245,158,11,.08); }
.tag--info{ color: rgba(59,130,246,.95); border-color: rgba(59,130,246,.25); background: rgba(59,130,246,.08); }

.alertcard--critical{
  border-color: rgba(239,68,68,.25);
  box-shadow: 0 0 0 1px rgba(239,68,68,.08), 0 18px 60px rgba(0,0,0,.45);
}
.alertcard--critical .alertcard__icon{ background: rgba(239,68,68,.10); border-color: rgba(239,68,68,.22); color: rgba(239,68,68,.95); }

.alertcard--warning{
  border-color: rgba(245,158,11,.25);
  box-shadow: 0 0 0 1px rgba(245,158,11,.08), 0 18px 60px rgba(0,0,0,.45);
}
.alertcard--warning .alertcard__icon{ background: rgba(245,158,11,.10); border-color: rgba(245,158,11,.22); color: rgba(245,158,11,.95); }

.alertcard--info{
  border-color: rgba(59,130,246,.25);
  box-shadow: 0 0 0 1px rgba(59,130,246,.08), 0 18px 60px rgba(0,0,0,.45);
}
.alertcard--info .alertcard__icon{ background: rgba(59,130,246,.10); border-color: rgba(59,130,246,.22); color: rgba(59,130,246,.95); }

/* Responsive */
@media (max-width: 1100px){
  .alerts-kpi{ grid-template-columns: repeat(2, 1fr); }
  .filters__row{ grid-template-columns: 1fr; }
}
/* Animacja dopinania nowego alertu */
@keyframes alertEnter {
  0%   { opacity: 0; transform: translateY(-10px) scale(0.98); }
  60%  { opacity: 1; transform: translateY(2px) scale(1.00); }
  100% { opacity: 1; transform: translateY(0) scale(1.00); }
}

.alertcard--enter {
  animation: alertEnter 420ms ease-out;
}

/* Delikatne “flash” ramki (jak na nowy event) */
@keyframes alertFlash {
  0% { box-shadow: 0 0 0 0 rgba(59,130,246,.0); }
  30% { box-shadow: 0 0 0 2px rgba(59,130,246,.25); }
  100% { box-shadow: 0 0 0 0 rgba(59,130,246,.0); }
}
.alertcard--flash {
  animation: alertFlash 900ms ease-out;
}
/* ===== Command Palette (Ctrl+K) ===== */
.cmdk-overlay{
  position: fixed; inset: 0;
  background: rgba(0,0,0,.55);
  backdrop-filter: blur(6px);
  z-index: 1200;
}
.cmdk{
  position: fixed;
  top: 14vh;
  left: 50%;
  transform: translateX(-50%);
  width: min(760px, calc(100% - 24px));
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,.10);
  background: linear-gradient(180deg, rgba(11,18,32,.96), rgba(9,14,26,.94));
  box-shadow: 0 30px 90px rgba(0,0,0,.65);
  z-index: 1201;
  overflow: hidden;
}
.cmdk.hidden, .cmdk-overlay.hidden{ display:none; }

.cmdk__top{
  display:flex;
  align-items:center;
  gap: 12px;
  padding: 14px 14px 10px;
  border-bottom: 1px solid rgba(255,255,255,.06);
}
.cmdk__icon{
  width: 40px; height: 40px;
  border-radius: 14px;
  display:grid; place-items:center;
  background: rgba(59,130,246,.12);
  border: 1px solid rgba(59,130,246,.22);
  color: rgba(59,130,246,.95);
}
.cmdk__icon svg{ width:18px; height:18px; }

.cmdk__input{
  flex:1;
  border:0;
  outline:none;
  background: transparent;
  color: rgba(234,240,255,.95);
  font-size: 14px;
  font-weight: 650;
}
.cmdk__hint kbd{
  padding: 6px 8px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.03);
  color: rgba(234,240,255,.65);
  font-weight: 800;
  font-size: 12px;
}

.cmdk__meta{
  padding: 10px 14px;
  display:flex;
  gap: 10px;
  flex-wrap: wrap;
  color: rgba(234,240,255,.55);
  font-size: 12px;
}
.cmdk__pill{
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.08);
  background: rgba(255,255,255,.02);
}
.cmdk__pill kbd{
  padding: 3px 6px;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.03);
  margin-right: 4px;
  font-weight: 900;
  font-size: 11px;
}

.cmdk__list{
  max-height: 52vh;
  overflow:auto;
  padding: 8px;
}
.cmdk-item{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 12px;
  padding: 12px 12px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.06);
  background: rgba(255,255,255,.02);
  cursor:pointer;
  margin-bottom: 8px;
}
.cmdk-item:hover{ border-color: rgba(255,255,255,.12); background: rgba(255,255,255,.03); }
.cmdk-item--active{
  border-color: rgba(59,130,246,.35);
  background: rgba(59,130,246,.10);
}
.cmdk-item__left{
  display:flex;
  gap: 12px;
  align-items:center;
  min-width: 0;
}
.cmdk-item__icon{
  width: 34px; height: 34px;
  border-radius: 12px;
  display:grid; place-items:center;
  border: 1px solid rgba(255,255,255,.08);
  background: rgba(255,255,255,.02);
  color: rgba(234,240,255,.85);
}
.cmdk-item__icon svg{ width:16px; height:16px; }
.cmdk-item__text{
  min-width: 0;
}
.cmdk-item__title{
  font-weight: 900;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cmdk-item__desc{
  margin-top: 2px;
  color: rgba(234,240,255,.55);
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cmdk-item__right{
  display:flex;
  align-items:center;
  gap: 8px;
  color: rgba(234,240,255,.55);
  font-size: 12px;
}
.cmdk-badge{
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.08);
  background: rgba(255,255,255,.02);
  font-weight: 900;
}
.cmdk-badge--critical{ border-color: rgba(239,68,68,.25); background: rgba(239,68,68,.08); color: rgba(239,68,68,.95); }
.cmdk-badge--warning{ border-color: rgba(245,158,11,.25); background: rgba(245,158,11,.08); color: rgba(245,158,11,.95); }
.cmdk-badge--info{ border-color: rgba(59,130,246,.25); background: rgba(59,130,246,.08); color: rgba(59,130,246,.95); }
.cmdk-badge--ticket{ border-color: rgba(167,139,250,.25); background: rgba(167,139,250,.08); color: rgba(167,139,250,.95); }
.cmdk-badge--filter{ border-color: rgba(20,184,166,.25); background: rgba(20,184,166,.08); color: rgba(20,184,166,.95); }
.cmdk-badge--sort{ border-color: rgba(148,163,184,.25); background: rgba(148,163,184,.08); color: rgba(148,163,184,.95); }
.cmdk-badge--status{ border-color: rgba(34,211,238,.25); background: rgba(34,211,238,.08); color: rgba(34,211,238,.95); }
.cmdk-badge--firma{ border-color: rgba(16,185,129,.25); background: rgba(16,185,129,.08); color: rgba(16,185,129,.95); }
.cmdk-badge--kontakt{ border-color: rgba(59,130,246,.25); background: rgba(59,130,246,.08); color: rgba(59,130,246,.95); }
.cmdk-badge--eksport{ border-color: rgba(245,158,11,.25); background: rgba(245,158,11,.08); color: rgba(245,158,11,.95); }
.cmdk-badge--recent{ border-color: rgba(148,163,184,.2); background: rgba(148,163,184,.07); color: rgba(148,163,184,.85); }

/* ===== Helpdesk: Aging badges ===== */
.hd-aging-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  border-radius: 99px;
  padding: 1px 7px;
  margin-left: 6px;
  vertical-align: middle;
}
.aging--fresh { background: rgba(34,197,94,.15); color: #16a34a; border: 1px solid rgba(34,197,94,.3); }
.aging--warn  { background: rgba(234,179,8,.15);  color: #a16207; border: 1px solid rgba(234,179,8,.3); }
.aging--old   { background: rgba(239,68,68,.15);  color: #dc2626; border: 1px solid rgba(239,68,68,.3); }

/* ===== Helpdesk: SLA badges ===== */
.hd-sla-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  border-radius: 99px;
  padding: 1px 7px;
  margin-left: 4px;
  vertical-align: middle;
}
.sla-badge--ok     { background: rgba(34,197,94,.12); color: #15803d; border: 1px solid rgba(34,197,94,.25); }
.sla-badge--warn   { background: rgba(234,179,8,.12);  color: #92400e; border: 1px solid rgba(234,179,8,.25); }
.sla-badge--urgent { background: rgba(249,115,22,.15); color: #c2410c; border: 1px solid rgba(249,115,22,.3); animation: sla-pulse 1s infinite; }
.sla-badge--breach { background: rgba(239,68,68,.15);  color: #b91c1c; border: 1px solid rgba(239,68,68,.35); animation: sla-pulse .7s infinite; }
@keyframes sla-pulse { 0%,100% { opacity:1; } 50% { opacity:.55; } }

/* ===== Recurring alert badge ===== */
.alertcard__recurringbadge {
  position: absolute;
  top: 8px;
  left: 8px;
  font-size: 10px;
  font-weight: 700;
  background: rgba(239,68,68,.12);
  border: 1px solid rgba(239,68,68,.3);
  color: #dc2626;
  border-radius: 99px;
  padding: 2px 8px;
}

/* ===== Runbook Modal ===== */
.rb-overlay{
  position: fixed; inset: 0;
  background: rgba(0,0,0,.55);
  backdrop-filter: blur(6px);
  z-index: 1300;
}
.rb{
  position: fixed;
  top: 10vh;
  left: 50%;
  transform: translateX(-50%);
  width: min(860px, calc(100% - 24px));
  max-height: 80vh;
  overflow:hidden;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,.10);
  background: linear-gradient(180deg, rgba(11,18,32,.98), rgba(9,14,26,.96));
  box-shadow: 0 34px 110px rgba(0,0,0,.70);
  z-index: 1301;
}
.rb.hidden, .rb-overlay.hidden{ display:none; }

.rb__head{
  padding: 16px 16px 12px;
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap: 12px;
  border-bottom: 1px solid rgba(255,255,255,.06);
}
.rb__title{ font-size: 18px; font-weight: 950; }
.rb__subtitle{ margin-top:4px; color: rgba(234,240,255,.55); font-size: 13px; }
.rb__close{
  border:0;
  width: 40px; height: 40px;
  border-radius: 14px;
  cursor:pointer;
  background: rgba(255,255,255,.03);
  border: 1px solid rgba(255,255,255,.08);
  color: rgba(234,240,255,.85);
}
.rb__close:hover{ background: rgba(255,255,255,.05); border-color: rgba(255,255,255,.12); }
.rb__close svg{ width:18px; height:18px; }

.rb__body{
  padding: 14px 16px;
  overflow:auto;
  max-height: calc(80vh - 140px);
}

.rb-section{
  margin-bottom: 14px;
  padding: 14px;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,.08);
  background: rgba(255,255,255,.02);
}
.rb-section__title{
  font-weight: 950;
  display:flex;
  align-items:center;
  gap: 10px;
}
.rb-section__title svg{ width:16px; height:16px; opacity:.9; }
.rb-section__desc{
  margin-top: 8px;
  color: rgba(234,240,255,.60);
  font-size: 13px;
}
.rb-steps{
  margin-top: 10px;
  display:flex;
  flex-direction:column;
  gap: 10px;
}
.rb-step{
  display:flex;
  gap: 10px;
  align-items:flex-start;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.06);
  background: rgba(255,255,255,.02);
}
.rb-step input{ margin-top: 2px; }
.rb-step__text{ color: rgba(234,240,255,.85); }
.rb-step__hint{ margin-top: 4px; color: rgba(234,240,255,.50); font-size: 12px; }

.rb__footer{
  padding: 12px 16px 16px;
  display:flex;
  justify-content:flex-end;
  gap: 10px;
  border-top: 1px solid rgba(255,255,255,.06);
}

.rb__btn{
  border-radius: 14px;
  padding: 11px 12px;
  font-weight: 900;
  border: 1px solid rgba(255,255,255,.10);
  cursor:pointer;
  display:inline-flex;
  align-items:center;
  gap: 10px;
}
.rb__btn svg{ width:16px; height:16px; }
.rb__btn--ghost{
  background: rgba(255,255,255,.02);
  color: rgba(234,240,255,.85);
}
.rb__btn--ghost:hover{ background: rgba(255,255,255,.04); }
.rb__btn--primary{
  background: rgba(59,130,246,.95);
  border-color: rgba(59,130,246,.55);
  color: #031427;
}
.rb__btn--primary:hover{ filter: brightness(1.02); }

/* Mały przycisk Runbook na kartach */
.rb-mini{
  margin-left: auto;
  border-radius: 12px;
  padding: 8px 10px;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.02);
  color: rgba(234,240,255,.75);
  font-weight: 900;
  cursor:pointer;
  display:inline-flex;
  align-items:center;
  gap: 8px;
}
.rb-mini svg{ width:16px; height:16px; }
.rb-mini:hover{ background: rgba(255,255,255,.04); border-color: rgba(255,255,255,.14); }
.tmodal-overlay{
  position: fixed; inset: 0;
  background: rgba(0,0,0,.55);
  backdrop-filter: blur(6px);
  z-index: 1500;
}
.tmodal{
  position: fixed;
  top: 10vh;
  left: 50%;
  transform: translateX(-50%);
  width: min(860px, calc(100% - 24px));
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,.10);
  background: linear-gradient(180deg, rgba(11,18,32,.98), rgba(9,14,26,.96));
  box-shadow: 0 34px 110px rgba(0,0,0,.70);
  z-index: 1501;
  overflow: hidden;
}
.tmodal.hidden, .tmodal-overlay.hidden{ display:none; }

.tmodal__head{
  padding: 16px 16px 12px;
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap: 12px;
  border-bottom: 1px solid rgba(255,255,255,.06);
}
.tmodal__title{ font-size: 18px; font-weight: 950; }
.tmodal__sub{ margin-top: 4px; color: rgba(234,240,255,.55); font-size: 13px; }

.tmodal__close{
  width: 40px; height: 40px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.08);
  background: rgba(255,255,255,.03);
  color: rgba(234,240,255,.85);
  cursor:pointer;
}
.tmodal__close:hover{ background: rgba(255,255,255,.05); border-color: rgba(255,255,255,.12); }
.tmodal__close svg{ width:18px; height:18px; }

.tmodal__body{
  padding: 14px 16px;
  max-height: calc(80vh - 120px);
  overflow:auto;
}
.tfield{ display:block; margin-bottom: 14px; }
.tfield__label{ font-weight: 950; margin-bottom: 8px; color: rgba(234,240,255,.88); }
.tfield__hint{ margin-top: 8px; font-size: 12px; color: rgba(234,240,255,.55); }

.tfield__input, .tfield__textarea, .tfield__select{
  width: 100%;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.02);
  color: rgba(234,240,255,.88);
  padding: 12px 12px;
  outline: none;
}
.tfield__textarea{ resize: vertical; min-height: 140px; }
.tfield__input:focus, .tfield__textarea:focus, .tfield__select:focus{
  border-color: rgba(59,130,246,.35);
  box-shadow: 0 0 0 2px rgba(59,130,246,.12);
}

.tgrid{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  align-items:end;
}
@media (max-width: 720px){
  .tgrid{ grid-template-columns: 1fr; }
}
.tfield--checkbox{
  display:flex;
  gap: 10px;
  align-items:center;
  padding: 12px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.02);
  color: rgba(234,240,255,.78);
  font-weight: 900;
}
.tfield--checkbox input{ transform: translateY(1px); }

.tmodal__footer{
  padding-top: 10px;
  display:flex;
  justify-content:flex-end;
  gap: 10px;
}

.tbtn{
  border-radius: 14px;
  padding: 11px 12px;
  font-weight: 950;
  border: 1px solid rgba(255,255,255,.10);
  cursor:pointer;
  display:inline-flex;
  align-items:center;
  gap: 10px;
}
.tbtn svg{ width:16px; height:16px; }
.tbtn--ghost{
  background: rgba(255,255,255,.02);
  color: rgba(234,240,255,.85);
}
.tbtn--ghost:hover{ background: rgba(255,255,255,.04); }
.tbtn--primary{
  background: rgba(59,130,246,.95);
  border-color: rgba(59,130,246,.55);
  color: #031427;
}
.tbtn--primary:hover{ filter: brightness(1.02); }

.ticketbtn{
  margin-left: 8px;
  border-radius: 12px;
  padding: 8px 10px;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.02);
  color: rgba(234,240,255,.78);
  font-weight: 950;
  cursor:pointer;
  display:inline-flex;
  align-items:center;
  gap: 8px;
}
.ticketbtn svg{ width:16px; height:16px; }
.ticketbtn:hover{ background: rgba(255,255,255,.04); border-color: rgba(255,255,255,.14); }
.ticketbtn:disabled{ opacity:.55; cursor:not-allowed; }

/* ===== Toast action button ===== */
.toast__action {
  margin-top: 6px;
}
.toast__action-btn {
  font-size: 12px;
  font-weight: 700;
  color: rgba(59,130,246,.95);
  text-decoration: none;
  padding: 3px 10px;
  border: 1px solid rgba(59,130,246,.3);
  border-radius: 99px;
  display: inline-block;
  transition: background .15s;
}
.toast__action-btn:hover {
  background: rgba(59,130,246,.12);
  color: rgba(59,130,246,.95);
  text-decoration: none;
}

/* ===== Alert group badge ===== */
.alertcard__groupbadge {
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(59,130,246,.85);
  color: white;
  font-size: 10px;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 99px;
  line-height: 1.4;
  letter-spacing: .02em;
}

/* ===== Heatmap ===== */
.heatmap {
  margin-bottom: 14px;
}
.heatmap__head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}
.heatmap__icon {
  width: 36px; height: 36px;
  border-radius: 10px;
  display: grid; place-items: center;
  background: rgba(59,130,246,.10);
  border: 1px solid rgba(59,130,246,.22);
  color: rgba(59,130,246,.9);
  flex-shrink: 0;
}
.heatmap__icon svg { width: 16px; height: 16px; }
.heatmap__wrap {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  overflow-x: auto;
}
.heatmap__labels-y {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding-top: 18px;
  flex-shrink: 0;
}
.heatmap__labels-y span {
  height: 16px;
  font-size: 10px;
  color: rgba(234,240,255,.45);
  line-height: 16px;
  width: 24px;
  text-align: right;
}
.heatmap__grid {
  flex: 1;
  min-width: 0;
}
.heatmap__labels-x {
  display: grid;
  grid-template-columns: repeat(24, 1fr);
  margin-bottom: 4px;
}
.heatmap__labels-x span {
  font-size: 9px;
  color: rgba(234,240,255,.40);
  text-align: center;
}
.heatmap__row {
  display: grid;
  grid-template-columns: repeat(24, 1fr);
  gap: 3px;
  margin-bottom: 3px;
}
.heatmap__cell {
  height: 16px;
  border-radius: 3px;
  cursor: default;
  transition: transform .1s;
}
.heatmap__cell:hover {
  transform: scale(1.3);
  z-index: 1;
  outline: 1px solid rgba(59,130,246,.5);
}

/* ===== HELPDESK — Mobile ===== */
@media (max-width: 767px) {
  /* Outer list container padding */
  .hd-list-wrap { padding: 10px !important; }

  /* Ticket row — reduce 3rem side padding */
  #tickets_div .row.hd-tc-row,
  .panel-body > .row.hd-tc-row {
    padding-left: 4px !important;
    padding-right: 4px !important;
  }

  /* Ticket card meta — horizontal scroll on small screens */
  .hd-tc-meta {
    flex-wrap: nowrap !important;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
  }

  /* Fix fixed-width form inputs */
  .form input:not([type=checkbox]):not([type=radio]):not([type=submit]):not([type=button]):not([type=file]) {
    width: 100% !important;
    max-width: 100%;
  }
  .form select {
    width: 100% !important;
    max-width: 100%;
  }

  /* Sort controls — stack per-line on narrow screens */
  #status_filter_form .col-lg-9 > p > span {
    display: block;
    margin-bottom: 6px;
  }
  #status_filter_form .col-lg-9 > p {
    font-size: 12px;
  }

  /* Filter stats boxes — slightly smaller */
  .stats-top {
    font-size: 0.9rem !important;
    margin: 4px !important;
    padding: 6px !important;
  }
}

/* ===== F1: Drag & Drop sortable ===== */
.sortable-ghost {
  opacity: .4;
  background: #e8f4ff !important;
}
.drag-handle {
  cursor: grab;
  color: #aaa;
  font-size: 18px;
  line-height: 1;
  padding: 0 4px;
  user-select: none;
}
.drag-handle:active { cursor: grabbing; }

/* ===== F2: Animated KPI counters ===== */
@keyframes kpiPop {
  0%   { transform: scale(1); }
  40%  { transform: scale(1.25); color: #fff; }
  100% { transform: scale(1); }
}
.kpi2__value--animating {
  animation: kpiPop .45s ease-out;
}

/* ===== Snooze indicator ===== */
.hd-snooze-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  background: #f0f0f0;
  color: #888;
  border-radius: 8px;
  padding: 1px 7px;
  font-size: 11px;
  margin-left: 6px;
  border: 1px solid #ddd;
  vertical-align: middle;
}
/* snoozed row: gray-green border, slightly dimmed */
.ticket-snoozed > .col-12 {
  border-color: #b0b0b0 !important;
  opacity: 0.72;
}
/* ═══════════════════════════════════════════════
   War Room Mode
   ═══════════════════════════════════════════════ */
#warRoom {
  display: none;
  position: fixed; inset: 0; z-index: 9998;
  background: #080810;
  flex-direction: column;
  font-family: Inter, system-ui, sans-serif;
  color: #e2e8f0;
}
#wrTopBar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 24px;
  background: rgba(255,255,255,.04);
  border-bottom: 1px solid rgba(255,255,255,.08);
  font-size: 13px; font-weight: 700; letter-spacing: .5px;
}
#wrTopBar span:first-child {
  color: #ef4444; font-size: 15px; letter-spacing: 2px; text-transform: uppercase;
}
#wrClock { font-size: 20px; font-weight: 800; font-variant-numeric: tabular-nums; color: #e2e8f0; }
#wrTopBar button {
  background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.12);
  border-radius: 8px; padding: 6px 14px; color: #94a3b8; font-size: 12px;
  font-weight: 700; cursor: pointer; letter-spacing: .5px;
}
#wrTopBar button:hover { background: rgba(255,255,255,.14); color: #e2e8f0; }

#wrMain {
  flex: 1; display: grid;
  grid-template-columns: 1fr 240px 1fr;
  gap: 16px; padding: 16px 20px; overflow: hidden;
}
#wrAlerts, #wrTickets {
  background: rgba(255,255,255,.03);
  border: 1px solid rgba(255,255,255,.07);
  border-radius: 12px; padding: 14px;
  overflow-y: auto;
}
#wrAlerts h3, #wrTickets h3 {
  font-size: 11px; font-weight: 700; letter-spacing: 1.2px;
  text-transform: uppercase; color: #475569; margin: 0 0 12px;
}
.wr-alert-item {
  background: rgba(239,68,68,.07);
  border-left: 3px solid #ef4444;
  border-radius: 8px; padding: 10px 12px; margin-bottom: 8px;
  animation: wrSlideIn .25s ease;
}
.wr-alert-item--new {
  animation: wrSlideIn .25s ease, wrFlash .6s ease;
}
@keyframes wrSlideIn { from { opacity:0; transform: translateX(-10px); } to { opacity:1; transform: none; } }
@keyframes wrFlash {
  0%, 100% { background: rgba(239,68,68,.07); }
  50%       { background: rgba(245,197,30,.18); }
}
.wr-alert-title { font-size: 13px; font-weight: 700; color: #f1f5f9; margin: 0; }
.wr-alert-meta  { font-size: 11px; color: #64748b; margin-top: 3px; }

.wr-ticket-item {
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.07);
  border-radius: 8px; padding: 10px 12px; margin-bottom: 8px;
}
.wr-ticket-title { font-size: 12px; font-weight: 600; color: #e2e8f0; margin: 0 0 4px; }
.wr-ticket-meta  { font-size: 11px; color: #64748b; }

#wrMetrics {
  display: flex; flex-direction: column; gap: 14px;
  align-items: center; justify-content: center; padding: 8px;
}
.wr-metric {
  background: rgba(255,255,255,.03);
  border: 1px solid rgba(255,255,255,.07);
  border-radius: 14px; padding: 18px 24px; text-align: center; width: 100%;
}
.wr-metric-lbl { font-size: 10px; font-weight: 700; letter-spacing: 1.2px; text-transform: uppercase; color: #475569; margin-bottom: 8px; }
.wr-metric-val {
  font-size: 64px; font-weight: 900; line-height: 1;
  color: #ef4444;
}
.wr-metric-val.green { color: #22c55e; }
.wr-metric-val.pulse { animation: wrPulse 1.5s ease infinite; }
@keyframes wrPulse { 0%,100% { transform: scale(1); } 50% { transform: scale(1.06); } }

#wrTicker {
  height: 36px; overflow: hidden;
  background: rgba(255,255,255,.03);
  border-top: 1px solid rgba(255,255,255,.07);
  display: flex; align-items: center;
}
#wrTickerTrack {
  white-space: nowrap;
  animation: wrScroll 30s linear infinite;
  font-size: 12px; color: #64748b; padding: 0 20px;
}
@keyframes wrScroll { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ─── Time Machine ─── */
.tm-historical { filter: sepia(0.4) brightness(0.95); transition: filter .3s; }

/* expired snooze: amber pulse */
.ticket-snooze-expired > .col-12 {
  border-color: #f59e0b !important;
  opacity: 1 !important;
  box-shadow: 0 0 0 3px rgba(245,158,11,.3);
  animation: snoozeWake 1.4s ease-in-out infinite;
}
@keyframes snoozeWake {
  0%, 100% { box-shadow: 0 0 0 3px rgba(245,158,11,.3); }
  50%       { box-shadow: 0 0 0 7px rgba(245,158,11,.1); }
}
.hd-snooze-expired-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  background: #fef3c7;
  color: #b45309;
  border-radius: 8px;
  padding: 1px 8px;
  font-size: 11px;
  margin-left: 6px;
  border: 1px solid #f59e0b;
  font-weight: 600;
  vertical-align: middle;
}

/* ─── Revenue Forecasting Engine ─── */
.fc-alert-banner {
  border-left: 4px solid;
  border-radius: 10px;
  padding: 10px 16px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.fc-alert-banner.decline { background: #fff1f2; border-color: #ef4444; color: #991b1b; }
.fc-alert-banner.spike   { background: #f0fdf4; border-color: #22c55e; color: #166534; }

.fc-kpi        { background: #f8f9fa; border-radius: 10px; padding: 14px 16px; text-align: center; }
.fc-kpi-val    { font-size: 26px; font-weight: 800; color: #344767; line-height: 1; }
.fc-kpi-lbl    { font-size: 10px; font-weight: 700; color: #8392ab; text-transform: uppercase;
                 letter-spacing: .07em; margin-top: 4px; }
.fc-trend-up   { color: #22c55e; font-size: 12px; font-weight: 700; }
.fc-trend-down { color: #ef4444; font-size: 12px; font-weight: 700; }
.fc-trend-flat { color: #8392ab; font-size: 12px; font-weight: 700; }

.fc-metric-tabs { display: flex; gap: 6px; margin-bottom: 16px; flex-wrap: wrap; }
.fc-metric-tab {
  padding: 6px 14px; border-radius: 50px; border: 1px solid #e9ecef;
  background: #fff; font-size: 12px; font-weight: 600; color: #344767;
  cursor: pointer; transition: all .15s;
}
.fc-metric-tab.active {
  background: linear-gradient(135deg, #7928CA, #FF0080);
  border-color: transparent; color: #fff;
}
.fc-days-select {
  padding: 5px 12px; border-radius: 8px; border: 1px solid #e9ecef;
  font-size: 12px; font-weight: 600; color: #344767; background: #fff; cursor: pointer;
}
.fc-section-title {
  font-size: 11px; font-weight: 700; color: #8392ab;
  text-transform: uppercase; letter-spacing: .1em; margin-bottom: 12px;
}

/* ════════════════════════════════════════════
   SIDEBAR LAYOUT
   ════════════════════════════════════════════ */

/* Reset shell container so sidebar can be full-width */
.shell { max-width: none; margin: 0; padding: 0; }

.al-layout { display: flex; min-height: 100vh; position: relative; overflow-x: hidden; }

/* ── Sidebar ── */
.al-sidebar {
  width: 220px; min-width: 220px;
  background: #0e0e1a;
  border-right: 1px solid rgba(255,255,255,.06);
  display: flex; flex-direction: column;
  flex-shrink: 0;
  position: sticky; top: 0; height: 100vh;
  z-index: 100; overflow-y: auto;
  transition: width .2s ease, min-width .2s ease;
}
.al-layout.sidebar-collapsed .al-sidebar { width: 0; min-width: 0; overflow: hidden; border-right: none; }

.al-logo { padding: 18px 16px 14px; border-bottom: 1px solid rgba(255,255,255,.06); }
.al-logo-inner { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.al-logo-icon {
  width: 34px; height: 34px; border-radius: 8px; flex-shrink: 0;
  background: rgba(59,130,246,.15); border: 1px solid rgba(59,130,246,.25);
  display: flex; align-items: center; justify-content: center; color: rgba(99,179,237,.95);
}
.al-logo-icon svg { width: 16px; height: 16px; }
.al-logo-title { font-size: 13px; font-weight: 700; color: #e2e8f0; line-height: 1.2; }
.al-logo-sub   { font-size: 10px; color: rgba(234,240,255,.4); margin-top: 1px; }

.al-nav-section { padding: 14px 0 6px; }
.al-nav-label {
  padding: 0 16px 5px;
  font-size: 9px; font-weight: 700; letter-spacing: 1.4px;
  text-transform: uppercase; color: rgba(234,240,255,.28);
}
.al-nav-link {
  display: flex; align-items: center; gap: 10px; padding: 9px 16px;
  font-size: 13px; font-weight: 500; color: rgba(234,240,255,.5);
  text-decoration: none; border-left: 2px solid transparent;
  transition: background .12s, color .12s;
}
.al-nav-link svg { width: 16px; height: 16px; opacity: .65; flex-shrink: 0; }
.al-nav-link:hover { background: rgba(59,130,246,.08); color: #e2e8f0; text-decoration: none; }
.al-nav-link:hover svg { opacity: 1; }
.al-nav-link.is-active {
  background: rgba(59,130,246,.12); color: rgba(99,179,237,.95);
  border-left-color: rgba(59,130,246,.8); font-weight: 600;
}
.al-nav-link.is-active svg { opacity: 1; }

/* ── Main ── */
.al-main {
  flex: 1; min-width: 0;
  display: flex; flex-direction: column;
}
.al-content { padding: 24px 24px 40px; flex: 1; }

/* ── Topbar toggle (hamburger) ── */
.al-topbar-toggle {
  background: none; border: none; cursor: pointer;
  color: rgba(234,240,255,.45); padding: 4px 6px; border-radius: 6px;
  display: flex; align-items: center; flex-shrink: 0; transition: background .12s, color .12s;
}
.al-topbar-toggle:hover { background: rgba(255,255,255,.07); color: #e2e8f0; }
.al-topbar-toggle svg { width: 20px; height: 20px; }

/* ── Backdrop ── */
.al-sidebar-backdrop {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,.55); z-index: 150;
}

/* ── Mobile overlay mode ── */
@media (max-width: 768px) {
  .al-sidebar {
    position: absolute; left: 0; top: 0; height: 100%; min-height: 100vh;
    width: 220px; min-width: 220px; overflow-y: auto; border-right: 1px solid rgba(255,255,255,.06);
    z-index: 200; transform: translateX(-220px); transition: transform .2s ease;
  }
  .al-layout.sidebar-open .al-sidebar { transform: translateX(0); }
  .al-layout.sidebar-collapsed .al-sidebar { transform: translateX(-220px); }
  .al-layout.sidebar-open .al-sidebar-backdrop { display: block; }
  .al-content { padding: 12px 16px 32px; }
  .alerts-topbar { flex-wrap: wrap; gap: 8px; }
}

/* ══════════════════════════════════════════════════════
   Alert card — redesign
   ══════════════════════════════════════════════════════ */
.alertcard {
  position: relative;
  display: flex;
  gap: 14px;
  padding: 16px 18px;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,.07);
  background: linear-gradient(135deg, rgba(255,255,255,.04) 0%, rgba(255,255,255,.015) 100%);
  backdrop-filter: blur(8px);
  margin-bottom: 10px;
  transition: border-color .2s, box-shadow .2s, opacity .3s;
  border-left: 4px solid transparent;
}
.alertcard:hover {
  border-color: rgba(255,255,255,.12);
  box-shadow: 0 8px 32px rgba(0,0,0,.25);
}
.alertcard--critical {
  border-left-color: rgba(239,68,68,.85);
  background: linear-gradient(135deg, rgba(239,68,68,.07) 0%, rgba(255,255,255,.015) 100%);
}
.alertcard--warning {
  border-left-color: rgba(245,158,11,.85);
  background: linear-gradient(135deg, rgba(245,158,11,.06) 0%, rgba(255,255,255,.015) 100%);
}
.alertcard--info {
  border-left-color: rgba(59,130,246,.85);
  background: linear-gradient(135deg, rgba(59,130,246,.06) 0%, rgba(255,255,255,.015) 100%);
}
.alertcard--resolved  { opacity: .38; filter: grayscale(.7); }
.alertcard--snoozed   { opacity: .5; border-left-color: rgba(100,116,139,.6) !important; }
.alertcard--acknowledged { border-left-color: rgba(234,179,8,.7) !important; }

.alertcard__icon {
  width: 40px; height: 40px; flex-shrink: 0;
  border-radius: 12px; display: grid; place-items: center;
  margin-top: 2px;
}
.alertcard--critical .alertcard__icon { background: rgba(239,68,68,.15); color: rgba(239,68,68,.9); }
.alertcard--warning  .alertcard__icon { background: rgba(245,158,11,.15); color: rgba(245,158,11,.9); }
.alertcard--info     .alertcard__icon { background: rgba(59,130,246,.15); color: rgba(59,130,246,.9); }
.alertcard__icon svg { width: 18px; height: 18px; }

.alertcard__body { flex: 1; min-width: 0; }
.alertcard__top  { display: flex; align-items: flex-start; gap: 8px; margin-bottom: 5px; flex-wrap: wrap; }
.alertcard__title { font-size: 15px; font-weight: 800; letter-spacing: -.01em; flex: 1; min-width: 0; }
.alertcard__text  { font-size: 13px; color: rgba(234,240,255,.6); line-height: 1.5; margin-bottom: 10px; }

.alertcard__meta {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
}

/* severity tag */
.tag { padding: 3px 9px; border-radius: 999px; font-size: 11px; font-weight: 800; letter-spacing: .04em; white-space: nowrap; }
.tag--critical { background: rgba(239,68,68,.15); color: rgba(239,68,68,.95); border: 1px solid rgba(239,68,68,.25); }
.tag--warning  { background: rgba(245,158,11,.15); color: rgba(245,158,11,.95); border: 1px solid rgba(245,158,11,.25); }
.tag--info     { background: rgba(59,130,246,.15); color: rgba(59,130,246,.95); border: 1px solid rgba(59,130,246,.25); }

/* category badge — colored by AlertCategory.color */
.cat-badge { padding: 3px 9px; border-radius: 999px; font-size: 11px; font-weight: 700; white-space: nowrap; }
.cat-badge--blue   { background: rgba(59,130,246,.13);  color: rgba(99,179,237,.9);  border: 1px solid rgba(59,130,246,.22); }
.cat-badge--red    { background: rgba(239,68,68,.13);   color: rgba(239,68,68,.9);   border: 1px solid rgba(239,68,68,.22); }
.cat-badge--amber  { background: rgba(245,158,11,.13);  color: rgba(245,158,11,.9);  border: 1px solid rgba(245,158,11,.22); }
.cat-badge--green  { background: rgba(34,197,94,.13);   color: rgba(34,197,94,.9);   border: 1px solid rgba(34,197,94,.22); }
.cat-badge--purple { background: rgba(167,139,250,.13); color: rgba(167,139,250,.9); border: 1px solid rgba(167,139,250,.22); }
.cat-badge--gray   { background: rgba(148,163,184,.1);  color: rgba(148,163,184,.9); border: 1px solid rgba(148,163,184,.2); }

.meta { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; color: rgba(234,240,255,.4); }
.meta svg { width: 12px; height: 12px; }

/* Compact view */
.al-layout--compact .alertcard {
  padding: 8px 14px; border-radius: 8px; margin-bottom: 3px; gap: 10px;
  cursor: pointer;
}
.al-layout--compact .alertcard__icon { width: 26px; height: 26px; border-radius: 7px; }
.al-layout--compact .alertcard__icon svg { width: 13px; height: 13px; }
.al-layout--compact .alertcard__title { font-size: 13px; }
.al-layout--compact .alertcard__text  { display: none; }
.al-layout--compact .alertcard__meta  { margin-top: 3px; }
.al-layout--compact .alertcard__actions { display: none; }
.al-layout--compact .alertcard__comments { display: none; }
.al-layout--compact .alertcard:hover { border-color: rgba(255,255,255,.15); }

/* ══════════════════════════════════════════════════════
   Resolve button
   ══════════════════════════════════════════════════════ */
.alertcard__resolve {
  margin-left: auto;
  flex-shrink: 0;
  padding: 6px 12px;
  border-radius: 10px;
  border: 1px solid rgba(34,197,94,.25);
  background: rgba(34,197,94,.08);
  color: rgba(34,197,94,.9);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.alertcard__resolve:hover { background: rgba(34,197,94,.14); border-color: rgba(34,197,94,.4); }
.alertcard__resolve:disabled { opacity: .55; cursor: not-allowed; }

/* Acknowledge */
.alertcard__ack {
  flex-shrink: 0; padding: 6px 12px; border-radius: 10px;
  border: 1px solid rgba(234,179,8,.25); background: rgba(234,179,8,.08);
  color: rgba(234,179,8,.9); font-size: 12px; font-weight: 700; cursor: pointer;
  display: inline-flex; align-items: center; gap: 6px;
}
.alertcard__ack:hover { background: rgba(234,179,8,.14); }
.alertcard__ack:disabled { opacity: .55; cursor: not-allowed; }
.alertcard__ack--done { background: rgba(234,179,8,.12); border-color: rgba(234,179,8,.3); cursor: default; }

/* Snooze dropdown */
.snooze-wrap { position: relative; display: inline-block; }
.alertcard__snooze {
  flex-shrink: 0; padding: 6px 12px; border-radius: 10px;
  border: 1px solid rgba(148,163,184,.2); background: rgba(148,163,184,.06);
  color: rgba(148,163,184,.8); font-size: 12px; font-weight: 700; cursor: pointer;
  display: inline-flex; align-items: center; gap: 6px;
}
.alertcard__snooze:hover { background: rgba(148,163,184,.1); }
.snooze-menu {
  display: none; position: absolute; bottom: 110%; left: 0;
  background: rgba(14,18,36,.97); border: 1px solid rgba(255,255,255,.1);
  border-radius: 12px; padding: 6px; min-width: 160px; z-index: 50;
  box-shadow: 0 12px 40px rgba(0,0,0,.5);
}
.snooze-menu.open { display: block; }
.snooze-option {
  padding: 8px 12px; border-radius: 8px; font-size: 13px; cursor: pointer;
  color: rgba(234,240,255,.8); display: block; width: 100%; text-align: left;
  background: none; border: none;
}
.snooze-option:hover { background: rgba(255,255,255,.06); }

/* Assign */
.assign-wrap { position: relative; display: inline-block; }
.alertcard__assign {
  flex-shrink: 0; padding: 5px 10px; border-radius: 10px;
  border: 1px solid rgba(167,139,250,.2); background: rgba(167,139,250,.06);
  color: rgba(167,139,250,.8); font-size: 12px; font-weight: 700; cursor: pointer;
  display: inline-flex; align-items: center; gap: 6px;
}
.alertcard__assign:hover { background: rgba(167,139,250,.1); }
.assign-avatar {
  width: 24px; height: 24px; border-radius: 50%; background: rgba(167,139,250,.2);
  color: rgba(167,139,250,.9); font-size: 10px; font-weight: 800;
  display: inline-flex; align-items: center; justify-content: center;
}
.assign-menu {
  display: none; position: absolute; bottom: 110%; left: 0;
  background: rgba(14,18,36,.97); border: 1px solid rgba(255,255,255,.1);
  border-radius: 12px; padding: 6px; min-width: 180px; z-index: 50;
  box-shadow: 0 12px 40px rgba(0,0,0,.5); max-height: 220px; overflow-y: auto;
}
.assign-menu.open { display: block; }
.assign-option {
  padding: 8px 12px; border-radius: 8px; font-size: 13px; cursor: pointer;
  color: rgba(234,240,255,.8); display: flex; align-items: center; gap: 8px;
  background: none; border: none; width: 100%; text-align: left;
}
.assign-option:hover { background: rgba(255,255,255,.06); }

/* Comment button + section */
.alertcard__comment-btn {
  flex-shrink: 0; padding: 6px 12px; border-radius: 10px;
  border: 1px solid rgba(99,179,237,.2); background: rgba(99,179,237,.06);
  color: rgba(99,179,237,.8); font-size: 12px; font-weight: 700; cursor: pointer;
  display: inline-flex; align-items: center; gap: 6px;
}
.alertcard__comment-btn:hover { background: rgba(99,179,237,.1); }
.alertcard__comments {
  margin-top: 12px; padding-top: 12px;
  border-top: 1px solid rgba(255,255,255,.06);
  display: none;
}
.alertcard__comments.open { display: block; }
.comment-item {
  display: flex; gap: 10px; margin-bottom: 8px; align-items: flex-start;
}
.comment-avatar {
  width: 28px; height: 28px; border-radius: 50%; flex-shrink: 0;
  background: rgba(59,130,246,.2); color: rgba(99,179,237,.9);
  font-size: 11px; font-weight: 800; display: grid; place-items: center;
}
.comment-body { flex: 1; min-width: 0; }
.comment-author { font-size: 11px; font-weight: 700; color: rgba(234,240,255,.5); margin-bottom: 2px; }
.comment-text { font-size: 13px; color: rgba(234,240,255,.82); line-height: 1.4; }
.comment-delete {
  font-size: 10px; color: rgba(239,68,68,.5); cursor: pointer; border: none;
  background: none; padding: 0 4px;
}
.comment-delete:hover { color: rgba(239,68,68,.9); }
.comment-form { display: flex; gap: 8px; margin-top: 10px; }
.comment-input {
  flex: 1; background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.1);
  border-radius: 10px; padding: 8px 12px; color: rgba(234,240,255,.9); font-size: 13px;
}
.comment-input:focus { outline: none; border-color: rgba(59,130,246,.35); }
.comment-submit {
  padding: 8px 14px; border-radius: 10px; background: rgba(59,130,246,.9);
  border: 1px solid rgba(59,130,246,.5); color: #031427; font-weight: 700;
  font-size: 12px; cursor: pointer;
}
.comment-submit:hover { filter: brightness(1.05); }

/* Bulk select */
.alertcard__checkbox { position: absolute; top: 14px; right: 14px; width: 18px; height: 18px; cursor: pointer; display: none; }
.bulk-mode .alertcard__checkbox { display: block; }
.alertcard.bulk-selected { border-color: rgba(59,130,246,.5) !important; box-shadow: 0 0 0 2px rgba(59,130,246,.2); }

/* Bulk floating bar */
#bulkBar {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%);
  background: rgba(14,18,36,.97); border: 1px solid rgba(255,255,255,.12);
  border-radius: 16px; padding: 12px 20px; display: flex; align-items: center; gap: 12px;
  box-shadow: 0 20px 60px rgba(0,0,0,.6); z-index: 500;
  backdrop-filter: blur(12px); display: none;
}
#bulkBar.visible { display: flex; }
#bulkCount { font-size: 14px; font-weight: 800; color: rgba(234,240,255,.9); }
.bulk-action-btn {
  padding: 8px 16px; border-radius: 10px; font-size: 13px; font-weight: 700; cursor: pointer;
  border: 1px solid rgba(255,255,255,.1); background: rgba(255,255,255,.04); color: rgba(234,240,255,.85);
}
.bulk-action-btn:hover { background: rgba(255,255,255,.08); }
.bulk-action-btn--resolve   { border-color: rgba(34,197,94,.3);  background: rgba(34,197,94,.08);  color: rgba(34,197,94,.9); }
.bulk-action-btn--ack       { border-color: rgba(234,179,8,.3);  background: rgba(234,179,8,.08);  color: rgba(234,179,8,.9); }
.bulk-action-btn--snooze    { border-color: rgba(148,163,184,.3);background: rgba(148,163,184,.06);color: rgba(148,163,184,.9); }
.bulk-cancel-btn { font-size: 12px; color: rgba(234,240,255,.4); cursor: pointer; background: none; border: none; padding: 4px 8px; }
.bulk-cancel-btn:hover { color: rgba(234,240,255,.7); }

/* Compact/expanded toggle */
.view-toggle { display: flex; gap: 4px; }
.view-toggle-btn {
  width: 34px; height: 34px; border-radius: 10px; border: 1px solid rgba(255,255,255,.08);
  background: rgba(255,255,255,.02); color: rgba(234,240,255,.5); cursor: pointer;
  display: grid; place-items: center;
}
.view-toggle-btn:hover { background: rgba(255,255,255,.06); color: #e2e8f0; }
.view-toggle-btn.active { background: rgba(59,130,246,.15); border-color: rgba(59,130,246,.3); color: rgba(99,179,237,.95); }
.view-toggle-btn svg { width: 16px; height: 16px; }

/* KPI trend */
.kpi2__trend { font-size: 12px; font-weight: 700; margin-top: 4px; display: flex; align-items: center; gap: 4px; }
.kpi2__trend--up   { color: rgba(239,68,68,.9); }
.kpi2__trend--down { color: rgba(34,197,94,.9); }
.kpi2__trend--flat { color: rgba(148,163,184,.6); }

/* Export button */
.export-wrap { position: relative; }
.export-btn {
  padding: 8px 14px; border-radius: 10px; border: 1px solid rgba(255,255,255,.1);
  background: rgba(255,255,255,.03); color: rgba(234,240,255,.7);
  font-size: 13px; font-weight: 700; cursor: pointer; display: flex; align-items: center; gap: 8px;
}
.export-btn:hover { background: rgba(255,255,255,.06); color: #e2e8f0; }
.export-menu {
  display: none; position: absolute; top: 110%; right: 0;
  background: rgba(14,18,36,.97); border: 1px solid rgba(255,255,255,.1);
  border-radius: 12px; padding: 6px; min-width: 140px; z-index: 50;
  box-shadow: 0 12px 40px rgba(0,0,0,.5);
}
.export-menu.open { display: block; }
.export-option {
  padding: 9px 14px; border-radius: 8px; font-size: 13px; cursor: pointer;
  color: rgba(234,240,255,.8); display: flex; align-items: center; gap: 8px;
  text-decoration: none;
}
.export-option:hover { background: rgba(255,255,255,.06); color: #e2e8f0; text-decoration: none; }

/* ══════════════════════════════════════════════════════
   Health score gauge
   ══════════════════════════════════════════════════════ */
.health-gauge-wrap { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.health-gauge-wrap svg { width: 180px; height: 180px; }
.health-score-val { font-size: 52px; font-weight: 900; letter-spacing: -.03em; line-height: 1; }
.health-score-label { font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; opacity: .7; }
.health-good  { color: rgba(34,197,94,.95); }
.health-warn  { color: rgba(245,158,11,.95); }
.health-bad   { color: rgba(239,68,68,.95); }

/* MTTR tabela */
.mttr-table { width: 100%; border-collapse: collapse; }
.mttr-table th { font-size: 11px; letter-spacing: .08em; color: rgba(234,240,255,.45); font-weight: 700; padding: 10px 14px; border-bottom: 1px solid rgba(255,255,255,.06); text-align: left; }
.mttr-table td { padding: 12px 14px; border-bottom: 1px solid rgba(255,255,255,.04); font-size: 14px; }
.mttr-table tr:hover td { background: rgba(255,255,255,.02); }
.mttr-val { font-size: 20px; font-weight: 900; }
.mttr-na  { color: rgba(234,240,255,.3); font-size: 13px; }

/* Storm chart */
.storm-chart-wrap { margin-top: 14px; }

/* ══════════════════════════════════════════════════════
   Sync log table
   ══════════════════════════════════════════════════════ */
.sl-table { width: 100%; border-collapse: collapse; }
.sl-table th { font-size: 11px; letter-spacing: .08em; color: rgba(234,240,255,.45); font-weight: 700; padding: 10px 14px; border-bottom: 1px solid rgba(255,255,255,.06); text-align: left; white-space: nowrap; }
.sl-table td { padding: 12px 14px; border-bottom: 1px solid rgba(255,255,255,.04); font-size: 14px; }
.sl-table tr:hover td { background: rgba(255,255,255,.02); }
.sl-table a { color: rgba(99,179,237,.9); text-decoration: none; }
.sl-table a:hover { text-decoration: underline; }

.status-pill { padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; display: inline-block; }
.status-pill--ok      { background: rgba(34,197,94,.12);  color: rgba(34,197,94,.9);  border: 1px solid rgba(34,197,94,.2); }
.status-pill--error   { background: rgba(239,68,68,.12);  color: rgba(239,68,68,.9);  border: 1px solid rgba(239,68,68,.2); }
.status-pill--running { background: rgba(245,158,11,.12); color: rgba(245,158,11,.9); border: 1px solid rgba(245,158,11,.2); }

/* Filter bar */
.sl-filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; margin-bottom: 18px; }
.sl-filters select, .sl-filters input[type=date] {
  background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.10);
  border-radius: 10px; padding: 9px 12px; color: rgba(234,240,255,.9); font-size: 13px;
}
.sl-filters select:focus, .sl-filters input[type=date]:focus {
  outline: none; border-color: rgba(59,130,246,.35);
}
.sl-filter-btn {
  padding: 9px 18px; border-radius: 10px; background: rgba(59,130,246,.15);
  border: 1px solid rgba(59,130,246,.25); color: rgba(99,179,237,.95);
  font-weight: 700; font-size: 13px; cursor: pointer;
}
.sl-filter-btn:hover { background: rgba(59,130,246,.22); }

/* Pagination */
.sl-pagination { display: flex; gap: 8px; justify-content: center; margin-top: 20px; }
.sl-pagination a, .sl-pagination span {
  padding: 8px 14px; border-radius: 10px; font-size: 13px; font-weight: 700;
  border: 1px solid rgba(255,255,255,.08); background: rgba(255,255,255,.02);
  color: rgba(234,240,255,.7); text-decoration: none;
}
.sl-pagination a:hover { background: rgba(255,255,255,.05); color: #e2e8f0; }
.sl-pagination .current { background: rgba(59,130,246,.15); border-color: rgba(59,130,246,.3); color: rgba(99,179,237,.95); }

/* Sync log detail */
.sl-detail-grid { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 14px; align-items: start; }
@media (max-width: 900px) { .sl-detail-grid { grid-template-columns: 1fr; } }
.diff-toggle-btn { font-size:11px; padding:3px 10px; border-radius:4px; border:1px solid rgba(234,240,255,.2); cursor:pointer; background:transparent; color:rgba(234,240,255,.7); font-weight:600; }
.diff-toggle-btn--active { background:#f59e0b; color:#0a0a18; border-color:transparent; }
.sl-meta-row { display: flex; gap: 12px; padding: 10px 0; border-bottom: 1px solid rgba(255,255,255,.04); }
.sl-meta-label { font-size: 11px; font-weight: 700; color: rgba(234,240,255,.4); letter-spacing: .08em; text-transform: uppercase; width: 130px; flex-shrink: 0; }
.sl-meta-value { font-size: 14px; color: rgba(234,240,255,.88); }
.sl-json-pre { background: rgba(0,0,0,.25); border-radius: 12px; padding: 14px; font-size: 12px; font-family: 'JetBrains Mono', 'Fira Code', monospace; color: rgba(234,240,255,.8); overflow-x: auto; white-space: pre; border: 1px solid rgba(255,255,255,.06); max-height: 70vh; overflow-y: auto; }
.sl-copy-btn { margin-top: 10px; padding: 8px 14px; border-radius: 10px; border: 1px solid rgba(255,255,255,.10); background: rgba(255,255,255,.02); color: rgba(234,240,255,.7); font-size: 12px; font-weight: 700; cursor: pointer; }
.sl-copy-btn:hover { background: rgba(255,255,255,.05); }

/* Diff */
.diff-up   { color: rgba(34,197,94,.9); font-weight: 700; }
.diff-down { color: rgba(239,68,68,.9); font-weight: 700; }
.diff-same { color: rgba(234,240,255,.35); }
.diff-table { width: 100%; border-collapse: collapse; margin-top: 12px; }
.diff-table th { font-size: 11px; color: rgba(234,240,255,.4); font-weight: 700; padding: 8px 12px; border-bottom: 1px solid rgba(255,255,255,.06); text-align: left; }
.diff-table td { padding: 10px 12px; border-bottom: 1px solid rgba(255,255,255,.04); font-size: 14px; }
.diff-row-changed { background: rgba(245,158,11,.06); }
.diff-row-changed:hover { background: rgba(245,158,11,.12); }
.diff-row-same { opacity: .7; }

/* ══════════════════════════════════════════════════════
   Timeline swimlane
   ══════════════════════════════════════════════════════ */
.sl-timeline-wrap { overflow-x: auto; }
.sl-timeline-header { display: flex; position: relative; height: 22px; margin-bottom: 8px; border-bottom: 1px solid rgba(255,255,255,.06); }
.sl-timeline-xlabel { position: absolute; font-size: 10px; color: rgba(234,240,255,.4); transform: translateX(-50%); }
.sl-timeline-source { display: flex; align-items: center; gap: 12px; min-height: 40px; border-bottom: 1px solid rgba(255,255,255,.04); padding: 4px 0; }
.sl-timeline-name { width: 140px; flex-shrink: 0; font-size: 12px; font-weight: 700; color: rgba(234,240,255,.6); text-align: right; padding-right: 12px; }
.sl-timeline-track { flex: 1; position: relative; height: 32px; }
.sl-timeline-dot {
  position: absolute; width: 10px; height: 10px; border-radius: 50%;
  transform: translateX(-50%) translateY(-50%); top: 50%; cursor: pointer;
  transition: transform .15s;
}
.sl-timeline-dot:hover { transform: translateX(-50%) translateY(-50%) scale(1.6); z-index: 2; }
.sl-timeline-dot--diamond { border-radius: 2px; transform: translateX(-50%) translateY(-50%) rotate(45deg); width: 9px; height: 9px; }
.sl-timeline-dot--diamond:hover { transform: translateX(-50%) translateY(-50%) rotate(45deg) scale(1.6); }
.sl-timeline-dot[title]:hover::after {
  content: attr(title);
  position: absolute; bottom: 140%; left: 50%; transform: translateX(-50%);
  background: rgba(10,15,30,.95); border: 1px solid rgba(255,255,255,.12);
  border-radius: 8px; padding: 5px 10px; font-size: 11px; white-space: nowrap;
  color: rgba(234,240,255,.9); z-index: 10;
}

/* ══════════════════════════════════════════════════════
   Integrations page
   ══════════════════════════════════════════════════════ */
.webhook-card {
  padding: 16px; border-radius: 16px;
  border: 1px solid rgba(255,255,255,.08);
  background: rgba(255,255,255,.02);
  margin-bottom: 12px;
}
.webhook-card__name { font-weight: 800; font-size: 16px; margin-bottom: 4px; }
.webhook-card__url  { font-size: 12px; color: rgba(234,240,255,.45); margin-bottom: 10px; word-break: break-all; }
.webhook-card__actions { display: flex; gap: 8px; align-items: center; }

.field-inline { display: flex; gap: 10px; align-items: flex-start; flex-wrap: wrap; }
.field-inline label { display: flex; flex-direction: column; gap: 5px; font-size: 12px; font-weight: 700; color: rgba(234,240,255,.55); }
.field-inline input, .field-inline select {
  background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.10);
  border-radius: 10px; padding: 10px 14px; color: rgba(234,240,255,.9); font-size: 14px;
}
.field-inline input:focus, .field-inline select:focus { outline: none; border-color: rgba(59,130,246,.35); }
.field-inline input[type=text] { width: 220px; }
.field-inline input[type=url]  { width: 320px; }

.int-submit {
  padding: 10px 22px; border-radius: 12px;
  background: rgba(59,130,246,.9); border: 1px solid rgba(59,130,246,.5);
  color: #031427; font-weight: 800; font-size: 14px; cursor: pointer;
}
.int-submit:hover { filter: brightness(1.05); }
.int-delete {
  padding: 8px 14px; border-radius: 10px;
  background: rgba(239,68,68,.08); border: 1px solid rgba(239,68,68,.2);
  color: rgba(239,68,68,.9); font-weight: 700; font-size: 12px; cursor: pointer;
}
.int-delete:hover { background: rgba(239,68,68,.14); }

.digest-info { display: flex; gap: 12px; align-items: center; padding: 14px 0; }
.digest-send-btn {
  padding: 9px 18px; border-radius: 12px;
  background: rgba(34,197,94,.1); border: 1px solid rgba(34,197,94,.25);
  color: rgba(34,197,94,.9); font-weight: 700; font-size: 13px; cursor: pointer;
}
.digest-send-btn:hover { background: rgba(34,197,94,.16); }

/* Messages (Django) */
.al-messages { padding: 0 0 14px; }
.al-msg { padding: 10px 16px; border-radius: 12px; margin-bottom: 8px; font-size: 14px; font-weight: 600; }
.al-msg--success { background: rgba(34,197,94,.1); border: 1px solid rgba(34,197,94,.2); color: rgba(34,197,94,.9); }
.al-msg--error   { background: rgba(239,68,68,.1);  border: 1px solid rgba(239,68,68,.2);  color: rgba(239,68,68,.9); }

/* ── Alert card action row ─────────────────────────────── */
.alertcard__actions {
  display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px;
}
.alertcard__resolve--done {
  font-size: 12px; color: rgba(34,197,94,.6); padding: 6px 0; cursor: default;
}

/* Bulk checkbox label */
.bulk-check-label {
  position: absolute; top: 12px; left: 12px; z-index: 2; cursor: pointer;
}
.bulk-check-label input[type=checkbox] { width: 16px; height: 16px; cursor: pointer; accent-color: #3b82f6; }

/* Snooze / Assign menus positioning */
.snooze-wrap, .assign-wrap { position: relative; display: inline-block; }
.snooze-menu, .assign-menu {
  position: absolute; bottom: calc(100% + 6px); left: 0;
  background: rgba(14,18,36,.97); border: 1px solid rgba(255,255,255,.1);
  border-radius: 12px; padding: 6px; min-width: 130px; z-index: 60;
  box-shadow: 0 12px 40px rgba(0,0,0,.5);
}
.snooze-menu button, .assign-menu button {
  display: block; width: 100%; text-align: left;
  padding: 8px 12px; font-size: 13px; border-radius: 8px;
  background: none; border: none; color: rgba(234,240,255,.8); cursor: pointer;
}
.snooze-menu button:hover, .assign-menu button:hover { background: rgba(255,255,255,.06); color: #fff; }

/* Comments section */
.alertcard__comments {
  display: none; margin-top: 12px; padding-top: 12px;
  border-top: 1px solid rgba(255,255,255,.06);
}
.alertcard__comments.open { display: block; }

/* Comment count badge */
.comment-count {
  display: inline-block; background: rgba(59,130,246,.25); color: rgba(99,179,237,.95);
  border-radius: 999px; font-size: 11px; font-weight: 800;
  padding: 0 6px; margin-left: 4px; line-height: 18px; vertical-align: middle;
}

/* View toggle group */
.view-toggle-group { display: flex; gap: 4px; }

/* Export menu items */
.export-menu__item {
  display: flex; align-items: center; gap: 8px;
  padding: 9px 14px; border-radius: 8px; font-size: 13px;
  color: rgba(234,240,255,.8); text-decoration: none;
}
.export-menu__item:hover { background: rgba(255,255,255,.06); color: #fff; text-decoration: none; }
.export-menu__item svg { width: 14px; height: 14px; }

/* iconbtn active state */
.iconbtn.active {
  background: rgba(59,130,246,.15); border-color: rgba(59,130,246,.3);
  color: rgba(99,179,237,.95);
}

/* ══════════════════════════════════════════════════════════════
   INCIDENT MANAGEMENT
   ══════════════════════════════════════════════════════════════ */
.incident-badge { display:inline-flex;align-items:center;gap:4px;padding:3px 10px;border-radius:12px;font-size:11px;font-weight:700;letter-spacing:.04em;text-transform:uppercase; }
.incident-badge--open         { background:rgba(239,68,68,.15);  color:#f87171; border:1px solid rgba(239,68,68,.2); }
.incident-badge--investigating { background:rgba(245,158,11,.15); color:#fbbf24; border:1px solid rgba(245,158,11,.2); }
.incident-badge--resolved     { background:rgba(34,197,94,.15);  color:#4ade80; border:1px solid rgba(34,197,94,.2); }

.incident-card { background:rgba(255,255,255,.03);border:1px solid rgba(255,255,255,.07);border-radius:16px;padding:18px 20px;margin-bottom:12px;transition:border-color .2s; }
.incident-card:hover { border-color:rgba(255,255,255,.14); }
.incident-card__head { display:flex;align-items:center;gap:10px;margin-bottom:8px; }
.incident-card__title { font-size:15px;font-weight:700;color:rgba(234,240,255,.9);text-decoration:none;flex:1; }
.incident-card__title:hover { color:#fff;text-decoration:underline; }
.incident-card__meta { font-size:12px;color:rgba(234,240,255,.4);display:flex;gap:12px;flex-wrap:wrap; }

.incident-status-btns { display:flex;gap:8px;flex-wrap:wrap;margin-top:10px; }
.incident-status-btn { padding:7px 14px;border-radius:10px;font-size:12px;font-weight:700;cursor:pointer;border:1px solid rgba(255,255,255,.1);background:rgba(255,255,255,.04);color:rgba(234,240,255,.7); }
.incident-status-btn:hover { background:rgba(255,255,255,.08);color:#fff; }
.incident-status-btn--active { border-color:rgba(59,130,246,.4);background:rgba(59,130,246,.12);color:rgba(99,179,237,.95); }

/* ══════════════════════════════════════════════════════════════
   ALERT DETAIL PAGE
   ══════════════════════════════════════════════════════════════ */
.alert-detail-grid { display:grid;grid-template-columns:1fr 280px;gap:20px;align-items:start; }
@media(max-width:900px){ .alert-detail-grid{grid-template-columns:1fr;} }

.alert-detail-header { display:flex;align-items:flex-start;gap:16px;margin-bottom:20px;flex-wrap:wrap; }
.alert-detail-severity { width:52px;height:52px;border-radius:14px;display:grid;place-items:center;flex-shrink:0; }
.alert-detail-severity--critical { background:rgba(239,68,68,.15);border:1px solid rgba(239,68,68,.3); }
.alert-detail-severity--warning  { background:rgba(245,158,11,.15);border:1px solid rgba(245,158,11,.3); }
.alert-detail-severity--info     { background:rgba(59,130,246,.15);border:1px solid rgba(59,130,246,.3); }
.alert-detail-severity svg { width:24px;height:24px; }
.alert-detail-title { font-size:22px;font-weight:800;color:rgba(234,240,255,.95);line-height:1.2; }
.alert-detail-msg { font-size:14px;color:rgba(234,240,255,.65);line-height:1.6;padding:14px 0;border-bottom:1px solid rgba(255,255,255,.06); }
.alert-detail-meta-row { display:flex;gap:16px;flex-wrap:wrap;padding:12px 0;border-bottom:1px solid rgba(255,255,255,.06); }
.alert-detail-meta-item { font-size:12px;color:rgba(234,240,255,.5);display:flex;align-items:center;gap:5px; }
.alert-detail-meta-item strong { color:rgba(234,240,255,.8); }

.al-tag { display:inline-flex;align-items:center;gap:4px;padding:2px 8px;border-radius:10px;background:rgba(148,163,184,.12);border:1px solid rgba(148,163,184,.2);color:#94a3b8;font-size:12px; }
.al-tag-del { background:none;border:none;color:rgba(148,163,184,.6);cursor:pointer;padding:0;font-size:14px;line-height:1; }
.al-tag-del:hover { color:#ef4444; }
.al-tag-input { background:rgba(255,255,255,.04);border:1px dashed rgba(255,255,255,.15);border-radius:10px;padding:3px 10px;color:#e2e8f0;font-size:12px;width:100px;outline:none; }
.al-tag-input:focus { border-color:rgba(59,130,246,.4); }
.al-tags-wrap { display:flex;flex-wrap:wrap;gap:6px;align-items:center;padding:10px 0; }

/* ══════════════════════════════════════════════════════════════
   TIMELINE (incident events + alert history)
   ══════════════════════════════════════════════════════════════ */
.al-timeline { position:relative;padding-left:28px; }
.al-timeline::before { content:'';position:absolute;left:9px;top:0;bottom:0;width:2px;background:rgba(255,255,255,.06); }
.al-timeline-event { position:relative;margin-bottom:18px; }
.al-timeline-dot { position:absolute;left:-22px;top:5px;width:12px;height:12px;border-radius:50%;background:#334155;border:2px solid rgba(255,255,255,.1); }
.al-timeline-dot--created     { background:#60a5fa; }
.al-timeline-dot--resolved    { background:#4ade80; }
.al-timeline-dot--acknowledged{ background:#fbbf24; }
.al-timeline-dot--comment     { background:#a78bfa; }
.al-timeline-dot--status_change{ background:#fb923c; }
.al-timeline-dot--alert_linked { background:#22d3ee; }
.al-timeline-content { background:rgba(255,255,255,.03);border:1px solid rgba(255,255,255,.07);border-radius:10px;padding:10px 14px; }
.al-timeline-meta { font-size:11px;color:rgba(234,240,255,.35);margin-bottom:3px; }
.al-timeline-text { font-size:13px;color:rgba(234,240,255,.75); }

/* ══════════════════════════════════════════════════════════════
   ANALYTICS PAGE
   ══════════════════════════════════════════════════════════════ */
.analytics-grid { display:grid;grid-template-columns:1fr 1fr;gap:16px;margin-bottom:16px; }
@media(max-width:768px){ .analytics-grid{grid-template-columns:1fr;} }

.compare-kpi-grid { display:grid;grid-template-columns:repeat(auto-fit,minmax(140px,1fr));gap:12px;margin-top:16px; }
.compare-kpi { background:rgba(255,255,255,.03);border:1px solid rgba(255,255,255,.07);border-radius:14px;padding:16px;text-align:center; }
.compare-kpi__label { font-size:11px;font-weight:700;letter-spacing:.08em;text-transform:uppercase;color:rgba(234,240,255,.4);margin-bottom:6px; }
.compare-kpi__this  { font-size:28px;font-weight:900;color:rgba(234,240,255,.9);line-height:1; }
.compare-kpi__last  { font-size:12px;color:rgba(234,240,255,.35);margin-top:4px; }
.compare-kpi__delta { font-size:13px;font-weight:800;margin-top:4px; }
.al-kpi-delta-up    { color:#f87171; }
.al-kpi-delta-down  { color:#4ade80; }
.al-kpi-delta-neutral { color:#94a3b8; }
.compare-kpi__delta--good { color:#4ade80; }
.compare-kpi__delta--bad  { color:#f87171; }
.compare-kpi__delta--neutral { color:#94a3b8; }

/* ══════════════════════════════════════════════════════════════
   MAINTENANCE WINDOWS
   ══════════════════════════════════════════════════════════════ */
.mw-active-banner { background:rgba(34,197,94,.08);border:1px solid rgba(34,197,94,.2);border-radius:12px;padding:12px 18px;display:flex;align-items:center;gap:10px;margin-bottom:16px;font-size:14px;font-weight:600;color:rgba(34,197,94,.9); }
.mw-active-banner i { width:16px;height:16px; }

/* ══════════════════════════════════════════════════════════════
   API TOKENS PAGE
   ══════════════════════════════════════════════════════════════ */
.api-info-card { background:rgba(59,130,246,.06);border:1px solid rgba(59,130,246,.15);border-radius:16px;padding:20px;margin-bottom:16px; }
.api-info-card code { background:rgba(255,255,255,.06);padding:2px 8px;border-radius:6px;font-size:12px;color:#93c5fd; }
.api-endpoint { display:flex;align-items:center;gap:8px;padding:6px 0;border-bottom:1px solid rgba(255,255,255,.04);font-size:13px;color:rgba(234,240,255,.7); }
.api-method { padding:2px 8px;border-radius:6px;font-size:10px;font-weight:800;letter-spacing:.06em; }
.api-method--get  { background:rgba(34,197,94,.15);color:#4ade80; }
.api-method--post { background:rgba(59,130,246,.15);color:#60a5fa; }
.api-method--patch{ background:rgba(245,158,11,.15);color:#fbbf24; }

/* ══════════════════════════════════════════════════════════════
   INTEGRATION CONFIG CARDS
   ══════════════════════════════════════════════════════════════ */
.integration-card { background:rgba(255,255,255,.02);border:1px solid rgba(255,255,255,.08);border-radius:16px;padding:24px;margin-bottom:16px; }
.integration-card__head { display:flex;align-items:center;gap:12px;margin-bottom:20px; }
.integration-card__logo { width:40px;height:40px;border-radius:12px;display:grid;place-items:center;background:rgba(255,255,255,.06); }
.integration-card__logo svg { width:22px;height:22px; }
.integration-card__title { font-size:16px;font-weight:700;color:rgba(234,240,255,.9); }
.integration-card__status { margin-left:auto; }
.test-result { display:inline-block;margin-left:12px;font-size:13px;font-weight:600; }
.test-result--ok  { color:#4ade80; }
.test-result--err { color:#f87171; }

/* Notification bell badge */
.al-bell-wrap { position:relative;display:inline-flex; }
.al-bell-count { position:absolute;top:-4px;right:-4px;background:#ef4444;color:#fff;border-radius:50%;min-width:16px;height:16px;font-size:10px;font-weight:800;display:none;align-items:center;justify-content:center;padding:0 3px;line-height:1; }
.al-bell-count.visible { display:flex; }

/* Suppressed alert indicator */
.alertcard--suppressed { opacity:.4;border-style:dashed!important; }
.alertcard__suppressed-badge { position:absolute;top:8px;right:8px;font-size:10px;font-weight:700;letter-spacing:.08em;text-transform:uppercase;color:rgba(148,163,184,.7);background:rgba(148,163,184,.1);padding:2px 8px;border-radius:8px; }

/* Incident open banner (top of alerts panel) */
.incident-open-banner { display:flex;align-items:center;gap:10px;background:rgba(239,68,68,.08);border:1px solid rgba(239,68,68,.2);border-radius:12px;padding:12px 18px;margin-bottom:14px;font-size:13px;font-weight:600;color:rgba(239,68,68,.9);text-decoration:none; }
.incident-open-banner:hover { background:rgba(239,68,68,.12);color:#f87171;text-decoration:none; }
.incident-open-banner i { width:16px;height:16px;flex-shrink:0; }
