/* ============================================================
   Nettix Portal — Design System v2.0
   ============================================================ */

/* ─── Reset & box-sizing ─────────────────────────────────── */
.nettix-console, .nettix-console * { box-sizing: border-box; }
.nettix-admin-wrap { margin-right: 20px; }

/* ─── Design tokens ──────────────────────────────────────── */
:root {
  --ntx-sidebar-bg:    #0d1117;
  --ntx-sidebar-border:#1c2333;
  --ntx-bg:            #f0f4f9;
  --ntx-surface:       #ffffff;
  --ntx-surface-2:     #f8fafc;
  --ntx-border:        #e2e8f0;
  --ntx-border-soft:   #edf2f7;
  --ntx-text:          #0f172a;
  --ntx-text-2:        #334155;
  --ntx-muted:         #64748b;
  --ntx-blue:          #2563eb;
  --ntx-blue-light:    #eff6ff;
  --ntx-blue-mid:      #3b82f6;
  --ntx-green:         #059669;
  --ntx-green-light:   #ecfdf5;
  --ntx-amber:         #d97706;
  --ntx-amber-light:   #fffbeb;
  --ntx-red:           #dc2626;
  --ntx-red-light:     #fef2f2;
  --ntx-cyan:          #0891b2;
  --ntx-cyan-light:    #ecfeff;
  --ntx-violet:        #7c3aed;
  --ntx-violet-light:  #f5f3ff;
  --ntx-shadow-sm:     0 1px 3px rgba(15,23,42,.06), 0 1px 2px rgba(15,23,42,.04);
  --ntx-shadow:        0 4px 16px rgba(15,23,42,.08), 0 1px 4px rgba(15,23,42,.05);
  --ntx-shadow-lg:     0 12px 40px rgba(15,23,42,.12), 0 4px 12px rgba(15,23,42,.06);
  --ntx-radius:        10px;
  --ntx-radius-sm:     6px;
  --ntx-radius-lg:     14px;
  --ntx-transition:    all .18s cubic-bezier(.4,0,.2,1);
}

/* ─── Admin page header ──────────────────────────────────── */
.nettix-admin-header {
  align-items: center; display: flex; gap: 16px;
  justify-content: space-between; margin: 20px 0 18px;
}
.nettix-admin-header span {
  color: var(--ntx-muted); display: block; font-size: 11px;
  font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  margin-bottom: 2px;
}
.nettix-admin-header h1 {
  color: var(--ntx-text); font-size: 24px; line-height: 1.2; margin: 0;
}

/* ─── Console shell ──────────────────────────────────────── */
.nettix-console {
  background: var(--ntx-bg);
  border: 1px solid var(--ntx-border);
  color: var(--ntx-text);
  display: grid;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 14px;
  grid-template-columns: 256px minmax(0, 1fr);
  line-height: 1.5;
  min-height: 780px;
  overflow: hidden;
  width: 100%;
}
.nettix-console.is-admin {
  border-radius: var(--ntx-radius-lg);
  box-shadow: var(--ntx-shadow-lg);
  min-height: calc(100vh - 160px);
}

/* ─── Sidebar ────────────────────────────────────────────── */
.nettix-sidebar {
  background: var(--ntx-sidebar-bg);
  border-right: 1px solid var(--ntx-sidebar-border);
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 0;
  position: relative;
}
.nettix-sidebar::before {
  background: linear-gradient(180deg, rgba(37,99,235,.15) 0%, transparent 60%);
  content: '';
  inset: 0;
  pointer-events: none;
  position: absolute;
}

/* Brand */
.nettix-brand {
  align-items: center;
  border-bottom: 1px solid var(--ntx-sidebar-border);
  display: flex;
  gap: 12px;
  padding: 20px 16px;
  position: relative;
}
.nettix-brand-mark {
  align-items: center;
  background: linear-gradient(135deg, #3b82f6 0%, #10b981 100%);
  border-radius: 10px;
  box-shadow: 0 4px 14px rgba(59,130,246,.4);
  color: #fff;
  display: inline-flex;
  flex-shrink: 0;
  font-size: 16px;
  font-weight: 800;
  height: 38px;
  justify-content: center;
  letter-spacing: -.5px;
  width: 38px;
}
.nettix-brand strong { color: #f1f5f9; font-size: 15px; font-weight: 700; display: block; }
.nettix-brand small  { color: #64748b;  font-size: 11px; display: block; margin-top: 1px; }

/* Nav */
.nettix-nav { display: flex; flex-direction: column; flex: 1; gap: 2px; padding: 12px 10px; position: relative; }
.nettix-nav-section { color: #374151; font-size: 10px; font-weight: 700; letter-spacing: .08em;
  padding: 14px 8px 6px; text-transform: uppercase; }
.nettix-nav-item {
  align-items: center;
  border-radius: var(--ntx-radius-sm);
  border: 1px solid transparent;
  color: #94a3b8;
  display: flex;
  font-size: 13.5px;
  font-weight: 500;
  gap: 10px;
  min-height: 40px;
  padding: 9px 10px;
  position: relative;
  text-decoration: none;
  transition: var(--ntx-transition);
}
.nettix-nav-item:hover {
  background: rgba(255,255,255,.06);
  border-color: rgba(255,255,255,.08);
  color: #e2e8f0;
}
.nettix-nav-item.is-active {
  background: rgba(37,99,235,.22);
  border-color: rgba(59,130,246,.35);
  color: #93c5fd;
}
.nettix-nav-item.is-active::before {
  background: #3b82f6;
  border-radius: 0 3px 3px 0;
  content: '';
  height: 60%;
  left: -10px;
  position: absolute;
  top: 20%;
  width: 3px;
}
.nettix-nav-item .dashicons { font-size: 17px; height: 17px; width: 17px; flex-shrink: 0; }

/* Sidebar footer */
.nettix-sidebar-footer {
  border-top: 1px solid var(--ntx-sidebar-border);
  margin-top: auto;
  padding: 14px 10px;
  position: relative;
}

/* ─── Workspace ──────────────────────────────────────────── */
.nettix-workspace {
  background: var(--ntx-bg);
  display: grid;
  grid-template-rows: auto 1fr;
  min-width: 0;
  overflow-y: auto;
}

/* AppBar */
.nettix-appbar {
  align-items: center;
  background: rgba(255,255,255,.88);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--ntx-border);
  display: flex;
  gap: 16px;
  justify-content: space-between;
  min-height: 68px;
  padding: 14px 24px;
  position: sticky;
  top: 0;
  z-index: 10;
}
.nettix-title-block .ntx-kicker {
  color: var(--ntx-muted);
  display: block;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .07em;
  margin-bottom: 1px;
  text-transform: uppercase;
}
.nettix-title-block h1 { font-size: 20px; font-weight: 700; line-height: 1.25; margin: 0; color: var(--ntx-text); }

/* Toolbar */
.nettix-toolbar { align-items: center; display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
.nettix-toolbar label { align-items: center; display: flex; gap: 6px; }
.nettix-toolbar label span { color: var(--ntx-muted); font-size: 12px; white-space: nowrap; }
.nettix-toolbar select {
  background: var(--ntx-surface);
  border: 1px solid var(--ntx-border);
  border-radius: var(--ntx-radius-sm);
  color: var(--ntx-text);
  font-size: 13px;
  height: 36px;
  max-width: 200px;
  padding: 0 28px 0 10px;
  transition: var(--ntx-transition);
}
.nettix-toolbar select:focus { border-color: var(--ntx-blue); box-shadow: 0 0 0 3px rgba(37,99,235,.12); outline: none; }

/* User menu */
.nettix-user-menu { position: relative; }
.nettix-user-menu summary {
  align-items: center;
  background: var(--ntx-surface);
  border: 1px solid var(--ntx-border);
  border-radius: var(--ntx-radius-sm);
  cursor: pointer;
  display: flex;
  font-size: 13px;
  gap: 8px;
  height: 36px;
  list-style: none;
  max-width: 230px;
  overflow: hidden;
  padding: 0 12px;
  text-overflow: ellipsis;
  transition: var(--ntx-transition);
  white-space: nowrap;
}
.nettix-user-menu summary:hover { border-color: var(--ntx-blue); }
.nettix-user-menu summary::-webkit-details-marker { display: none; }
.nettix-user-avatar {
  align-items: center;
  background: linear-gradient(135deg, var(--ntx-blue) 0%, var(--ntx-violet) 100%);
  border-radius: 50%;
  color: #fff;
  display: inline-flex;
  flex-shrink: 0;
  font-size: 12px;
  font-weight: 700;
  height: 26px;
  justify-content: center;
  width: 26px;
}
.nettix-user-menu div {
  background: var(--ntx-surface);
  border: 1px solid var(--ntx-border);
  border-radius: var(--ntx-radius);
  box-shadow: var(--ntx-shadow-lg);
  display: grid;
  gap: 2px;
  min-width: 220px;
  padding: 8px;
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  z-index: 30;
}
.nettix-user-menu strong { color: var(--ntx-text); display: block; font-size: 13px; padding: 4px 8px 2px; }
.nettix-user-menu span  { color: var(--ntx-muted); display: block; font-size: 12px; padding: 0 8px 6px; }
.nettix-user-menu a {
  border-radius: var(--ntx-radius-sm);
  color: var(--ntx-muted);
  display: block;
  font-size: 13px;
  padding: 7px 8px;
  text-decoration: none;
  transition: var(--ntx-transition);
}
.nettix-user-menu a:hover { background: var(--ntx-blue-light); color: var(--ntx-blue); }

/* ─── Content wrapper ────────────────────────────────────── */
.ntx-content { padding: 22px 24px; }

/* ─── Hero banner ────────────────────────────────────────── */
.ntx-hero {
  background: linear-gradient(135deg, #0d1117 0%, #1e3a8a 45%, #065f46 100%);
  border-radius: var(--ntx-radius-lg);
  color: #fff;
  display: grid;
  gap: 24px;
  grid-template-columns: 1fr 300px;
  margin-bottom: 22px;
  overflow: hidden;
  padding: 28px 32px;
  position: relative;
}
.ntx-hero::before {
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.025'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  content: '';
  inset: 0;
  opacity: .6;
  pointer-events: none;
  position: absolute;
}
.ntx-hero.is-admin { background: linear-gradient(135deg, #0d1117 0%, #1e1b4b 40%, #4c1d95 100%); }
.ntx-hero-copy { display: flex; flex-direction: column; gap: 12px; position: relative; }
.ntx-hero-role { color: #93c5fd; font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.ntx-hero-copy h2 { color: #fff; font-size: 30px; font-weight: 800; line-height: 1.1; margin: 0; }
.ntx-hero-copy p { color: #bfdbfe; font-size: 14px; line-height: 1.6; margin: 0; max-width: 560px; }
.ntx-hero-actions { display: flex; flex-wrap: wrap; gap: 10px; padding-top: 4px; }
.ntx-hero-visual { display: flex; flex-direction: column; gap: 12px; position: relative; }

/* Donut gauge */
.ntx-gauge {
  align-items: center;
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.15);
  border-radius: var(--ntx-radius);
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 18px;
}
.ntx-donut-wrap {
  --pct: 0;
  align-items: center;
  aspect-ratio: 1;
  background: conic-gradient(#10b981 0 calc(var(--pct) * 1%), rgba(255,255,255,.18) calc(var(--pct) * 1%) 100%);
  border-radius: 50%;
  display: grid;
  height: 100px;
  justify-items: center;
  position: relative;
}
.ntx-donut-wrap::after {
  background: rgba(15,23,42,.85);
  border-radius: 50%;
  content: '';
  height: 70px;
  position: absolute;
  width: 70px;
}
.ntx-donut-inner { align-items: center; display: flex; flex-direction: column; gap: 2px; position: relative; z-index: 1; }
.ntx-donut-inner strong { color: #fff; font-size: 22px; font-weight: 800; line-height: 1; }
.ntx-donut-inner span  { color: #94a3b8; font-size: 10px; font-weight: 700; text-transform: uppercase; }
.ntx-gauge p { color: #cbd5e1; font-size: 12px; margin: 0; text-align: center; }

/* Hero sparkline (Chart.js canvas) */
.ntx-hero-chart-wrap {
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.15);
  border-radius: var(--ntx-radius);
  padding: 12px 14px;
}
.ntx-hero-chart-wrap .ntx-chart-label {
  color: #cbd5e1;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .06em;
  margin-bottom: 8px;
  text-transform: uppercase;
}
.ntx-hero-chart-wrap canvas { display: block; height: 64px !important; width: 100% !important; }

/* ─── KPI row ────────────────────────────────────────────── */
.ntx-kpi-row {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 22px;
}
.ntx-kpi {
  background: var(--ntx-surface);
  border: 1px solid var(--ntx-border);
  border-left: 4px solid var(--ntx-blue);
  border-radius: var(--ntx-radius);
  box-shadow: var(--ntx-shadow-sm);
  display: grid;
  gap: 4px 12px;
  grid-template-areas: "icon label" "icon value" "icon hint";
  grid-template-columns: 44px 1fr;
  min-height: 100px;
  padding: 16px;
  transition: var(--ntx-transition);
}
.ntx-kpi:hover { box-shadow: var(--ntx-shadow); transform: translateY(-1px); }
.ntx-kpi.tone-blue   { border-left-color: var(--ntx-blue); }
.ntx-kpi.tone-green  { border-left-color: var(--ntx-green); }
.ntx-kpi.tone-amber  { border-left-color: var(--ntx-amber); }
.ntx-kpi.tone-red    { border-left-color: var(--ntx-red); }
.ntx-kpi.tone-cyan   { border-left-color: var(--ntx-cyan); }
.ntx-kpi.tone-violet { border-left-color: var(--ntx-violet); }
.ntx-kpi-icon {
  align-items: center;
  border-radius: var(--ntx-radius-sm);
  display: flex;
  font-size: 20px;
  grid-area: icon;
  height: 44px;
  justify-content: center;
  width: 44px;
}
.tone-blue   .ntx-kpi-icon { background: var(--ntx-blue-light);   color: var(--ntx-blue); }
.tone-green  .ntx-kpi-icon { background: var(--ntx-green-light);  color: var(--ntx-green); }
.tone-amber  .ntx-kpi-icon { background: var(--ntx-amber-light);  color: var(--ntx-amber); }
.tone-red    .ntx-kpi-icon { background: var(--ntx-red-light);    color: var(--ntx-red); }
.tone-cyan   .ntx-kpi-icon { background: var(--ntx-cyan-light);   color: var(--ntx-cyan); }
.tone-violet .ntx-kpi-icon { background: var(--ntx-violet-light); color: var(--ntx-violet); }
.ntx-kpi-label { color: var(--ntx-muted); font-size: 12px; font-weight: 600; grid-area: label; letter-spacing: .02em; align-self: end; }
.ntx-kpi-value { color: var(--ntx-text);  font-size: 28px; font-weight: 800; grid-area: value; line-height: 1; }
.ntx-kpi-hint  { color: var(--ntx-muted); font-size: 11.5px; grid-area: hint; align-self: start; }

/* ─── Panels ─────────────────────────────────────────────── */
.ntx-panel {
  background: var(--ntx-surface);
  border: 1px solid var(--ntx-border);
  border-radius: var(--ntx-radius);
  box-shadow: var(--ntx-shadow-sm);
  overflow: hidden;
}
.ntx-panel-head {
  align-items: center;
  border-bottom: 1px solid var(--ntx-border-soft);
  display: flex;
  gap: 12px;
  justify-content: space-between;
  min-height: 54px;
  padding: 14px 18px;
}
.ntx-panel-head h2, .ntx-panel-head h3 {
  color: var(--ntx-text);
  font-size: 15px;
  font-weight: 700;
  margin: 0;
}
.ntx-panel-head-actions { align-items: center; display: flex; gap: 8px; }
.ntx-panel-head a { color: var(--ntx-blue); font-size: 12.5px; font-weight: 600; text-decoration: none; }
.ntx-panel-head a:hover { text-decoration: underline; }

/* ─── Grid layouts ───────────────────────────────────────── */
.ntx-grid-2 { display: grid; gap: 18px; grid-template-columns: repeat(2, minmax(0,1fr)); margin-bottom: 22px; }
.ntx-grid-3 { display: grid; gap: 18px; grid-template-columns: repeat(3, minmax(0,1fr)); margin-bottom: 22px; }
.ntx-grid-2-1 { display: grid; gap: 18px; grid-template-columns: minmax(0,2fr) minmax(0,1fr); margin-bottom: 22px; }
.ntx-grid-1-2 { display: grid; gap: 18px; grid-template-columns: minmax(0,1fr) minmax(0,2fr); margin-bottom: 22px; }
.ntx-mb { margin-bottom: 22px; }
.ntx-span-2 { grid-column: span 2; }

/* ─── Chart containers ───────────────────────────────────── */
.ntx-chart-box { padding: 18px; }
.ntx-chart-box canvas { display: block; height: 220px !important; width: 100% !important; }
.ntx-chart-box.sm canvas { height: 160px !important; }
.ntx-chart-box.lg canvas { height: 280px !important; }

/* ─── Tables ─────────────────────────────────────────────── */
.ntx-table-wrap { overflow-x: auto; }
.ntx-table { border-collapse: collapse; font-size: 13.5px; min-width: 100%; width: 100%; }
.ntx-table th {
  background: var(--ntx-surface-2);
  border-bottom: 1px solid var(--ntx-border);
  color: var(--ntx-muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .06em;
  padding: 10px 16px;
  text-align: left;
  text-transform: uppercase;
  white-space: nowrap;
}
.ntx-table td {
  border-bottom: 1px solid var(--ntx-border-soft);
  color: var(--ntx-text-2);
  padding: 12px 16px;
  vertical-align: middle;
}
.ntx-table tr:last-child td { border-bottom: 0; }
.ntx-table tr:hover td { background: var(--ntx-blue-light); }
.ntx-table td strong { color: var(--ntx-text); font-weight: 600; }
.ntx-table td small { color: var(--ntx-muted); display: block; font-size: 11.5px; margin-top: 2px; }

/* ─── Badges / status pills ──────────────────────────────── */
.ntx-badge {
  border-radius: 999px;
  display: inline-flex;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .03em;
  padding: 4px 10px;
  white-space: nowrap;
}
/* neutral */
.ntx-badge           { background: #f1f5f9; color: #475569; border: 1px solid #e2e8f0; }
/* green states */
.ntx-badge-active, .ntx-badge-green, .ntx-badge-mock-executed,
.ntx-badge-approved, .ntx-badge-available, .ntx-badge-live {
  background: #dcfce7; border-color: #bbf7d0; color: #15803d;
}
/* amber states */
.ntx-badge-pending, .ntx-badge-yellow, .ntx-badge-pending-support-approval,
.ntx-badge-pending-technical-change, .ntx-badge-observed, .ntx-badge-job-created,
.ntx-badge-waiting-manual-change {
  background: #fef9c3; border-color: #fde047; color: #a16207;
}
/* red states */
.ntx-badge-red, .ntx-badge-failed, .ntx-badge-rejected, .ntx-badge-unavailable,
.ntx-badge-validation-failed {
  background: #fee2e2; border-color: #fca5a5; color: #b91c1c;
}
/* blue states */
.ntx-badge-draft, .ntx-badge-blue { background: #dbeafe; border-color: #93c5fd; color: #1d4ed8; }
/* cyan */
.ntx-badge-cyan { background: var(--ntx-cyan-light); border-color: #a5f3fc; color: #0e7490; }
/* violet */
.ntx-badge-violet { background: var(--ntx-violet-light); border-color: #ddd6fe; color: #6d28d9; }
/* risk */
.ntx-risk-green  { background: #dcfce7; border: 1px solid #bbf7d0; color: #15803d; border-radius: 999px; display: inline-flex; font-size: 11px; font-weight: 700; padding: 3px 9px; gap: 4px; }
.ntx-risk-yellow { background: #fef9c3; border: 1px solid #fde047; color: #a16207; border-radius: 999px; display: inline-flex; font-size: 11px; font-weight: 700; padding: 3px 9px; gap: 4px; }
.ntx-risk-red    { background: #fee2e2; border: 1px solid #fca5a5; color: #b91c1c; border-radius: 999px; display: inline-flex; font-size: 11px; font-weight: 700; padding: 3px 9px; gap: 4px; }

/* ─── Activity / status feed ─────────────────────────────── */
.ntx-feed-item {
  align-items: center;
  border-bottom: 1px solid var(--ntx-border-soft);
  display: grid;
  gap: 10px;
  grid-template-columns: 34px minmax(0,1fr) auto;
  padding: 12px 18px;
}
.ntx-feed-item:last-child { border-bottom: 0; }
.ntx-feed-icon {
  align-items: center;
  border-radius: 8px;
  display: flex;
  font-size: 16px;
  height: 34px;
  justify-content: center;
  width: 34px;
}
.ntx-feed-icon.blue   { background: var(--ntx-blue-light);   color: var(--ntx-blue); }
.ntx-feed-icon.green  { background: var(--ntx-green-light);  color: var(--ntx-green); }
.ntx-feed-icon.amber  { background: var(--ntx-amber-light);  color: var(--ntx-amber); }
.ntx-feed-icon.red    { background: var(--ntx-red-light);    color: var(--ntx-red); }
.ntx-feed-icon.violet { background: var(--ntx-violet-light); color: var(--ntx-violet); }
.ntx-feed-body strong { color: var(--ntx-text); display: block; font-size: 13.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ntx-feed-body small  { color: var(--ntx-muted); display: block; font-size: 11.5px; margin-top: 1px; }

/* Monitoring status row */
.ntx-status-row {
  align-items: center;
  border-bottom: 1px solid var(--ntx-border-soft);
  display: grid;
  gap: 10px;
  grid-template-columns: 10px minmax(0,1fr) auto;
  padding: 11px 18px;
}
.ntx-status-row:last-child { border-bottom: 0; }
.ntx-status-dot {
  background: var(--ntx-amber);
  border-radius: 50%;
  flex-shrink: 0;
  height: 10px;
  width: 10px;
}
.ntx-status-dot.ok   { background: var(--ntx-green); box-shadow: 0 0 0 3px rgba(5,150,105,.18); }
.ntx-status-dot.warn { background: var(--ntx-amber); box-shadow: 0 0 0 3px rgba(217,119,6,.18); }
.ntx-status-dot.down { background: var(--ntx-red);   box-shadow: 0 0 0 3px rgba(220,38,38,.18); }
.ntx-status-dot.pulse { animation: ntxPulse 2s infinite; }
@keyframes ntxPulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: .45; }
}
.ntx-status-info strong { color: var(--ntx-text); display: block; font-size: 13.5px; font-weight: 600; }
.ntx-status-info small  { color: var(--ntx-muted); display: block; font-size: 11.5px; margin-top: 1px; }

/* ─── Distribution bars ──────────────────────────────────── */
.ntx-dist { display: grid; gap: 12px; padding: 16px 18px; }
.ntx-dist-row label { color: var(--ntx-text-2); display: flex; font-size: 13px; font-weight: 500; justify-content: space-between; margin-bottom: 5px; }
.ntx-dist-row label span { color: var(--ntx-muted); font-size: 12px; font-weight: 700; }
.ntx-dist-track { background: var(--ntx-border-soft); border-radius: 999px; height: 8px; overflow: hidden; }
.ntx-dist-fill  { background: linear-gradient(90deg, var(--ntx-blue) 0%, #818cf8 100%); border-radius: inherit; height: 100%; transition: width .6s cubic-bezier(.4,0,.2,1); }
.ntx-dist-row:nth-child(2n) .ntx-dist-fill { background: linear-gradient(90deg, var(--ntx-cyan) 0%, var(--ntx-green) 100%); }
.ntx-dist-row:nth-child(3n) .ntx-dist-fill { background: linear-gradient(90deg, var(--ntx-violet) 0%, #ec4899 100%); }

/* ─── Service tiles ──────────────────────────────────────── */
.ntx-tiles { display: grid; gap: 14px; grid-template-columns: repeat(3, minmax(0,1fr)); }
.ntx-tile {
  background: linear-gradient(160deg, #fff 0%, var(--ntx-surface-2) 100%);
  border: 1px solid var(--ntx-border);
  border-radius: var(--ntx-radius);
  box-shadow: var(--ntx-shadow-sm);
  color: var(--ntx-text);
  display: grid;
  gap: 8px;
  padding: 18px;
  text-decoration: none;
  transition: var(--ntx-transition);
}
.ntx-tile:hover { border-color: var(--ntx-blue); box-shadow: var(--ntx-shadow); color: var(--ntx-text); transform: translateY(-2px); }
.ntx-tile-icon {
  align-items: center;
  background: var(--ntx-blue-light);
  border-radius: 8px;
  color: var(--ntx-blue);
  display: flex;
  font-size: 22px;
  height: 44px;
  justify-content: center;
  width: 44px;
}
.ntx-tile strong { color: var(--ntx-text); font-size: 14.5px; font-weight: 700; }
.ntx-tile small  { color: var(--ntx-muted); font-size: 12px; line-height: 1.4; }

/* ─── Buttons ────────────────────────────────────────────── */
.ntx-btn, .ntx-btn-outline, .ntx-btn-ghost, .ntx-btn-soft {
  align-items: center;
  border: 1px solid transparent;
  border-radius: var(--ntx-radius-sm);
  cursor: pointer;
  display: inline-flex;
  font-size: 13.5px;
  font-weight: 600;
  gap: 7px;
  height: 36px;
  justify-content: center;
  padding: 0 14px;
  text-decoration: none;
  transition: var(--ntx-transition);
  white-space: nowrap;
}
.ntx-btn { background: var(--ntx-blue); color: #fff; }
.ntx-btn:hover { background: #1d4ed8; box-shadow: 0 4px 12px rgba(37,99,235,.35); color: #fff; }
.ntx-btn-hero { background: #fff; color: var(--ntx-text); font-weight: 700; padding: 0 18px; height: 40px; }
.ntx-btn-hero:hover { background: #e0f2fe; color: var(--ntx-text); }
.ntx-btn-soft-hero { background: rgba(255,255,255,.15); border: 1px solid rgba(255,255,255,.3); color: #fff; padding: 0 18px; height: 40px; }
.ntx-btn-soft-hero:hover { background: rgba(255,255,255,.25); color: #fff; }
.ntx-btn-outline { background: transparent; border-color: var(--ntx-border); color: var(--ntx-text-2); }
.ntx-btn-outline:hover { border-color: var(--ntx-blue); color: var(--ntx-blue); }
.ntx-btn-ghost { background: transparent; color: var(--ntx-muted); padding: 0 8px; }
.ntx-btn-ghost:hover { background: var(--ntx-surface-2); color: var(--ntx-text); }
.ntx-btn-soft { background: var(--ntx-blue-light); border-color: transparent; color: var(--ntx-blue); }
.ntx-btn-soft:hover { background: #bfdbfe; color: var(--ntx-blue); }
.ntx-btn-sm { height: 30px; font-size: 12px; padding: 0 10px; }
.ntx-btn-green { background: var(--ntx-green); color: #fff; }
.ntx-btn-green:hover { background: #047857; color: #fff; }
.ntx-btn-red { background: var(--ntx-red); color: #fff; }
.ntx-btn-red:hover { background: #b91c1c; color: #fff; }
.ntx-btn-icon { padding: 0; width: 36px; }
button.ntx-btn, button.ntx-btn-outline, button.ntx-btn-ghost,
button.ntx-btn-soft, button.ntx-btn-green, button.ntx-btn-red { border: 1px solid transparent; }
button.ntx-btn-outline { border-color: var(--ntx-border); }

/* ─── Forms ──────────────────────────────────────────────── */
.ntx-form { display: grid; gap: 16px; padding: 20px; }
.ntx-form-grid-2 { display: grid; gap: 14px; grid-template-columns: repeat(2, minmax(0,1fr)); }
.ntx-form-grid-3 { display: grid; gap: 14px; grid-template-columns: repeat(3, minmax(0,1fr)); }
.ntx-form label { color: var(--ntx-text-2); display: grid; font-size: 13px; font-weight: 600; gap: 5px; }
.ntx-form input, .ntx-form select, .ntx-form textarea {
  background: var(--ntx-surface);
  border: 1px solid var(--ntx-border);
  border-radius: var(--ntx-radius-sm);
  color: var(--ntx-text);
  font-size: 13.5px;
  min-height: 38px;
  padding: 8px 11px;
  transition: var(--ntx-transition);
  width: 100%;
}
.ntx-form input:focus, .ntx-form select:focus, .ntx-form textarea:focus {
  border-color: var(--ntx-blue);
  box-shadow: 0 0 0 3px rgba(37,99,235,.12);
  outline: none;
}
.ntx-form textarea { min-height: 80px; resize: vertical; }
.ntx-form-hint { color: var(--ntx-muted); font-size: 11.5px; margin-top: 3px; }
.ntx-form-actions { display: flex; gap: 10px; justify-content: flex-end; padding-top: 4px; }
.ntx-form-section { border-bottom: 1px solid var(--ntx-border-soft); padding-bottom: 16px; }
.ntx-form-section h3 { color: var(--ntx-text); font-size: 14px; font-weight: 700; margin: 0 0 12px; }

/* ─── Alerts & notices ───────────────────────────────────── */
.ntx-alert, .ntx-success, .ntx-info {
  border-radius: var(--ntx-radius-sm);
  font-size: 13.5px;
  margin: 14px 18px;
  padding: 12px 16px;
}
.ntx-alert   { background: #fef2f2; border: 1px solid #fca5a5; color: #991b1b; }
.ntx-success { background: #f0fdf4; border: 1px solid #86efac; color: #166534; }
.ntx-info    { background: #eff6ff; border: 1px solid #93c5fd; color: #1e40af; }
.ntx-api-error { display: grid; gap: 4px; }
.ntx-api-error strong { color: #7f1d1d; font-size: 14px; }
.ntx-api-error span   { color: #991b1b; }
.ntx-api-error small  {
  background: rgba(255,255,255,.6);
  border-radius: 5px;
  display: block;
  font-family: ui-monospace, 'SFMono-Regular', Menlo, monospace;
  font-size: 11.5px;
  margin-top: 4px;
  overflow-wrap: anywhere;
  padding: 7px 10px;
}

/* ─── Empty state ────────────────────────────────────────── */
.ntx-empty {
  align-items: center;
  color: var(--ntx-muted);
  display: flex;
  flex-direction: column;
  font-size: 13.5px;
  gap: 10px;
  min-height: 140px;
  padding: 24px 18px;
  text-align: center;
}
.ntx-empty .dashicons { font-size: 36px; height: 36px; opacity: .35; width: 36px; }

/* ─── Loading skeleton ───────────────────────────────────── */
@keyframes ntxShimmer { 0% { background-position: -400px 0; } 100% { background-position: 400px 0; } }
.ntx-skeleton {
  animation: ntxShimmer 1.4s ease infinite;
  background: linear-gradient(90deg, #f0f4f9 25%, #e2e8f0 50%, #f0f4f9 75%);
  background-size: 800px 100%;
  border-radius: var(--ntx-radius-sm);
}
.ntx-skeleton-line { height: 14px; margin-bottom: 8px; }
.ntx-skeleton-box  { height: 80px; width: 100%; }

/* ─── Toast notifications ────────────────────────────────── */
#ntx-toast-area {
  bottom: 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  position: fixed;
  right: 24px;
  z-index: 9999;
}
.ntx-toast {
  align-items: center;
  animation: ntxToastIn .25s cubic-bezier(.4,0,.2,1);
  background: var(--ntx-text);
  border-radius: var(--ntx-radius);
  box-shadow: var(--ntx-shadow-lg);
  color: #fff;
  display: flex;
  font-size: 13.5px;
  font-weight: 500;
  gap: 10px;
  max-width: 340px;
  padding: 12px 16px;
}
.ntx-toast.success { background: #15803d; }
.ntx-toast.error   { background: var(--ntx-red); }
.ntx-toast.info    { background: var(--ntx-blue); }
@keyframes ntxToastIn {
  from { opacity: 0; transform: translateY(10px) scale(.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* ─── Approval inline actions ────────────────────────────── */
.ntx-approval-row { background: var(--ntx-surface); border-bottom: 1px solid var(--ntx-border-soft); display: grid; gap: 12px; grid-template-columns: minmax(0,1fr) auto; padding: 14px 18px; align-items: center; }
.ntx-approval-row:last-child { border-bottom: 0; }
.ntx-approval-info strong { color: var(--ntx-text); display: block; font-size: 13.5px; font-weight: 600; margin-bottom: 3px; }
.ntx-approval-meta { align-items: center; display: flex; flex-wrap: wrap; gap: 8px; }
.ntx-approval-actions { align-items: center; display: flex; gap: 8px; flex-shrink: 0; }
.ntx-risk-indicator {
  align-items: center;
  border-radius: 6px;
  display: inline-flex;
  font-size: 11px;
  font-weight: 800;
  gap: 4px;
  height: 22px;
  letter-spacing: .05em;
  padding: 0 8px;
  text-transform: uppercase;
}
.ntx-risk-indicator.green  { background: #dcfce7; color: #15803d; }
.ntx-risk-indicator.yellow { background: #fef9c3; color: #a16207; }
.ntx-risk-indicator.red    { background: #fee2e2; color: #b91c1c; }

/* ─── Settings panel ─────────────────────────────────────── */
.ntx-settings-layout {
  align-items: start;
  display: grid;
  gap: 20px;
  grid-template-columns: minmax(0,680px) minmax(260px,1fr);
  max-width: 1040px;
  padding: 24px;
}
.ntx-settings-card { background: var(--ntx-surface); border: 1px solid var(--ntx-border); border-radius: var(--ntx-radius); box-shadow: var(--ntx-shadow-sm); overflow: hidden; }
.ntx-settings-section { border-bottom: 1px solid var(--ntx-border-soft); display: grid; gap: 10px; padding: 18px 20px; }
.ntx-settings-section:last-of-type { border-bottom: 0; }
.ntx-settings-section h2 { color: var(--ntx-text); font-size: 15px; font-weight: 700; margin: 0 0 2px; }
.ntx-settings-section p  { color: var(--ntx-muted); font-size: 12.5px; margin: 0 0 4px; }
.ntx-settings-section label { color: var(--ntx-text-2); font-size: 13px; font-weight: 600; display: grid; gap: 5px; }
.ntx-settings-section input {
  background: var(--ntx-surface); border: 1px solid var(--ntx-border); border-radius: var(--ntx-radius-sm);
  color: var(--ntx-text); font-size: 13.5px; height: 38px; padding: 0 11px; width: 100%;
  transition: var(--ntx-transition);
}
.ntx-settings-section input:focus { border-color: var(--ntx-blue); box-shadow: 0 0 0 3px rgba(37,99,235,.12); outline: none; }
.ntx-settings-section .submit { padding: 0; }
.ntx-summary-item {
  align-items: center; border-bottom: 1px solid var(--ntx-border-soft);
  display: grid; gap: 3px 12px; grid-template-columns: 38px 1fr; padding: 14px 18px;
}
.ntx-summary-item:last-child { border-bottom: 0; }
.ntx-summary-icon { align-items: center; background: var(--ntx-blue-light); border-radius: 8px; color: var(--ntx-blue); display: flex; font-size: 18px; height: 38px; justify-content: center; grid-row: span 2; width: 38px; }
.ntx-summary-item strong { color: var(--ntx-text); display: block; font-size: 13px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ntx-summary-item small  { color: var(--ntx-muted); display: block; font-size: 11.5px; }

/* ─── Responsive ─────────────────────────────────────────── */
@media (max-width: 1100px) {
  .nettix-console { grid-template-columns: 72px minmax(0,1fr); }
  .nettix-brand div, .nettix-nav-item span:not(.dashicons), .nettix-nav-section { display: none; }
  .nettix-brand { justify-content: center; padding: 16px 0; }
  .nettix-nav { align-items: center; padding: 8px 4px; }
  .nettix-nav-item { justify-content: center; padding: 10px; }
  .nettix-nav-item.is-active::before { display: none; }
  .ntx-kpi-row { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .ntx-grid-2-1, .ntx-grid-1-2 { grid-template-columns: 1fr; }
  .ntx-hero { grid-template-columns: 1fr; }
  .ntx-hero-visual { display: none; }
}
@media (max-width: 860px) {
  .ntx-grid-3 { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .ntx-grid-2 { grid-template-columns: 1fr; }
  .ntx-tiles  { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .ntx-form-grid-3 { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .ntx-settings-layout { grid-template-columns: 1fr; }
  .ntx-span-2 { grid-column: auto; }
}
@media (max-width: 640px) {
  .nettix-console { display: block; min-height: 0; }
  .nettix-sidebar { border-bottom: 1px solid var(--ntx-sidebar-border); border-right: 0; }
  .nettix-nav { flex-direction: row; overflow-x: auto; padding: 6px 8px; }
  .nettix-nav-item { flex: 0 0 auto; min-width: 0; }
  .nettix-brand div { display: block !important; }
  .nettix-nav-item span:not(.dashicons) { display: none; }
  .nettix-appbar { align-items: flex-start; flex-direction: column; min-height: auto; padding: 14px 16px; }
  .nettix-toolbar { justify-content: stretch; width: 100%; }
  .ntx-hero { padding: 20px; }
  .ntx-hero-copy h2 { font-size: 22px; }
  .ntx-kpi-row { grid-template-columns: 1fr; }
  .ntx-grid-3, .ntx-tiles { grid-template-columns: 1fr; }
  .ntx-form-grid-2, .ntx-form-grid-3 { grid-template-columns: 1fr; }
  .ntx-content { padding: 14px 16px; }
  #ntx-toast-area { left: 12px; right: 12px; bottom: 12px; }
  .ntx-toast { max-width: 100%; }
}
