/*!*************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
  !*** css ../../node_modules/.bun/next@15.5.25+1c1ee8e462507872/node_modules/next/dist/build/webpack/loaders/css-loader/src/index.js??ruleSet[1].rules[14].oneOf[10].use[2]!../../node_modules/.bun/next@15.5.25+1c1ee8e462507872/node_modules/next/dist/build/webpack/loaders/postcss-loader/src/index.js??ruleSet[1].rules[14].oneOf[10].use[3]!./src/app/globals.css ***!
  \*************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
/* ============================================================
   IG Manager — Design System
   Tokens -> primitives -> components. Panel is dark-only by
   design (ops dashboard, mostly used on large screens).
   ============================================================ */

:root {
  /* --- surfaces: cool near-black ramp, each step ~4% lighter --- */
  --bg: #08090d;
  --bg-grad: radial-gradient(1200px 600px at 20% -10%, #141826 0%, transparent 60%);
  --surface: #0e1017;
  --surface-2: #14171f;
  --surface-3: #1b1f29;
  --sidebar: #0b0d13;

  /* --- borders --- */
  --border: #1e222d;
  --border-strong: #2a2f3d;

  /* --- text --- */
  --text: #e8eaf0;
  --text-2: #b4bac7;
  --muted: #7b8496;
  --faint: #545c6d;

  /* --- brand + semantic --- */
  --accent: #6c8cff;
  --accent-hover: #7f9bff;
  --accent-soft: rgba(108, 140, 255, 0.14);
  --accent-ring: rgba(108, 140, 255, 0.35);
  --on-accent: #070a16;

  --ok: #3ecf8e;
  --ok-soft: rgba(62, 207, 142, 0.13);
  --warn: #f5b849;
  --warn-soft: rgba(245, 184, 73, 0.13);
  --danger: #ff6b6b;
  --danger-soft: rgba(255, 107, 107, 0.13);
  --info: #5ec8f5;
  --info-soft: rgba(94, 200, 245, 0.13);

  /* --- shape + depth --- */
  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 14px;
  --r-xl: 18px;
  --r-full: 999px;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 4px 16px -4px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 16px 48px -12px rgba(0, 0, 0, 0.65);

  --sidebar-w: 248px;
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
}

* {
  box-sizing: border-box;
}

html,
body {
  padding: 0;
  margin: 0;
}

body {
  background: var(--bg);
  background-image: var(--bg-grad);
  background-attachment: fixed;
  color: var(--text);
  font-family: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a {
  color: inherit;
  text-decoration: none;
}

h1, h2, h3, h4 {
  margin: 0;
  font-weight: 650;
  letter-spacing: -0.02em;
}

/* numbers should line up in tables and stat tiles */
.tnum {
  font-feature-settings: "tnum";
  font-variant-numeric: tabular-nums;
}

::selection {
  background: var(--accent-ring);
  color: #fff;
}

:focus-visible {
  outline: 2px solid var(--accent-ring);
  outline-offset: 2px;
  border-radius: var(--r-sm);
}

/* --- scrollbars --- */
* {
  scrollbar-width: thin;
  scrollbar-color: var(--border-strong) transparent;
}
*::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}
*::-webkit-scrollbar-track {
  background: transparent;
}
*::-webkit-scrollbar-thumb {
  background: var(--border-strong);
  border-radius: var(--r-full);
  border: 2px solid transparent;
  background-clip: content-box;
}
*::-webkit-scrollbar-thumb:hover {
  background: var(--faint);
  background-clip: content-box;
}

/* ============================================================
   Layout shell
   ============================================================ */

.shell {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: var(--sidebar-w);
  flex-shrink: 0;
  background: var(--sidebar);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: -webkit-sticky;
  position: sticky;
  top: 0;
  height: 100vh;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 18px 18px 16px;
  border-bottom: 1px solid var(--border);
}

.brand-mark {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  background: linear-gradient(140deg, var(--accent) 0%, #9d6cff 100%);
  color: #fff;
  flex-shrink: 0;
  box-shadow: 0 2px 10px -2px var(--accent-ring);
}

.brand-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.brand-name {
  font-weight: 650;
  font-size: 14px;
  letter-spacing: -0.01em;
  line-height: 1.2;
}
.brand-sub {
  font-size: 11px;
  color: var(--faint);
  line-height: 1.3;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 14px 12px;
  overflow-y: auto;
  flex: 1 1;
}

.nav-section {
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--faint);
  padding: 14px 10px 6px;
}
.nav-section:first-child {
  padding-top: 2px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: var(--r-md);
  color: var(--text-2);
  font-size: 13.5px;
  font-weight: 500;
  position: relative;
  transition: background 0.14s var(--ease), color 0.14s var(--ease);
}

.nav-item:hover {
  background: var(--surface-2);
  color: var(--text);
}

.nav-item svg {
  flex-shrink: 0;
  opacity: 0.75;
  transition: opacity 0.14s var(--ease);
}
.nav-item:hover svg {
  opacity: 1;
}

.nav-item[data-active="true"] {
  background: var(--accent-soft);
  color: #cdd8ff;
  font-weight: 600;
}
.nav-item[data-active="true"] svg {
  opacity: 1;
  color: var(--accent);
}
.nav-item[data-active="true"]::before {
  content: "";
  position: absolute;
  left: -12px;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 18px;
  border-radius: 0 3px 3px 0;
  background: var(--accent);
}

.nav-count {
  margin-left: auto;
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  background: var(--surface-3);
  padding: 1px 7px;
  border-radius: var(--r-full);
}

.sidebar-footer {
  padding: 12px;
  border-top: 1px solid var(--border);
}

.user-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 4px 10px;
}
.user-avatar {
  width: 28px;
  height: 28px;
  border-radius: var(--r-full);
  background: var(--surface-3);
  border: 1px solid var(--border-strong);
  display: grid;
  place-items: center;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-2);
  flex-shrink: 0;
}
.user-meta {
  min-width: 0;
  line-height: 1.25;
}
.user-name {
  font-size: 12.5px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.user-role {
  font-size: 11px;
  color: var(--faint);
}

.main {
  flex: 1 1;
  min-width: 0;
  padding: 28px 32px 64px;
  max-width: 1500px;
}

/* ============================================================
   Page header
   ============================================================ */

.page-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 22px;
}

.page-title {
  font-size: 22px;
  line-height: 1.25;
}

.page-sub {
  color: var(--muted);
  font-size: 13px;
  margin-top: 5px;
  max-width: 68ch;
}

.page-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12.5px;
  color: var(--muted);
  margin-bottom: 10px;
  transition: color 0.14s var(--ease);
}
.back-link:hover {
  color: var(--text);
}

/* ============================================================
   Cards
   ============================================================ */

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 18px;
  box-shadow: var(--shadow-sm);
}

.card-pad-0 {
  padding: 0;
  overflow: hidden;
}

.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.card-title {
  font-size: 13.5px;
  font-weight: 650;
  letter-spacing: -0.01em;
}

.card-note {
  font-size: 12px;
  color: var(--faint);
}

/* interactive card (links) */
.card-link {
  display: block;
  transition: border-color 0.16s var(--ease), transform 0.16s var(--ease),
    box-shadow 0.16s var(--ease);
}
.card-link:hover {
  border-color: var(--border-strong);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.grid {
  display: grid;
  grid-gap: 16px;
  gap: 16px;
}
.grid-cards {
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
}
.stack {
  display: grid;
  grid-gap: 16px;
  gap: 16px;
}
.stack-sm {
  display: grid;
  grid-gap: 10px;
  gap: 10px;
}

/* ============================================================
   Stat tiles
   ============================================================ */

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  grid-gap: 12px;
  gap: 12px;
}

.stat {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.stat-label {
  font-size: 11.5px;
  font-weight: 550;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 6px;
}

.stat-value {
  font-size: 26px;
  font-weight: 680;
  letter-spacing: -0.03em;
  line-height: 1.1;
  font-feature-settings: "tnum";
  font-variant-numeric: tabular-nums;
}

.stat-foot {
  font-size: 11.5px;
  color: var(--faint);
}

.dot {
  width: 7px;
  height: 7px;
  border-radius: var(--r-full);
  flex-shrink: 0;
  display: inline-block;
}
.dot-ok { background: var(--ok); box-shadow: 0 0 0 3px var(--ok-soft); }
.dot-warn { background: var(--warn); box-shadow: 0 0 0 3px var(--warn-soft); }
.dot-danger { background: var(--danger); box-shadow: 0 0 0 3px var(--danger-soft); }
.dot-muted { background: var(--faint); box-shadow: 0 0 0 3px rgba(84, 92, 109, 0.15); }
.dot-accent { background: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }

/* ============================================================
   Badges
   ============================================================ */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 9px;
  border-radius: var(--r-full);
  font-size: 11.5px;
  font-weight: 600;
  line-height: 1.5;
  white-space: nowrap;
  border: 1px solid transparent;
}

.badge-ok,
.badge-active {
  background: var(--ok-soft);
  color: var(--ok);
  border-color: rgba(62, 207, 142, 0.22);
}
.badge-warn,
.badge-token_expired {
  background: var(--warn-soft);
  color: var(--warn);
  border-color: rgba(245, 184, 73, 0.22);
}
.badge-danger,
.badge-disconnected,
.badge-error {
  background: var(--danger-soft);
  color: var(--danger);
  border-color: rgba(255, 107, 107, 0.22);
}
.badge-accent {
  background: var(--accent-soft);
  color: #9db1ff;
  border-color: rgba(108, 140, 255, 0.24);
}
.badge-info {
  background: var(--info-soft);
  color: var(--info);
  border-color: rgba(94, 200, 245, 0.22);
}
.badge-muted {
  background: var(--surface-3);
  color: var(--muted);
  border-color: var(--border);
}

/* ============================================================
   Buttons
   ============================================================ */

button,
.btn {
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.4;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 8px 14px;
  border-radius: var(--r-md);
  border: 1px solid transparent;
  background: var(--accent);
  color: var(--on-accent);
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.14s var(--ease), border-color 0.14s var(--ease),
    color 0.14s var(--ease), opacity 0.14s var(--ease);
}

button:hover:not(:disabled),
.btn:hover {
  background: var(--accent-hover);
}

button:disabled,
.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.btn-secondary {
  background: var(--surface-2);
  color: var(--text);
  border-color: var(--border-strong);
}
.btn-secondary:hover:not(:disabled) {
  background: var(--surface-3);
  border-color: var(--faint);
}

.btn-ghost {
  background: transparent;
  color: var(--text-2);
  border-color: transparent;
}
.btn-ghost:hover:not(:disabled) {
  background: var(--surface-2);
  color: var(--text);
}

.btn-danger {
  background: var(--danger-soft);
  color: var(--danger);
  border-color: rgba(255, 107, 107, 0.25);
}
.btn-danger:hover:not(:disabled) {
  background: rgba(255, 107, 107, 0.2);
}

.btn-sm {
  padding: 5px 10px;
  font-size: 12px;
  border-radius: var(--r-sm);
}

.btn-block {
  width: 100%;
}

/* ============================================================
   Segmented control (range picker / status filter)
   ============================================================ */

.segmented {
  display: inline-flex;
  padding: 3px;
  gap: 2px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
}

.segmented button {
  background: transparent;
  color: var(--muted);
  border: none;
  padding: 5px 12px;
  font-size: 12.5px;
  font-weight: 550;
  border-radius: var(--r-sm);
}
.segmented button:hover:not(:disabled) {
  background: var(--surface-3);
  color: var(--text);
}
.segmented button[data-active="true"] {
  background: var(--surface-3);
  color: var(--text);
  font-weight: 650;
  box-shadow: var(--shadow-sm);
}

/* ============================================================
   Forms
   ============================================================ */

input,
select,
textarea {
  font-family: inherit;
  font-size: 13.5px;
  background: var(--surface-2);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-md);
  padding: 9px 12px;
  color: var(--text);
  width: 100%;
  transition: border-color 0.14s var(--ease), box-shadow 0.14s var(--ease);
}

input::placeholder {
  color: var(--faint);
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-ring);
}

.field {
  display: grid;
  grid-gap: 6px;
  gap: 6px;
}

.field-label {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-2);
}

.field-hint {
  font-size: 12px;
  color: var(--faint);
  line-height: 1.5;
}

.form-section {
  display: grid;
  grid-gap: 14px;
  gap: 14px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}
.form-section:last-of-type {
  border-bottom: none;
  padding-bottom: 0;
}

.form-section-title {
  font-size: 13.5px;
  font-weight: 650;
}

.form-grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  grid-gap: 12px;
  gap: 12px;
}

/* ============================================================
   Tables
   ============================================================ */

.table-wrap {
  overflow-x: auto;
}

table.tbl {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

table.tbl th {
  text-align: left;
  padding: 11px 16px;
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

table.tbl td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

table.tbl tbody tr:last-child td {
  border-bottom: none;
}

table.tbl tbody tr {
  transition: background 0.12s var(--ease);
}
table.tbl tbody tr:hover {
  background: var(--surface-2);
}

.cell-nowrap {
  white-space: nowrap;
}

/* ============================================================
   Feedback: empty / error / notice
   ============================================================ */

.empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 10px;
  padding: 48px 24px;
  color: var(--muted);
}

.empty-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--r-lg);
  display: grid;
  place-items: center;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--faint);
  margin-bottom: 2px;
}

.empty-title {
  font-size: 14.5px;
  font-weight: 600;
  color: var(--text-2);
}

.empty-text {
  font-size: 13px;
  max-width: 46ch;
  line-height: 1.6;
  color: var(--muted);
}

.notice {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 12px 14px;
  border-radius: var(--r-md);
  font-size: 13px;
  line-height: 1.55;
  border: 1px solid;
}
.notice svg {
  flex-shrink: 0;
  margin-top: 1px;
}
.notice-danger {
  background: var(--danger-soft);
  border-color: rgba(255, 107, 107, 0.25);
  color: #ffb3b3;
}
.notice-warn {
  background: var(--warn-soft);
  border-color: rgba(245, 184, 73, 0.25);
  color: #f7d69a;
}
.notice-ok {
  background: var(--ok-soft);
  border-color: rgba(62, 207, 142, 0.25);
  color: #97e8c4;
}
.notice-info {
  background: var(--surface-2);
  border-color: var(--border-strong);
  color: var(--text-2);
}

code, .mono {
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.92em;
  background: var(--surface-3);
  padding: 1px 5px;
  border-radius: var(--r-sm);
  color: var(--text-2);
}

/* ============================================================
   Misc primitives
   ============================================================ */

.row {
  display: flex;
  align-items: center;
  gap: 8px;
}
.row-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.spread {
  margin-left: auto;
}

.avatar {
  width: 38px;
  height: 38px;
  border-radius: var(--r-full);
  object-fit: cover;
  background: var(--surface-3);
  border: 1px solid var(--border-strong);
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 14px;
  color: var(--muted);
  flex-shrink: 0;
}

.meta {
  font-size: 12px;
  color: var(--muted);
}

.divider {
  height: 1px;
  background: var(--border);
  border: none;
  margin: 0;
}

.kv {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 12.5px;
  padding: 5px 0;
}
.kv-key {
  color: var(--muted);
}
.kv-val {
  color: var(--text-2);
  font-weight: 550;
  text-align: right;
}

/* severity rail on anomaly cards */
.rail {
  border-left: 3px solid var(--border-strong);
  padding-left: 15px;
}
.rail-low { border-left-color: var(--faint); }
.rail-medium { border-left-color: var(--warn); }
.rail-high { border-left-color: var(--danger); }

/* baseline vs observed comparison bars */
.bars {
  display: grid;
  grid-gap: 7px;
  gap: 7px;
}
.bar-row {
  display: grid;
  grid-template-columns: 74px 1fr 76px;
  align-items: center;
  grid-gap: 10px;
  gap: 10px;
  font-size: 12px;
}
.bar-track {
  height: 7px;
  background: var(--surface-3);
  border-radius: var(--r-full);
  overflow: hidden;
}
.bar-fill {
  height: 100%;
  border-radius: var(--r-full);
  transition: width 0.3s var(--ease);
}

/* auth screen */
.auth-wrap {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}
.auth-card {
  width: 100%;
  max-width: 384px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  padding: 30px;
  box-shadow: var(--shadow-lg);
}

/* ============================================================
   Responsive
   ============================================================ */

@media (max-width: 900px) {
  :root {
    --sidebar-w: 68px;
  }
  .sidebar-brand {
    justify-content: center;
    padding: 16px 8px;
  }
  .brand-text,
  .nav-item span,
  .nav-section,
  .user-meta {
    display: none;
  }
  .nav-item {
    justify-content: center;
    padding: 10px;
  }
  .user-chip {
    justify-content: center;
    padding: 6px 0 10px;
  }
  .main {
    padding: 20px 16px 48px;
  }
  .bar-row {
    grid-template-columns: 62px 1fr 64px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}

