/* ============================================================
   Sentinel — DeepSync Design System  (Josh Template Edition)
   Watch. Validate. Protect.
   ============================================================ */

:root {
  /* Brand — Josh palette */
  --primary: #418BCA;
  --primary-hover: #3478b0;
  --primary-light: rgba(65,139,202,0.12);
  --primary-dim: rgba(65,139,202,0.05);
  --secondary: #F89A14;
  --secondary-hover: #e08a0c;
  --secondary-light: rgba(248,154,20,0.12);
  --accent-dark: #363A49;

  /* Sidebar — dark slate */
  --sidebar-bg: #515763;
  --sidebar-hover: #3a4252;
  --sidebar-active: #414151;
  --sidebar-sub: #464d5a;

  /* Josh functional colors */
  --blue-700: #418BCA;
  --blue-600: #3c8dbc;
  --blue-500: #5bc0de;
  --green-600: #01BC8C;
  --green-500: #1bc398;
  --green-100: #d4f5ea;
  --red-600: #EF6F6C;
  --red-500: #f56954;
  --red-100: #fde0df;
  --orange-600: #e08a0c;
  --orange-500: #F89A14;
  --orange-100: #fef0d5;
  --purple-600: #7C3B97;
  --purple-100: #f0e0f7;
  --cyan-500: #67C5DF;
  --cyan-600: #42aaca;

  /* Surfaces */
  --gray-900: #333333;
  --gray-800: #444444;
  --gray-700: #555555;
  --gray-600: #666666;
  --gray-500: #999999;
  --gray-400: #aaaaaa;
  --gray-300: #cccccc;
  --gray-200: #dddddd;
  --gray-100: #ebebeb;
  --white: #ffffff;

  /* Elevation */
  --shadow-card: 0 1px 3px rgba(0,0,0,0.08);
  --shadow-md: 0 3px 8px rgba(0,0,0,0.10);
  --shadow-lg: 0 8px 20px rgba(0,0,0,0.12);
  --shadow-ring-primary: 0 0 0 3px rgba(65,139,202,0.20);

  /* Shape */
  --radius: 4px;
  --sidebar-w: 250px;

  /* Motion */
  --ease: cubic-bezier(0.4,0,0.2,1);
  --transition: 0.25s var(--ease);
}

*, *::before, *::after { box-sizing: border-box; }

::selection { background: rgba(65,139,202,0.20); }

html, body {
  min-height: 100%;
  margin: 0;
  background: var(--gray-100) !important;
  font-family: Lato, 'Noto Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif !important;
  color: var(--gray-900) !important;
  font-size: 13px !important;
  -webkit-font-smoothing: antialiased;
  letter-spacing: normal;
  line-height: 1.5;
}

body { overflow-x: hidden; }

/* ═══ Bootstrap 5 Overrides ═══
   Bootstrap sets --bs-body-bg:#fff, --bs-body-font-family:system-ui, etc.
   We must override ALL of these to maintain Josh design. */
:root {
  --bs-body-bg: #ebebeb !important;
  --bs-body-color: #333 !important;
  --bs-body-font-family: Lato, 'Noto Sans', -apple-system, sans-serif !important;
  --bs-body-font-size: 13px !important;
  --bs-border-radius: 4px;
  --bs-border-color: #ddd;
  --bs-link-color: #418BCA;
  --bs-link-hover-color: #3478b0;
}
.card-vcm { border-radius: 0 !important; border: 1px solid #ddd !important; background: #fff !important; box-shadow: none !important; }
table { border-collapse: collapse; }
h1, h2, h3, h4, h5, h6 { font-family: 'Noto Sans', sans-serif !important; margin-top: 0; }
a { color: #418BCA; text-decoration: none; }
a:hover { color: #3478b0; }
.form-control, .form-select { font-size: 13px; border-color: #ddd; }
.form-control:focus, .form-select:focus { border-color: #418BCA; box-shadow: 0 0 0 2px rgba(65,139,202,.15); }
label { font-size: 13px; font-weight: 600; color: #555; }
.table { --bs-table-bg: transparent; }
.table > :not(caption) > * > * { padding: 8px 12px; }
.app { min-height: 100vh; background: var(--gray-100); }

/* =========================
   Sidebar
   ========================= */
.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: var(--sidebar-w);
  background: var(--sidebar-bg);
  color: #fff;
  z-index: 20;
  display: flex;
  flex-direction: column;
  border-right: none;
}

.brand {
  height: 50px;
  padding: 0 15px;
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--sidebar-bg);
  border-bottom: 1px solid rgba(255,255,255,.08);
}

.brand-shield {
  width: 30px;
  height: 30px;
  border: 2px solid #fff;
  border-radius: 9px;
  display: grid;
  place-items: center;
  font-size: 17px;
  line-height: 1;
  font-weight: 800;
}

.brand-name {
  font-size: 20px;
  font-weight: 700;
  line-height: 24px;
  letter-spacing: 0.05em;
  font-family: 'Noto Sans', sans-serif;
}

.brand-sub {
  width: 180px;
  color: rgba(255,255,255,.65);
  font-size: 7px;
  line-height: 10px;
  font-weight: 600;
  margin-top: 1px;
  letter-spacing: 0.3px;
  text-transform: uppercase;
}

.sidebar-nav {
  flex: 1;
  padding: 10px 10px;
  overflow-y: auto;
}

.nav-title {
  margin: 0;
  padding: 10px 15px 6px;
  text-transform: uppercase;
  color: rgba(255,255,255,.45);
  font-size: 11px;
  letter-spacing: 0.1em;
  font-weight: 600;
  font-family: 'Noto Sans', sans-serif;
  border-bottom: 1px solid rgba(255,255,255,.05);
}

.nav-link-vcm {
  height: 38px;
  border-radius: 0;
  color: rgba(255,255,255,.85);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 15px;
  margin-bottom: 0;
  font-weight: 400;
  font-size: 13px;
  position: relative;
  white-space: nowrap;
  border-bottom: 1px solid rgba(255,255,255,.05);
  transition: background var(--transition);
}

.nav-link-vcm:hover {
  background: var(--sidebar-hover);
  color: #fff;
}

.nav-link-vcm.active {
  background: var(--sidebar-active);
  color: #fff;
  border-left: 3px solid var(--secondary);
  box-shadow: none;
}

.nav-icon {
  width: 20px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  opacity: 1;
  flex-shrink: 0;
}

.nav-count {
  margin-left: auto;
  min-width: 20px;
  height: 18px;
  border-radius: 50%;
  background: #EF6F6C;
  color: #fff;
  display: inline-grid;
  place-items: center;
  font-size: 10px;
  font-weight: 600;
  padding: 0 5px;
}

.sidebar-footer {
  height: 40px;
  padding: 0 15px;
  border-top: 1px solid rgba(255,255,255,.08);
  display: flex;
  align-items: center;
  gap: 12px;
  color: rgba(255,255,255,.7);
  font-weight: 400;
  cursor: pointer;
  font-size: 13px;
}
.sidebar-footer:hover { background: var(--sidebar-hover); }

/* Josh-style expandable sub-menus */
.nav-parent { position: relative; }
.nav-parent .nav-arrow {
  position: absolute;
  right: 15px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 11px;
  color: rgba(255,255,255,.4);
  transition: transform 0.25s;
}
.nav-parent.expanded .nav-arrow,
.nav-parent.active .nav-arrow { transform: translateY(-50%) rotate(90deg); }
.nav-link-vcm .title { flex: 1; }

.sub-menu {
  list-style: none;
  padding: 0;
  margin: 0;
  display: none;
  background: var(--sidebar-sub);
  border-top: 1px solid rgba(255,255,255,.06);
}
.sub-menu.open { display: block; }
.sub-menu li a {
  display: block;
  padding: 9px 15px 9px 42px;
  color: rgba(255,255,255,.75);
  text-decoration: none;
  font-size: 13px;
  transition: background 0.15s;
}
.sub-menu li a:hover { background: var(--sidebar-hover); color: #fff; }
.sub-menu li.active a { color: #fff; background: var(--sidebar-hover); }
.sub-menu li a i { font-size: 10px; margin-right: 8px; color: rgba(255,255,255,.4); }

/* =========================
   Main Layout
   ========================= */
.main {
  margin-left: var(--sidebar-w);
  min-height: 100vh;
}

.topbar {
  height: 54px;
  background: #f1f1f1;
  border-bottom: 1px solid #d0d0d0;
  box-shadow: 1px 1px 2px rgba(0,0,0,0.05);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 20px;
}

.page-title {
  margin: 0;
  font-size: 22px;
  line-height: 1.5;
  font-weight: 600;
  letter-spacing: normal;
  font-family: 'Noto Sans', sans-serif;
  color: #333;
}

.breadcrumbs {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 9px;
  color: var(--gray-600);
  font-size: 14px;
  font-weight: 550;
}

.breadcrumbs span:last-child {
  color: #418BCA;
  font-weight: 600;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 15px;
}

.search {
  width: 220px;
  height: 34px;
  border: 1px solid var(--gray-300);
  border-radius: 7px;
  background: #fff;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 10px;
  color: var(--gray-500);
}

.search input {
  border: 0;
  outline: 0;
  width: 100%;
  font-size: 14px;
  color: var(--gray-700);
  background: transparent;
}

.top-icon {
  width: 38px;
  height: 38px;
  border: 0;
  background: transparent;
  border-radius: 999px;
  position: relative;
  display: grid;
  place-items: center;
  font-size: 20px;
  color: #0f172a;
  cursor: pointer;
}

.top-icon:hover { background: #f1f5f9; }

.alert-count {
  position: absolute;
  top: 1px;
  right: 0;
  min-width: 18px;
  height: 16px;
  border-radius: 50%;
  background: #EF6F6C;
  color: #fff;
  border: none;
  font-size: 10px;
  font-weight: 600;
  display: grid;
  place-items: center;
  padding: 0 2px;
}

.avatar {
  width: 35px;
  height: 35px;
  border-radius: 50%;
  background: #418BCA;
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 13px;
}

.content {
  padding: 15px 18px 24px;
}

.toolbar {
  height: auto;
  min-height: 44px;
  padding: 8px 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

/* =========================
   Buttons
   ========================= */
.btn-vcm {
  height: 32px;
  border-radius: 4px;
  border: 1px solid var(--gray-300);
  background: #fff;
  color: var(--gray-900);
  padding: 0 16px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  box-shadow: none;
  cursor: pointer;
  font-size: 13px;
  transition: background var(--transition), border-color var(--transition);
}

.btn-vcm:hover { background: var(--gray-100); }

.btn-vcm.primary {
  border-color: #418BCA;
  background: #418BCA;
  color: #fff;
  box-shadow: none;
}

.btn-vcm.primary:hover {
  background: #3478b0;
  border-color: #3478b0;
}

.btn-vcm.danger {
  border-color: #EF6F6C;
  background: #EF6F6C;
  color: #fff;
}
.btn-vcm.danger:hover { background: #e85e5b; border-color: #e85e5b; }

.btn-vcm.success {
  border-color: #01BC8C;
  background: #01BC8C;
  color: #fff;
}
.btn-vcm.success:hover { background: #1bc398; border-color: #1bc398; }

.btn-vcm.warning {
  border-color: #F89A14;
  background: #F89A14;
  color: #fff;
}
.btn-vcm.warning:hover { background: #e08a0c; border-color: #e08a0c; }

.btn-vcm.info {
  border-color: #67C5DF;
  background: #67C5DF;
  color: #fff;
}
.btn-vcm.info:hover { background: #42aaca; border-color: #42aaca; }

/* =========================
   Cards
   ========================= */
.card-vcm {
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 0;
  box-shadow: none;
}

/* Josh-style colored card headers */
.card-header-primary { background: #418BCA; color: #fff; padding: 10px 15px; font-size: 15px; font-weight: 600; font-family: 'Noto Sans', sans-serif; }
.card-header-success { background: #01BC8C; color: #fff; padding: 10px 15px; font-size: 15px; font-weight: 600; font-family: 'Noto Sans', sans-serif; }
.card-header-warning { background: #F89A14; color: #fff; padding: 10px 15px; font-size: 15px; font-weight: 600; font-family: 'Noto Sans', sans-serif; }
.card-header-danger  { background: #EF6F6C; color: #fff; padding: 10px 15px; font-size: 15px; font-weight: 600; font-family: 'Noto Sans', sans-serif; }
.card-header-info    { background: #67C5DF; color: #fff; padding: 10px 15px; font-size: 15px; font-weight: 600; font-family: 'Noto Sans', sans-serif; }
.card-header-default { background: #A9B6BC; color: #fff; padding: 10px 15px; font-size: 15px; font-weight: 600; font-family: 'Noto Sans', sans-serif; }

/* Josh-style colored panel header bars (used on all pages) */
.pnl-head-bar { padding: 10px 15px; font-size: 15px; font-weight: 600; color: #fff; font-family: 'Noto Sans', sans-serif; }
.pnl-head-bar.blue   { background: #418BCA; }
.pnl-head-bar.green  { background: #01BC8C; }
.pnl-head-bar.red    { background: #EF6F6C; }
.pnl-head-bar.orange { background: #F89A14; }
.pnl-head-bar.info   { background: #67C5DF; }
.pnl-head-bar.purple { background: #7C3B97; }
.pnl-head-bar i { margin-right: 6px; }

/* =========================
   Vendor Header Card
   ========================= */
.vendor-card {
  min-height: 155px;
  padding: 26px 24px;
  margin-bottom: 16px;
}

.vendor-layout {
  display: grid;
  grid-template-columns: 88px minmax(340px, 1fr) 142px 120px 245px 120px 160px;
  align-items: center;
  gap: 0;
}

.vendor-initials {
  width: 77px;
  height: 77px;
  border-radius: 999px;
  background: #d6e8f7;
  color: #418BCA;
  display: grid;
  place-items: center;
  font-size: 28px;
  font-weight: 700;
}

.vendor-name-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.vendor-name {
  margin: 0;
  font-size: 24px;
  line-height: 1.1;
  font-weight: 700;
  letter-spacing: -.45px;
}

.status-active {
  border-radius: 4px;
  background: #01BC8C;
  color: #fff;
  border: none;
  padding: 5px 11px;
  font-size: 12px;
  font-weight: 600;
}

.status-inactive {
  border-radius: 4px;
  background: #A9B6BC;
  color: #fff;
  border: none;
  padding: 5px 11px;
  font-size: 12px;
  font-weight: 600;
}

.vendor-meta {
  margin-top: 11px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 18px;
  color: var(--gray-700);
  font-size: 14px;
  font-weight: 500;
}

.vendor-info {
  min-height: 90px;
  border-left: 1px solid var(--gray-200);
  padding-left: 26px;
}

.info-label {
  color: var(--gray-600);
  font-size: 13px;
  font-weight: 650;
  margin-bottom: 8px;
}

.info-value {
  color: #0f172a;
  font-size: 14px;
  font-weight: 700;
}

.small-muted {
  color: var(--gray-500);
  font-size: 12px;
  font-weight: 650;
  margin-top: 4px;
}

.period-btn {
  margin-top: 16px;
  height: 37px;
  border-radius: 8px;
  border: 1px solid var(--gray-300);
  background: #fff;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  font-weight: 600;
  color: var(--gray-700);
  cursor: pointer;
  font-size: 13px;
}

.period-btn:hover { background: var(--gray-100); }

/* =========================
   Metric Cards
   ========================= */
.metric-grid {
  display: grid;
  grid-template-columns: 1.55fr repeat(5, 1fr);
  gap: 12px;
  margin-bottom: 16px;
}

.metric-card {
  min-height: 180px;
  padding: 14px 14px 12px;
}

.metric-title {
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 10px;
  color: #101828;
}

.score-gauge {
  position: relative;
  width: 100%;
  height: 109px;
  margin-top: 2px;
}

.score-gauge svg {
  width: 100%;
  max-width: 230px;
  height: 120px;
  display: block;
  margin: 0 auto;
}

.score-number {
  position: absolute;
  left: 0;
  right: 0;
  top: 45px;
  text-align: center;
  color: #101828;
  font-size: 44px;
  line-height: 1;
  font-weight: 700;
  letter-spacing: -1px;
}

.score-number small {
  font-size: 13px;
  color: var(--gray-700);
  font-weight: 600;
  margin-left: 2px;
}

.score-word {
  text-align: center;
  font-size: 16px;
  font-weight: 700;
  margin-top: 3px;
}

.score-word.excellent { color: #01BC8C; }
.score-word.good      { color: #418BCA; }
.score-word.fair      { color: #F89A14; }
.score-word.at-risk   { color: #EF6F6C; }
.score-word.critical  { color: #7C3B97; }

.metric-main {
  display: flex;
  align-items: center;
  gap: 13px;
  margin-top: 20px;
}

.metric-icon {
  width: 43px;
  height: 43px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  font-size: 22px;
  font-weight: 800;
  flex: 0 0 auto;
}

.metric-icon.green  { background: #d4f5ea; color: #01BC8C; }
.metric-icon.blue   { background: #d6e8f7; color: #418BCA; }
.metric-icon.orange { background: #fef0d5; color: #F89A14; }
.metric-icon.red    { background: #fde0df; color: #EF6F6C; }
.metric-icon.purple { background: #f0e0f7; color: #7C3B97; }

.metric-value {
  color: #101828;
  font-size: 28px;
  line-height: 1;
  font-weight: 700;
  letter-spacing: -.5px;
}

.metric-value.orange { color: #F89A14; }
.metric-value.red    { color: #EF6F6C; }

.metric-sub {
  margin-top: 15px;
  display: flex;
  gap: 6px;
  align-items: center;
  font-size: 13px;
  color: var(--gray-700);
}

.up     { color: #01BC8C; font-weight: 700; }
.down   { color: #EF6F6C; font-weight: 700; }
.purple { color: #7C3B97; font-weight: 700; }

.spark {
  width: 100%;
  height: 54px;
  margin-top: 10px;
}

.spark path {
  fill: none;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* =========================
   Lower panels (Score Breakdown, Trend, Issues)
   ========================= */
.lower-grid {
  display: grid;
  grid-template-columns: 1.08fr 1.12fr .92fr;
  gap: 16px;
  margin-bottom: 16px;
}

.panel {
  min-height: 240px;
  padding: 14px 16px;
}

.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.panel-title {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
}

/* Score Breakdown */
.score-breakdown-row {
  display: grid;
  grid-template-columns: minmax(210px, 1fr) 150px 68px;
  gap: 12px;
  align-items: center;
  margin-bottom: 12px;
}

.breakdown-label {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--gray-800);
  font-size: 14px;
  white-space: nowrap;
}

.mini-icon {
  width: 18px;
  height: 18px;
  display: inline-grid;
  place-items: center;
  font-weight: 700;
}

.mini-icon.blue   { color: #418BCA; }
.mini-icon.pink   { color: #E16E92; }
.mini-icon.red    { color: #EF6F6C; }
.mini-icon.cyan   { color: #67C5DF; }
.mini-icon.teal   { color: #39C3A9; }
.mini-icon.green  { color: #01BC8C; }
.mini-icon.sky    { color: #67C5DF; }
.mini-icon.orange { color: #F89A14; }

.bar {
  height: 7px;
  border-radius: 999px;
  background: #e5e7eb;
  overflow: hidden;
}

.bar span {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: #01BC8C;
}

.breakdown-score {
  color: var(--gray-700);
  text-align: right;
  font-size: 13px;
  font-weight: 600;
}

.score-footnote {
  color: var(--gray-500);
  text-align: center;
  font-size: 13px;
  margin-top: 8px;
}

/* Charts */
.chart-svg {
  width: 100%;
  height: 232px;
  display: block;
}

.chart-grid {
  stroke: #e5e7eb;
  stroke-width: 1;
}

.chart-label {
  font-size: 12px;
  fill: var(--gray-600);
}

.chart-line {
  fill: none;
  stroke: #418BCA;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.chart-point {
  fill: #418BCA;
  stroke: #fff;
  stroke-width: 2;
}

/* Issue Distribution */
.issue-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  align-items: center;
}

.donut-svg {
  width: 100%;
  height: 220px;
  display: block;
}

.legend {
  display: flex;
  flex-direction: column;
  gap: 13px;
  font-size: 13px;
  color: var(--gray-700);
}

.legend-row {
  display: grid;
  grid-template-columns: 14px 1fr auto;
  gap: 9px;
  align-items: center;
}

.legend-dot {
  width: 12px;
  height: 12px;
  border-radius: 999px;
}

.legend-value {
  font-weight: 600;
  color: var(--gray-800);
}

.click-note {
  color: var(--gray-500);
  text-align: center;
  margin-top: 7px;
  font-size: 13px;
}

/* =========================
   Tables
   ========================= */
.table-card {
  overflow: hidden;
}

.table-top {
  padding: 12px 15px;
  border-bottom: 1px solid #ddd;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.link-vcm {
  color: #418BCA;
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
}

.link-vcm:hover { text-decoration: underline; }

table { width: 100%; border-collapse: collapse; }

.vcm-table th {
  padding: 10px 12px;
  border-bottom: 1px solid #ddd;
  color: #666;
  font-size: 14px;
  font-weight: 600;
  background: #f5f5f5;
  text-align: left;
  white-space: nowrap;
}

.vcm-table td {
  padding: 8px 12px;
  border-bottom: 1px solid #eee;
  font-size: 13px;
  color: #444;
  vertical-align: middle;
}

.vcm-table tbody tr:last-child td { border-bottom: 0; }
.vcm-table tbody tr:hover { background: #f0f7ff; }
.vcm-table .clickable { cursor: pointer; }

/* DataTables-style table controls */
.table-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 15px;
  flex-wrap: wrap;
  gap: 10px;
}

.table-controls .show-entries {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: #666;
}

.table-controls .show-entries select {
  height: 30px;
  border: 1px solid #ddd;
  border-radius: 4px;
  padding: 0 8px;
  font-size: 13px;
  background: #fff;
}

.table-controls .search-box {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: #666;
}

.table-controls .search-box input {
  height: 30px;
  border: 1px solid #ddd;
  border-radius: 4px;
  padding: 0 10px;
  font-size: 13px;
  width: 200px;
  outline: none;
}

.table-controls .search-box input:focus {
  border-color: #418BCA;
}

.table-info {
  padding: 10px 15px;
  font-size: 13px;
  color: #666;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

/* Sortable column headers */
.vcm-table th.sortable {
  cursor: pointer;
  user-select: none;
  padding-right: 20px;
  position: relative;
}

.vcm-table th.sortable::after {
  font-family: 'bootstrap-icons';
  content: '\F127';
  position: absolute;
  right: 6px;
  color: #bbb;
  font-size: 12px;
}

.vcm-table th.sortable.asc::after { font-family: 'bootstrap-icons'; content: '\F235'; color: #418BCA; }
.vcm-table th.sortable.desc::after { font-family: 'bootstrap-icons'; content: '\F234'; color: #418BCA; }

/* Status pills */
.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 22px;
  border-radius: 3px;
  padding: 3px 10px;
  font-size: 12px;
  font-weight: 600;
  color: #fff;
}

.pill.green  { background: #01BC8C; }
.pill.orange { background: #F89A14; }
.pill.red    { background: #EF6F6C; }
.pill.blue   { background: #418BCA; }
.pill.purple { background: #7C3B97; }
.pill.gray   { background: #A9B6BC; }

.issue-orange { color: #F89A14; font-weight: 700; }
.issue-red    { color: #EF6F6C; font-weight: 700; }

.table-note {
  text-align: center;
  color: var(--gray-500);
  padding: 11px 20px 16px;
  font-size: 13px;
}

/* =========================
   Dashboard KPI Grid
   ========================= */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 15px;
  margin-bottom: 20px;
}

.kpi-card {
  padding: 15px 20px;
  min-height: 100px;
  border-radius: 4px;
  color: #fff;
  position: relative;
  overflow: hidden;
}

.kpi-card.blue   { background: #418BCA; border: none; }
.kpi-card.red    { background: #EF6F6C; border: none; }
.kpi-card.orange { background: #F89A14; border: none; }
.kpi-card.green  { background: #01BC8C; border: none; }
.kpi-card.cyan   { background: #67C5DF; border: none; }
.kpi-card.purple { background: #7C3B97; border: none; }
.kpi-card.dark   { background: #363A49; border: none; }

.kpi-label {
  font-size: 12px;
  font-weight: 400;
  color: rgba(255,255,255,.85);
  margin-bottom: 6px;
}

.kpi-value {
  font-size: 30px;
  font-weight: 700;
  letter-spacing: normal;
  line-height: 1;
  color: #fff;
}

/* Override colored values — on colored cards everything is white */
.kpi-value.green, .kpi-value.orange, .kpi-value.red, .kpi-value.blue { color: #fff; }

.kpi-footer {
  margin-top: 10px;
  font-size: 12px;
  color: rgba(255,255,255,.75);
  font-weight: 400;
}

.kpi-icon {
  position: absolute;
  right: 15px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 50px;
  opacity: 0.25;
  color: #fff;
}

/* =========================
   Filter Tabs / Bar
   ========================= */
.filter-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.filter-tab {
  height: 34px;
  padding: 0 14px;
  border-radius: 4px;
  border: 1px solid #ddd;
  background: #fff;
  font-size: 13px;
  font-weight: 600;
  color: #666;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: background 0.15s;
}

.filter-tab:hover { background: #eee; }

.filter-tab.active {
  background: #418BCA;
  border-color: #418BCA;
  color: #fff;
}

/* =========================
   Pagination
   ========================= */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 14px 20px;
}

.page-btn {
  min-width: 34px;
  height: 34px;
  border-radius: 4px;
  border: 1px solid #ddd;
  background: #fff;
  font-size: 13px;
  font-weight: 600;
  color: #666;
  cursor: pointer;
  display: inline-grid;
  place-items: center;
  transition: background 0.15s, color 0.15s;
}

.page-btn:hover { background: #eee; color: #333; }

.page-btn.active {
  background: #418BCA;
  border-color: #418BCA;
  color: #fff;
}

.page-btn:disabled { opacity: .4; cursor: default; }

/* =========================
   Form Fields (shared)
   ========================= */
.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}

.field-group {
  margin-bottom: 0;
}

.field-group label,
.field-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--gray-700);
  margin-bottom: 6px;
}

.field-input,
.field-select {
  width: 100%;
  height: 38px;
  border: 1px solid #ddd;
  border-radius: 4px;
  padding: 0 12px;
  font-size: 14px;
  color: #333;
  outline: none;
  background: #fff;
  font-family: inherit;
}

/* Josh-style input group with icon addon */
.input-icon-group {
  display: flex;
  align-items: stretch;
}
.input-icon-group .input-addon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  background: #f5f5f5;
  border: 1px solid #ddd;
  border-right: none;
  border-radius: 4px 0 0 4px;
  color: #666;
  font-size: 15px;
  flex-shrink: 0;
}
.input-icon-group .field-input,
.input-icon-group .field-select {
  border-radius: 0 4px 4px 0;
}

textarea.field-input {
  height: auto;
  padding: 10px 12px;
}

.field-input:focus,
.field-select:focus {
  border-color: #418BCA;
  box-shadow: 0 0 0 2px rgba(65,139,202,0.15);
}

.field-select {
  appearance: auto;
  cursor: pointer;
}

/* Alert messages */
.alert-msg {
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 14px;
  display: none;
}

.alert-msg.show { display: block; }
.alert-msg.success { background: #d4f5ea; color: #01BC8C; }
.alert-msg.error   { background: #fde0df; color: #EF6F6C; }

/* Config card (expandable) */
.config-item {
  border: 1px solid var(--gray-200);
  border-radius: 10px;
  padding: 14px 18px;
  margin-bottom: 10px;
  background: #fff;
  transition: border-color .15s, box-shadow .15s;
}

.config-item:hover {
  border-color: var(--gray-300);
  box-shadow: var(--shadow-card);
}

.config-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  cursor: pointer;
}

.config-detail {
  display: none;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--gray-200);
}

.config-detail.open { display: block; }

/* Spec table (key-value) */
.spec-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.spec-table th,
.spec-table td {
  padding: 6px 10px;
  text-align: left;
  border-bottom: 1px solid #f0f3f7;
}

.spec-table th {
  font-weight: 700;
  color: var(--gray-600);
  width: 180px;
}

.spec-table td code {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  color: var(--gray-800);
}

@media (max-width: 768px) {
  .field-row { grid-template-columns: 1fr; }
}

/* =========================
   Login Page
   ========================= */
.login-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #515763 0%, #363A49 100%) !important;
}

.login-card {
  width: 420px;
  background: #fff;
  border-radius: 4px;
  box-shadow: 0 8px 30px rgba(0,0,0,.30);
  padding: 40px 35px;
}

.login-card .brand-shield {
  width: 52px;
  height: 52px;
  font-size: 30px;
  border-color: #418BCA;
  color: #418BCA;
  margin: 0 auto;
}

.login-card h1 {
  text-align: center;
  font-size: 24px;
  font-weight: 600;
  margin: 18px 0 6px;
  letter-spacing: normal;
  font-family: 'Noto Sans', sans-serif;
}

.login-card .subtitle {
  text-align: center;
  color: #999;
  font-size: 14px;
  margin-bottom: 28px;
}

.form-group {
  margin-bottom: 18px;
}

.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--gray-700);
  margin-bottom: 6px;
}

.form-input {
  width: 100%;
  height: 44px;
  border: 1px solid var(--gray-300);
  border-radius: 8px;
  padding: 0 14px;
  font-size: 14px;
  color: var(--gray-900);
  outline: none;
  background: #fff;
}

.form-input:focus {
  border-color: #418BCA;
  box-shadow: 0 0 0 2px rgba(65,139,202,0.15);
}

.login-btn {
  width: 100%;
  height: 44px;
  border: 0;
  border-radius: 4px;
  background: #01BC8C;
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: none;
  margin-top: 8px;
  transition: background 0.2s;
}

.login-btn:hover { background: #1bc398; }
.login-btn:disabled { opacity: .6; cursor: not-allowed; }

.login-error {
  margin-top: 14px;
  padding: 10px 14px;
  border-radius: 4px;
  background: #fde0df;
  color: #EF6F6C;
  font-size: 13px;
  font-weight: 600;
  display: none;
}

/* =========================
   Score Badge (inline)
   ========================= */
.score-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
}

.score-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
}

.score-dot.excellent { background: #01BC8C; }
.score-dot.good      { background: #418BCA; }
.score-dot.fair      { background: #F89A14; }
.score-dot.at-risk   { background: #EF6F6C; }
.score-dot.critical  { background: #7C3B97; }

/* =========================
   Progress bar (inline in table)
   ========================= */
.progress-bar-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}

.progress-track {
  flex: 1;
  height: 6px;
  background: #e5e7eb;
  border-radius: 999px;
  overflow: hidden;
  min-width: 60px;
}

.progress-fill {
  height: 100%;
  border-radius: 999px;
  background: #01BC8C;
}

.progress-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--gray-800);
  min-width: 42px;
}

/* =========================
   Enterprise Table Features
   ========================= */
.vcm-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #f5f5f5;
  box-shadow: 0 1px 0 #ddd;
}

.table-responsive {
  max-height: 520px;
  overflow-y: auto;
  overflow-x: auto;
}

.table-responsive::-webkit-scrollbar { width: 6px; height: 6px; }
.table-responsive::-webkit-scrollbar-thumb { background: var(--gray-300); border-radius: 99px; }

/* Row hover highlight */
.vcm-table tbody tr:hover { background: #e8f0fe !important; }

/* Alternating row colors for readability */
.vcm-table tbody tr:nth-child(even) { background: #f9f9f9; }

/* Frozen first column for wide tables */
.freeze-col th:first-child,
.freeze-col td:first-child {
  position: sticky;
  left: 0;
  z-index: 1;
  background: #fff;
  box-shadow: 2px 0 4px rgba(0,0,0,.04);
}
.freeze-col tbody tr:nth-child(even) td:first-child { background: #fafbfc; }
.freeze-col tbody tr:hover td:first-child { background: #f0f7ff !important; }

/* =========================
   SVG Icon System
   ========================= */
.icon { width:16px; height:16px; display:inline-block; vertical-align:middle; flex-shrink:0; }
.icon svg { width:100%; height:100%; fill:none; stroke:currentColor; stroke-width:2; stroke-linecap:round; stroke-linejoin:round; }
.icon-sm { width:14px; height:14px; }
.icon-lg { width:20px; height:20px; }

/* =========================
   Empty State
   ========================= */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--gray-500);
}

.empty-state .empty-icon {
  font-size: 48px;
  margin-bottom: 16px;
  opacity: .5;
}

.empty-state h3 {
  font-size: 18px;
  font-weight: 800;
  color: var(--gray-700);
  margin-bottom: 8px;
}

/* =========================
   Loading Spinner
   ========================= */
.spinner {
  width: 36px;
  height: 36px;
  border: 3px solid #ddd;
  border-top-color: #418BCA;
  border-radius: 999px;
  animation: spin .7s linear infinite;
  margin: 40px auto;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* =========================
   Toast Notifications
   ========================= */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.toast {
  min-width: 280px;
  max-width: 380px;
  padding: 13px 16px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  font-weight: 700;
  box-shadow: 0 8px 30px rgba(0,0,0,.15);
  pointer-events: all;
  transform: translateX(120%);
  transition: transform .25s cubic-bezier(.22,1,.36,1), opacity .2s;
  opacity: 0;
}

.toast.toast-in {
  transform: translateX(0);
  opacity: 1;
}

.toast.toast-out {
  transform: translateX(120%);
  opacity: 0;
}

.toast.success {
  background: #d4f5ea;
  color: #01BC8C;
  border: 1px solid #01BC8C;
}

.toast.error {
  background: #fde0df;
  color: #EF6F6C;
  border: 1px solid #EF6F6C;
}

.toast.info {
  background: #d6e8f7;
  color: #418BCA;
  border: 1px solid #418BCA;
}

.toast-icon {
  font-size: 16px;
  flex-shrink: 0;
}

.toast-msg { flex: 1; line-height: 1.4; }

.toast-close {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 16px;
  color: inherit;
  opacity: .6;
  padding: 0;
  line-height: 1;
}

.toast-close:hover { opacity: 1; }

/* =========================
   Live Pulse Dot
   ========================= */
.live-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #01BC8C;
  margin-right: 6px;
  vertical-align: middle;
  position: relative;
}

.live-dot::after {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  background: #01BC8C;
  opacity: .4;
  animation: pulse-ring 1.6s ease-out infinite;
}

@keyframes pulse-ring {
  0%   { transform: scale(.7); opacity: .4; }
  70%  { transform: scale(1.6); opacity: 0; }
  100% { transform: scale(1.6); opacity: 0; }
}

/* =========================
   Bulk Action Bar
   ========================= */
.bulk-bar {
  display: none;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  background: #d6e8f7;
  border: 1px solid #418BCA;
  border-radius: 4px;
  margin-bottom: 10px;
  font-size: 13px;
  font-weight: 600;
  color: #418BCA;
}

.bulk-bar.visible { display: flex; }

.bulk-bar-label { flex: 1; }

/* Row checkbox styles */
.row-check {
  width: 15px;
  height: 15px;
  cursor: pointer;
  accent-color: #418BCA;
}

/* =========================
   Profile Page
   ========================= */
.profile-grid {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 20px;
  align-items: start;
}

.profile-avatar-card {
  padding: 28px 24px;
  text-align: center;
}

.profile-avatar-lg {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  background: #418BCA;
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 34px;
  font-weight: 700;
  margin: 0 auto 14px;
  border: 4px solid rgba(65,139,202,0.3);
}

.profile-name { font-size: 18px; font-weight: 700; margin: 0 0 4px; }
.profile-email { font-size: 13px; color: var(--gray-500); }
.profile-role {
  display: inline-block;
  margin-top: 10px;
  padding: 4px 12px;
  border-radius: 4px;
  background: #418BCA;
  color: #fff;
  font-size: 12px;
  font-weight: 600;
}

.profile-section { padding: 24px; margin-bottom: 16px; }
.profile-section h3 { font-size: 15px; font-weight: 700; margin: 0 0 18px; padding-bottom: 10px; border-bottom: 1px solid var(--gray-200); }

@media (max-width: 900px) {
  .profile-grid { grid-template-columns: 1fr; }
}

/* =========================
   Responsive
   ========================= */
@media (max-width: 1450px) {
  :root { --sidebar-w: 230px; }
  .brand-name { font-size: 19px; }
  .nav-link-vcm { font-size: 12.5px; height: 36px; }
  .vendor-layout {
    grid-template-columns: 60px minmax(200px, 1fr) repeat(3, 120px);
    row-gap: 14px;
  }
  .vendor-info:nth-last-child(-n+2) { grid-column: span 1; }
  .metric-grid { grid-template-columns: repeat(3, 1fr); }
  .lower-grid  { grid-template-columns: 1fr; }
  .kpi-grid    { grid-template-columns: repeat(4, 1fr); }
}

@media (max-width: 1280px) {
  :root { --sidebar-w: 210px; }
  .brand-name { font-size: 17px; }
  .brand-sub { display: none; }
  .content { padding: 15px 14px 20px; }
  .topbar { padding: 8px 14px; height: 50px; }
  .page-title { font-size: 18px; }
  .kpi-grid { grid-template-columns: repeat(4, 1fr); }
}

@media (max-width: 992px) {
  .sidebar { position: static; width: 100%; min-height: auto; }
  .sidebar-nav, .sidebar-footer { display: none; }
  .main { margin-left: 0; }
  .topbar { height: auto; flex-direction: column; align-items: flex-start; gap: 16px; }
  .top-actions { width: 100%; flex-wrap: wrap; }
  .search { width: min(100%, 320px); }
  .content { padding: 15px 16px 24px; }
  .toolbar { justify-content: flex-start; }
  .vendor-layout { grid-template-columns: 1fr; gap: 16px; }
  .vendor-info { border-left: 0; padding-left: 0; }
  .metric-grid { grid-template-columns: 1fr; }
  .kpi-grid    { grid-template-columns: 1fr; }
  .issue-layout { grid-template-columns: 1fr; }
  .vcm-table { min-width: 980px; }
}
