:root {
  --bg: #f4f5f7;
  --surface: #ffffff;
  --ink: #1a1d23;
  --muted: #6b7280;
  --line: #e5e7eb;
  --line-2: #d1d5db;
  --sidebar: #14091f;
  --sidebar-2: #1c0f2b;
  --sidebar-text: #c9bdd6;
  --sidebar-active: #ffffff;
  --brand: #541982;
  --brand-dark: #3d1160;
  --brand-soft: #f3eafb;
  --accent: #0f766e;
  --ok: #15803d;
  --ok-bg: #ecfdf3;
  --bad: #b91c1c;
  --bad-bg: #fef2f2;
  --amber: #b45309;
  --amber-bg: #fffbeb;
  --api: #1d4ed8;
  --api-bg: #eff6ff;
  --normal: #0f766e;
  --normal-bg: #f0fdfa;
  --sla: #be123c;
  --sla-bg: #fff1f2;
  --shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
  --radius: 10px;
  --font: "Poppins", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  font-size: 14px;
  line-height: 1.45;
  min-height: 100vh;
}

a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }

.app {
  display: grid;
  grid-template-columns: 248px 1fr;
  min-height: 100vh;
}

.sidebar {
  background: linear-gradient(180deg, #1a0b2e 0%, #0d0616 100%);
  color: var(--sidebar-text);
  padding: 1.1rem 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  position: sticky;
  top: 0;
  height: 100vh;
}

.brand {
  display: block;
  padding: 0.35rem 0.4rem 0.85rem;
  margin: 0;
  text-decoration: none;
  background: none;
  border: 0;
}
.brand__img {
  display: block;
  width: min(100%, 168px);
  height: auto;
  background: none;
  border: 0;
  box-shadow: none;
}
.brand:hover { text-decoration: none; }

.sidebar__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  margin-bottom: 0.75rem;
  padding-bottom: 0.25rem;
}
.sidebar-close {
  display: none;
  border: 0;
  background: transparent;
  color: #fff;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  cursor: pointer;
}
.sidebar-close:hover { background: rgba(255,255,255,0.08); }

.menu-toggle {
  display: none;
  border: 1px solid var(--line);
  background: #fff;
  width: 40px;
  height: 40px;
  border-radius: 8px;
  cursor: pointer;
  color: var(--ink);
  flex-shrink: 0;
}
.sidebar-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(10, 6, 16, 0.55);
  z-index: 40;
}
body.no-scroll { overflow: hidden; }

.nav-label {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #6b7280;
  padding: 0.85rem 0.7rem 0.35rem;
  font-weight: 600;
}

.nav { display: flex; flex-direction: column; gap: 0.2rem; }
.nav__link {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--sidebar-text);
  padding: 0.62rem 0.75rem;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 500;
  font-size: 0.9rem;
}
.nav__link i { width: 1.1rem; text-align: center; opacity: 0.85; }
.nav__link:hover {
  background: rgba(255,255,255,0.05);
  color: #fff;
  text-decoration: none;
}
.nav__link.is-active {
  background: rgba(84, 25, 130, 0.35);
  color: #fff;
  box-shadow: inset 3px 0 0 #a855f7;
}

.sidebar__footer {
  margin-top: auto;
  padding: 0.85rem 0.55rem 0.35rem;
  border-top: 1px solid rgba(255,255,255,0.06);
  display: grid;
  gap: 0.65rem;
}
.user-chip {
  display: flex;
  gap: 0.65rem;
  align-items: center;
}
.user-chip__avatar {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: #2a313c;
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 600;
  font-size: 0.85rem;
}
.user-chip strong { display: block; color: #fff; font-size: 0.85rem; }
.user-chip span { font-size: 0.72rem; color: #8b939e; }
.logout-link {
  color: #9ca3af;
  font-size: 0.82rem;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}
.logout-link:hover { color: #fff; }

.workspace { min-width: 0; display: flex; flex-direction: column; }
.topbar {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  padding: 0.7rem 1.35rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  position: sticky;
  top: 0;
  z-index: 20;
}
.topbar__search {
  flex: 1;
  max-width: 420px;
  display: flex;
  align-items: center;
  gap: 0.55rem;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.45rem 0.75rem;
}
.topbar__search i { color: var(--muted); font-size: 0.85rem; }
.topbar__search input {
  border: 0;
  background: transparent;
  width: 100%;
  font: inherit;
  outline: none;
}
.topbar__meta { color: var(--muted); font-size: 0.82rem; }
.topbar__time i { margin-right: 0.3rem; }

.main { padding: 1.25rem 1.35rem 2rem; }

.page-head { margin-bottom: 1.1rem; }
.page-head--row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.page-head h1 {
  margin: 0;
  font-size: 1.45rem;
  font-weight: 650;
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.page-head h1 i { color: var(--brand); font-size: 1.1rem; }
.page-head p { margin: 0.3rem 0 0; color: var(--muted); }
.eyebrow { margin: 0 0 0.35rem !important; font-size: 0.85rem; }
.eyebrow a { color: var(--muted); }
.meta-line { display: flex; flex-wrap: wrap; align-items: center; gap: 0.45rem; }
.page-actions { display: flex; gap: 0.5rem; }

.metric-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.85rem;
  margin-bottom: 1rem;
}
.metric {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.95rem 1rem;
  display: flex;
  gap: 0.85rem;
  align-items: center;
  box-shadow: var(--shadow);
}
.metric__icon {
  width: 40px;
  height: 40px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  background: var(--brand-soft);
  color: var(--brand);
}
.metric__icon--amber { background: var(--amber-bg); color: var(--amber); }
.metric__icon--green { background: var(--ok-bg); color: var(--ok); }
.metric__icon--red { background: var(--bad-bg); color: var(--bad); }
.metric span { display: block; color: var(--muted); font-size: 0.78rem; font-weight: 500; }
.metric strong { font-size: 1.35rem; font-weight: 650; letter-spacing: -0.02em; }

.channel-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem;
  margin-bottom: 1rem;
}
.channel-card {
  display: block;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.05rem 1.15rem;
  text-decoration: none;
  color: inherit;
  box-shadow: var(--shadow);
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.channel-card:hover {
  text-decoration: none;
  border-color: var(--line-2);
  transform: translateY(-1px);
}
.channel-card--normal:hover { border-color: #99f6e4; }
.channel-card--api:hover { border-color: #bfdbfe; }
.channel-card__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.85rem;
  color: var(--muted);
}
.channel-card__stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}
.channel-card__stats em {
  display: block;
  font-style: normal;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 500;
}
.channel-card__stats b {
  font-size: 1.35rem;
  font-weight: 650;
  letter-spacing: -0.02em;
}
.channel-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
}

.channel-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.28rem 0.55rem;
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: 600;
}
.channel-tag--sm { font-size: 0.72rem; padding: 0.2rem 0.45rem; }
.channel-tag--normal { background: var(--normal-bg); color: var(--normal); }
.channel-tag--api { background: var(--api-bg); color: var(--api); }

.channel-tabs {
  display: inline-flex;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}
.channel-tabs a {
  padding: 0.45rem 0.85rem;
  color: var(--muted);
  font-weight: 500;
  font-size: 0.82rem;
  text-decoration: none;
  border-right: 1px solid var(--line);
}
.channel-tabs a:last-child { border-right: 0; }
.channel-tabs a.is-active {
  background: var(--ink);
  color: #fff;
}

.split-panels {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem;
}

.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.95rem 1rem 1.05rem;
  box-shadow: var(--shadow);
  margin-bottom: 0.85rem;
}
.panel--flush { padding-bottom: 0.5rem; }
.panel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
  gap: 0.5rem;
}
.panel__head h2 {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.45rem;
}
.panel__head h2 i { color: var(--muted); font-size: 0.85rem; }
.link-more {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 500;
  text-decoration: none;
}
.link-more:hover { color: var(--brand); }

.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; }
.table th, .table td {
  padding: 0.7rem 0.55rem;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
}
.table th {
  color: var(--muted);
  font-weight: 600;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.table--dense th, .table--dense td { padding: 0.62rem 0.5rem; }
.lead-link {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  color: inherit;
  text-decoration: none;
}
.lead-link:hover strong { color: var(--brand); text-decoration: underline; }
.lead-link strong { font-weight: 600; font-size: 0.9rem; }
.lead-link small { color: var(--muted); font-size: 0.72rem; }
.phone-link {
  color: var(--ink);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-weight: 500;
}
.phone-link i { color: var(--muted); font-size: 0.75rem; }
.empty { color: var(--muted); text-align: center !important; padding: 1.5rem !important; }

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.85rem;
  align-items: center;
}
.filters__search {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.45rem 0.65rem;
  min-width: 210px;
}
.filters__search i { color: var(--muted); font-size: 0.8rem; }
.filters__search input {
  border: 0;
  outline: none;
  font: inherit;
  background: transparent;
  width: 100%;
}
.insight-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 1rem 1.1rem 1.05rem;
  margin-bottom: 1rem;
  box-shadow: var(--shadow);
}
.insight-card__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 0.95rem;
}
.insight-card__title {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.insight-card__icon {
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: var(--brand-soft);
  color: var(--brand);
  flex-shrink: 0;
}
.insight-card__title h2 {
  margin: 0;
  font-size: 1rem;
  font-weight: 650;
  letter-spacing: -0.01em;
}
.insight-card__title p {
  margin: 0.15rem 0 0;
  font-size: 0.8rem;
  color: var(--muted);
}

.period-seg {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0;
  padding: 0.2rem;
  background: #f3f4f6;
  border-radius: 10px;
  border: 1px solid #e5e7eb;
}
.period-seg a {
  display: inline-flex;
  align-items: center;
  padding: 0.4rem 0.7rem;
  border-radius: 8px;
  color: #4b5563;
  text-decoration: none;
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1;
  transition: background .15s, color .15s, box-shadow .15s;
}
.period-seg a:hover { color: var(--brand); background: rgba(255,255,255,.7); }
.period-seg a.is-active {
  background: #fff;
  color: var(--brand);
  box-shadow: 0 1px 2px rgba(17,24,39,.08);
}

.insight-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.65rem;
  margin-bottom: 0.85rem;
}
.insight-metric {
  background: linear-gradient(180deg, #faf8fc 0%, #f5f0fa 100%);
  border: 1px solid #eadff5;
  border-radius: 12px;
  padding: 0.75rem 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  position: relative;
}
.insight-metric span {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.insight-metric strong {
  font-size: 1.55rem;
  font-weight: 750;
  color: var(--brand);
  line-height: 1.1;
  letter-spacing: -0.02em;
}
.insight-metric em {
  font-style: normal;
  font-size: 0.75rem;
  color: var(--muted);
  font-weight: 600;
}
.insight-metric--n {
  background: linear-gradient(180deg, #f7fffc 0%, #eefaf6 100%);
  border-color: #ccebe3;
}
.insight-metric--n strong { color: var(--normal); }
.insight-metric--a {
  background: linear-gradient(180deg, #f8fbff 0%, #eef4ff 100%);
  border-color: #d4e3fb;
}
.insight-metric--a strong { color: var(--api); }

.insight-empty {
  margin: 0;
  padding: 1rem;
  text-align: center;
  color: var(--muted);
  font-size: 0.9rem;
  background: #f9fafb;
  border-radius: 10px;
  border: 1px dashed var(--line);
}
.insight-empty i { margin-right: 0.35rem; }

.insight-days {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  max-height: 320px;
  overflow-y: auto;
  padding-right: 0.15rem;
}
.insight-days__head {
  display: grid;
  grid-template-columns: 7.5rem 1fr 5.2rem;
  gap: 0.75rem;
  padding: 0 0.55rem 0.35rem;
  font-size: 0.68rem;
  font-weight: 650;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.insight-day {
  display: grid;
  grid-template-columns: 7.5rem 1fr 5.2rem;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 0.7rem;
  border-radius: 11px;
  border: 1px solid transparent;
  background: #fafafa;
  text-decoration: none;
  color: inherit;
  transition: background .15s, border-color .15s, transform .15s;
}
.insight-day:hover {
  background: #fff;
  border-color: #e5d4f3;
  transform: translateY(-1px);
}
.insight-day.is-active {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}
.insight-day__date {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  min-width: 0;
}
.insight-day__date strong {
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.insight-day__date small {
  font-size: 0.72rem;
  color: var(--muted);
}
.insight-day.is-active .insight-day__date small { color: rgba(255,255,255,.78); }

.insight-day__track {
  height: 10px;
  border-radius: 999px;
  background: rgba(84, 25, 130, 0.1);
  overflow: hidden;
}
.insight-day__fill {
  display: flex;
  height: 100%;
  border-radius: inherit;
  overflow: hidden;
  min-width: 6%;
}
.insight-day__fill i,
.insight-day__fill b {
  display: block;
  height: 100%;
  font-style: normal;
}
.insight-day__fill i { background: var(--normal); }
.insight-day__fill b { background: var(--api); }
.insight-day.is-active .insight-day__track { background: rgba(255,255,255,.22); }
.insight-day.is-active .insight-day__fill i { background: #a7f3d0; }
.insight-day.is-active .insight-day__fill b { background: #bfdbfe; }

.insight-day__count {
  text-align: right;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  align-items: flex-end;
}
.insight-day__count strong {
  font-size: 1.1rem;
  font-weight: 750;
  color: var(--brand);
  line-height: 1;
}
.insight-day.is-active .insight-day__count strong { color: #fff; }
.insight-day__count small {
  display: flex;
  gap: 0.3rem;
}
.pill-n,
.pill-a {
  font-size: 0.65rem;
  font-weight: 700;
  padding: 0.12rem 0.35rem;
  border-radius: 999px;
  line-height: 1.2;
}
.pill-n { background: var(--normal-bg); color: var(--normal); }
.pill-a { background: var(--api-bg); color: var(--api); }
.insight-day.is-active .pill-n,
.insight-day.is-active .pill-a {
  background: rgba(255,255,255,.18);
  color: #fff;
}

@media (max-width: 900px) {
  .insight-metrics { grid-template-columns: 1fr; }
  .insight-days__head { display: none; }
  .insight-day {
    grid-template-columns: 1fr auto;
    grid-template-areas:
      "date count"
      "bar bar";
    gap: 0.45rem 0.75rem;
  }
  .insight-day__date { grid-area: date; }
  .insight-day__count { grid-area: count; }
  .insight-day__track { grid-area: bar; }
  .period-seg { width: 100%; }
  .period-seg a { flex: 1 1 auto; justify-content: center; }
}

.filters__date {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  font-size: 0.72rem;
  color: var(--muted);
  font-weight: 500;
}
.filters__date input[type="date"] {
  min-width: 9.5rem;
  font-size: 0.88rem;
  color: var(--ink);
}
.filters select,
.filters input[type="date"],
.field input, .field select, .field textarea,
.stack select, .stack textarea, .form-grid input, .form-grid select {
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 8px;
  padding: 0.5rem 0.65rem;
  font: inherit;
  color: var(--ink);
}
.field { display: grid; gap: 0.3rem; }
.field span { font-size: 0.78rem; color: var(--muted); font-weight: 500; }
.input-icon {
  position: relative;
}
.input-icon i {
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  font-size: 0.85rem;
}
.input-icon input {
  width: 100%;
  padding-left: 2.2rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  border: 0;
  border-radius: 8px;
  padding: 0.52rem 0.9rem;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
}
.btn--primary { background: var(--brand); color: #fff; }
.btn--primary:hover { background: var(--brand-dark); text-decoration: none; }
.btn--accent { background: var(--accent); color: #fff; }
.btn--ghost {
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--line);
}
.btn--ghost:hover { background: var(--bg); text-decoration: none; }
.btn--sm { padding: 0.3rem 0.55rem; font-size: 0.78rem; }
.btn--block { width: 100%; }

.badge {
  display: inline-block;
  padding: 0.18rem 0.48rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
  background: #f3f4f6;
  color: #374151;
}
.badge--yeni { background: #f3f4f6; color: #374151; }
.badge--atanmis { background: #ecfeff; color: #0e7490; }
.badge--araniyor { background: var(--amber-bg); color: var(--amber); }
.badge--basarili { background: var(--ok-bg); color: var(--ok); }
.badge--basarisiz, .badge--iptal { background: var(--bad-bg); color: var(--bad); }
.badge--retry_bekliyor { background: #fef3c7; color: #92400e; }

.api-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--muted);
}
.api-pill--ok { color: var(--ok); }
.api-pill--bad { color: var(--bad); }

.alert {
  padding: 0.7rem 0.9rem;
  border-radius: 8px;
  margin-bottom: 0.9rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 500;
  font-size: 0.88rem;
}
.alert--ok { background: var(--ok-bg); color: var(--ok); }
.alert--err { background: var(--bad-bg); color: var(--bad); }

.detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem;
}
.detail-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.kv {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 0.5rem 0.75rem;
  margin: 0;
}
.kv dt { color: var(--muted); font-size: 0.82rem; }
.kv dd { margin: 0; font-weight: 500; }
.wrap { word-break: break-word; }
.muted { color: var(--muted); }
.stack { display: grid; gap: 0.65rem; }
.stack.narrow { max-width: 520px; }
.form-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.65rem;
  align-items: end;
}
.timeline {
  list-style: none;
  padding: 0;
  margin: 0.85rem 0 0;
  display: grid;
  gap: 0.55rem;
}
.timeline li {
  padding: 0.65rem 0.75rem;
  background: var(--bg);
  border-radius: 8px;
  border: 1px solid var(--line);
}
.timeline__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.65rem;
  align-items: baseline;
  margin-bottom: 0.2rem;
}
.timeline__meta strong { font-size: 0.85rem; }
.timeline__meta span, .timeline time { color: var(--muted); font-size: 0.75rem; }
.timeline p { margin: 0.25rem 0 0; }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 0.85rem; }
.pager {
  display: flex;
  gap: 0.3rem;
  flex-wrap: wrap;
  padding: 0.75rem 0.25rem;
}
.pager a {
  min-width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--ink);
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 500;
}
.pager a.is-active {
  background: var(--ink);
  color: #fff;
  border-color: var(--ink);
}

.login-body {
  min-height: 100vh;
  margin: 0;
  background: #f4f5f7;
}
.login-layout {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
}
.login-hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(155deg, #1a0b2e 0%, #541982 48%, #2a0f45 100%);
  color: #fff;
  padding: clamp(1.5rem, 4vw, 3rem);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 2rem;
}
.login-hero__glow {
  position: absolute;
  width: 420px;
  height: 420px;
  right: -120px;
  top: -80px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,0.18), transparent 65%);
  pointer-events: none;
}
.login-hero__logo {
  position: relative;
  z-index: 1;
  width: min(280px, 70%);
  height: auto;
  background: none;
  display: block;
}
.login-hero__copy {
  position: relative;
  z-index: 1;
  max-width: 440px;
}
.login-hero__copy h2 {
  margin: 0 0 1.1rem;
  font-size: clamp(1.45rem, 2.4vw, 2rem);
  line-height: 1.25;
  font-weight: 650;
  letter-spacing: -0.02em;
}
.login-hero__copy ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.7rem;
}
.login-hero__copy li {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 0.95rem;
  color: rgba(255,255,255,0.9);
}
.login-hero__copy i {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(255,255,255,0.15);
  display: grid;
  place-items: center;
  font-size: 0.7rem;
}
.login-panel {
  display: grid;
  place-items: center;
  padding: clamp(1.25rem, 4vw, 2.5rem);
  background:
    radial-gradient(circle at 100% 0%, rgba(84, 25, 130, 0.08), transparent 40%),
    #f7f5fa;
}
.login-panel__inner {
  width: min(420px, 100%);
  background: #fff;
  border: 1px solid #e8e4ef;
  border-radius: 18px;
  padding: clamp(1.25rem, 3vw, 1.85rem);
  box-shadow: 0 18px 50px rgba(28, 16, 48, 0.08);
}
.login-panel__logo {
  display: block;
  width: min(220px, 80%);
  height: auto;
  margin: 0 auto 1.1rem;
  background: none;
}
.login-panel h1 {
  margin: 0;
  text-align: center;
  font-size: 1.35rem;
  font-weight: 650;
  letter-spacing: -0.02em;
}
.login-panel__lead {
  margin: 0.35rem 0 1.2rem;
  text-align: center;
  color: var(--muted);
  font-size: 0.9rem;
}
.login-form { display: grid; gap: 0.85rem; }
.btn--lg {
  padding: 0.75rem 1rem;
  font-size: 0.95rem;
  margin-top: 0.25rem;
}
.login-foot {
  margin: 1.15rem 0 0;
  text-align: center;
  color: #9ca3af;
  font-size: 0.75rem;
}

.metric-row--6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.metric small { display: block; color: var(--muted); font-size: 0.72rem; margin-top: 0.15rem; font-weight: 500; }
.metric__icon--teal { background: var(--normal-bg); color: var(--normal); }
.metric__icon--blue { background: var(--api-bg); color: var(--api); }

.topbar__meta { display: flex; align-items: center; gap: 0.75rem; }
.topbar__chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  background: var(--brand-soft);
  color: var(--brand);
  font-size: 0.78rem;
  font-weight: 600;
  text-decoration: none;
}
.topbar__chip:hover { filter: brightness(0.97); text-decoration: none; }

.notify-btn {
  position: relative;
  border: 1px solid var(--line);
  background: #fff;
  width: 38px;
  height: 38px;
  border-radius: 8px;
  cursor: pointer;
  color: var(--ink);
}
.notify-btn em {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 18px;
  height: 18px;
  border-radius: 99px;
  background: var(--brand);
  color: #fff;
  font-style: normal;
  font-size: 0.65rem;
  font-weight: 700;
  display: grid;
  place-items: center;
  padding: 0 4px;
}

.row-sla { background: #fff1f2 !important; }
.row-sla td { border-bottom-color: #fecdd3 !important; }
.sla-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  background: var(--sla-bg);
  color: var(--sla);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.18rem 0.45rem;
  border-radius: 6px;
}
.dup-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  background: #fef3c7;
  color: #92400e;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.18rem 0.45rem;
  border-radius: 6px;
}
.bulk-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  padding: 0.7rem 0.85rem;
  background: #faf5ff;
  border: 1px solid #e9d5ff;
  border-radius: 10px;
  margin-bottom: 0.75rem;
}
.bulk-bar[hidden] { display: none !important; }
.dup-box {
  background: #fffbeb;
  border: 1px solid #fcd34d;
  border-radius: 10px;
  padding: 0.85rem 1rem;
  margin-bottom: 0.85rem;
}
.dup-box a { font-weight: 600; }

.chart-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem;
  margin-bottom: 1rem;
}
.chart-panel { margin-bottom: 0; }
.chart-panel--wide { grid-column: 1 / -1; }
.chart-box { position: relative; height: 260px; }
.chart-box--sm { height: 220px; }
.legend-inline { display: flex; gap: 0.75rem; font-size: 0.75rem; font-weight: 600; }
.lg::before {
  content: "";
  display: inline-block;
  width: 8px; height: 8px;
  border-radius: 99px;
  margin-right: 0.35rem;
}
.lg--normal::before { background: #0f766e; }
.lg--api::before { background: #1d4ed8; }

.tri-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.85rem;
}
.mini-list, .activity { display: grid; gap: 0.45rem; }
.mini-item, .activity__item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  padding: 0.65rem 0.7rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg);
  text-decoration: none;
  color: inherit;
}
.mini-item:hover, .activity__item:hover {
  border-color: var(--line-2);
  text-decoration: none;
}
.mini-item strong, .activity__item strong {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
}
.mini-item small, .activity__item small {
  color: var(--muted);
  font-size: 0.72rem;
}
.activity__item { justify-content: flex-start; }
.activity__icon {
  width: 32px; height: 32px;
  border-radius: 8px;
  background: #fff;
  border: 1px solid var(--line);
  display: grid;
  place-items: center;
  color: var(--muted);
  flex-shrink: 0;
}

.bar {
  position: relative;
  height: 22px;
  background: var(--bg);
  border-radius: 6px;
  overflow: hidden;
  min-width: 90px;
}
.bar span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #16a34a, #22c55e);
}
.bar em {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-style: normal;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--ink);
}
.panel__foot { margin-top: 0.75rem; padding-top: 0.65rem; border-top: 1px solid var(--line); }

@media (max-width: 1200px) {
  .metric-row--6 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .chart-grid { grid-template-columns: 1fr 1fr; }
  .chart-panel--wide { grid-column: 1 / -1; }
  .tri-grid { grid-template-columns: 1fr; }
}
@media (max-width: 1100px) {
  .metric-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .channel-grid, .split-panels, .detail-grid, .split, .form-grid, .detail-grid--3 {
    grid-template-columns: 1fr;
  }
  .chart-grid { grid-template-columns: 1fr; }
}
@media (max-width: 960px) {
  .app { grid-template-columns: 1fr; }
  .menu-toggle { display: inline-grid; place-items: center; }
  .sidebar-close { display: inline-grid; place-items: center; }
  .sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: min(300px, 86vw);
    height: 100vh;
    z-index: 50;
    transform: translateX(-105%);
    transition: transform 0.22s ease;
    overflow-y: auto;
  }
  .app.sidebar-open .sidebar { transform: translateX(0); }
  .topbar {
    padding: 0.65rem 0.85rem;
    gap: 0.55rem;
  }
  .topbar__search { max-width: none; flex: 1; }
  .topbar__time,
  .topbar__chip { display: none; }
  .main { padding: 1rem 0.85rem 1.75rem; }
  .page-head--row { flex-direction: column; align-items: stretch; }
  .page-actions { width: 100%; }
  .channel-tabs { width: 100%; overflow-x: auto; }
  .filters { flex-direction: column; align-items: stretch; }
  .filters__search,
  .filters select,
  .filters input,
  .filters .btn { width: 100%; }
  .bulk-bar { flex-direction: column; align-items: stretch; }
  .metric-row--6 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .form-grid { grid-template-columns: 1fr; }
  .login-layout { grid-template-columns: 1fr; }
  .login-hero {
    min-height: 210px;
    padding: 1.25rem 1.25rem 1.5rem;
  }
  .login-hero__copy h2 { font-size: 1.25rem; }
  .login-hero__copy ul { display: none; }
}
@media (max-width: 560px) {
  .metric-row,
  .metric-row--6 { grid-template-columns: 1fr; }
  .notify-btn { width: 36px; height: 36px; }
  .login-panel__inner { padding: 1.1rem; border-radius: 14px; }
  .table { font-size: 0.82rem; }
}
