/* ═══════════════════════════════════════════
   HELIOS — Two-Level Nav with Collapsible Primary
   IBM Plex Sans · Light Theme (g10)
   ═══════════════════════════════════════════ */

/* Hide everything until app state is determined */
body.he-loading > * { visibility: hidden !important; }
body.he-loading { background: #f4f4f4; }

:root {
  --cds-background:            #f4f4f4;
  --cds-layer-01:              #ffffff;
  --cds-layer-02:              #f4f4f4;
  --cds-layer-hover-01:        #e8e8e8;
  --cds-layer-active-01:       #c6c6c6;
  --cds-border-subtle-00:      #e0e0e0;
  --cds-border-subtle-01:      #c6c6c6;
  --cds-border-strong-01:      #8d8d8d;
  --cds-text-primary:          #161616;
  --cds-text-secondary:        #525252;
  --cds-text-placeholder:      #a8a8a8;
  --cds-text-on-color:         #ffffff;
  --cds-text-helper:           #6f6f6f;
  --cds-link-primary:          #0f62fe;
  --cds-link-primary-hover:    #0043ce;
  --cds-interactive:           #0f62fe;
  --cds-interactive-hover:     #0353e9;
  --cds-support-error:         #da1e28;
  --cds-support-success:       #198038;
  --cds-support-warning:       #f1c21b;
  --cds-support-info:          #0043ce;

  --he-header-h:     48px;
  --he-nav-w:        256px;
  --he-nav-w-collapsed: 48px;
  --he-submenu-w:    240px;

  --font-sans: 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'IBM Plex Mono', monospace;

  /* Legacy aliases */
  --he-bg: var(--cds-layer-01); --he-bg-hover: var(--cds-layer-hover-01);
  --he-bg-subtle: var(--cds-layer-02); --he-border: var(--cds-border-subtle-00);
  --he-border-strong: var(--cds-border-strong-01); --he-text-01: var(--cds-text-primary);
  --he-text-02: var(--cds-text-secondary); --he-text-03: var(--cds-text-placeholder);
  --he-text-inverse: var(--cds-text-on-color); --he-interactive: var(--cds-interactive);
  --he-danger: var(--cds-support-error); --he-success: var(--cds-support-success);
  --he-warning: var(--cds-support-warning); --he-info: var(--cds-support-info);
}

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

body {
  font-family: var(--font-sans);
  font-size: 14px; line-height: 1.43; letter-spacing: 0.16px;
  color: var(--cds-text-primary); background: var(--cds-background);
  overflow: hidden;
}

/* ═══════════════════════════════════════════
   Header (48px black bar)
   ═══════════════════════════════════════════ */
.he-header {
  position: fixed; top: 0; left: 0; right: 0;
  height: var(--he-header-h); background: #161616;
  display: flex; align-items: center; z-index: 9000;
}
.he-header__menu-btn {
  width: 48px; height: 48px; display: flex; align-items: center; justify-content: center;
  background: none; border: none; color: #c6c6c6; cursor: pointer;
  transition: background 0.11s; flex-shrink: 0;
}
.he-header__menu-btn:hover { background: #353535; }
.he-header__brand {
  display: flex; align-items: center; gap: 8px; padding: 0 16px 0 0;
  text-decoration: none; color: #f4f4f4; height: 100%; flex-shrink: 0;
}
.he-header__name { font-size: 14px; font-weight: 600; letter-spacing: 0.1px; }
.he-header__meta { display: flex; align-items: center; height: 100%; }
.he-header__separator { width: 1px; height: 100%; background: #393939; }
.he-header__domain {
  font-size: 12px; color: #c6c6c6; padding: 0 16px; height: 100%;
  display: flex; align-items: center; font-family: var(--font-mono); letter-spacing: 0.32px;
}
.he-header__status {
  display: flex; align-items: center; gap: 6px; padding: 0 16px;
  font-size: 12px; color: #a8a8a8; border-left: 1px solid #393939; height: 100%;
}
.he-status-dot { width: 8px; height: 8px; border-radius: 50%; background: #a8a8a8; }
.he-status-dot--ok { background: #42be65; }
.he-status-dot--err { background: var(--cds-support-error); }
.he-header__action {
  width: 48px; height: 48px; display: flex; align-items: center; justify-content: center;
  background: none; border: none; color: #c6c6c6; cursor: pointer; transition: background 0.11s;
}
.he-header__action:hover { background: #353535; color: #f4f4f4; }

/* ═══════════════════════════════════════════
   Primary Nav (1단 메뉴) — Collapsible
   ═══════════════════════════════════════════ */
.he-nav {
  position: fixed;
  top: var(--he-header-h); left: 0; bottom: 0;
  width: var(--he-nav-w);
  background: #ffffff;
  border-right: 1px solid var(--cds-border-subtle-00);
  display: flex; flex-direction: column;
  z-index: 8000;
  overflow: hidden;
  transition: width 0.2s ease;
}
/* Init: suppress ALL transitions until app.js is ready */
.he-no-transition, .he-no-transition *, .he-no-transition *::before, .he-no-transition *::after {
  transition: none !important;
}

.he-nav--collapsed {
  width: var(--he-nav-w-collapsed);
}
.he-nav__items {
  flex: 1; overflow-y: auto; overflow-x: hidden;
  padding: 8px 0;
}

/* Section label (e.g., "DIRECTORY", "SECURITY") */
.he-nav__section {
  font-size: 11px; font-weight: 600; letter-spacing: 0.32px;
  color: var(--cds-text-placeholder);
  padding: 20px 16px 4px;
  text-transform: uppercase;
  white-space: nowrap; overflow: hidden;
  transition: opacity 0.15s;
}
.he-nav--collapsed .he-nav__section {
  opacity: 0; height: 0; padding: 0; margin: 0; overflow: hidden;
}

/* Nav item: icon + label + desc */
.he-nav__item {
  display: flex; align-items: center; gap: 12px;
  width: 100%; padding: 8px 12px;
  background: none; border: none;
  cursor: pointer; text-align: left;
  font-family: var(--font-sans);
  transition: background 0.11s;
  position: relative;
  min-height: 48px;
  border-radius: 0;
}
.he-nav__item:hover {
  background: var(--cds-layer-hover-01);
}
.he-nav__item--active {
  background: #d0e2ff;
}
.he-nav__item--active::before {
  content: ''; position: absolute;
  left: 0; top: 0; bottom: 0; width: 3px;
  background: var(--cds-interactive);
}

.he-nav__icon {
  width: 24px; height: 24px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  color: var(--cds-text-secondary);
}
.he-nav__item--active .he-nav__icon { color: var(--cds-interactive); }

.he-nav__text {
  display: flex; flex-direction: column; min-width: 0;
  overflow: hidden;
  transition: opacity 0.15s, width 0.2s;
}
.he-nav--collapsed .he-nav__text {
  opacity: 0; width: 0; overflow: hidden;
}

.he-nav__label {
  font-size: 14px; font-weight: 500; color: var(--cds-text-primary);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  line-height: 1.3;
}
.he-nav__item--active .he-nav__label { color: var(--cds-interactive); font-weight: 600; }

.he-nav__desc {
  font-size: 12px; color: var(--cds-text-secondary);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  line-height: 1.3; margin-top: 1px;
}

/* Nav footer */
.he-nav__footer {
  border-top: 1px solid var(--cds-border-subtle-00);
  padding: 4px 0 8px;
}
.he-nav__version {
  font-size: 11px; color: var(--cds-text-placeholder);
  font-family: var(--font-mono);
  padding: 4px 16px;
  white-space: nowrap; overflow: hidden;
  transition: opacity 0.15s;
}
.he-nav--collapsed .he-nav__version { opacity: 0; }

/* Tooltip on collapsed items */
.he-nav--collapsed .he-nav__item {
  justify-content: center;
  padding: 8px 0;
}
.he-nav--collapsed .he-nav__item .he-nav__icon {
  margin: 0;
}

/* ═══════════════════════════════════════════
   Sub-menu Panel (2단 메뉴) — context-dependent
   ═══════════════════════════════════════════ */
.he-submenu {
  position: fixed;
  top: var(--he-header-h);
  left: var(--he-nav-w);
  bottom: 0;
  width: var(--he-submenu-w);
  background: #ffffff;
  border-right: 1px solid var(--cds-border-subtle-00);
  z-index: 7000;
  overflow-y: auto;
  transition: left 0.2s ease, opacity 0.15s;
}
.he-submenu--hidden {
  opacity: 0; pointer-events: none;
  transform: translateX(-20px);
}
.he-nav--collapsed ~ .he-submenu {
  left: var(--he-nav-w-collapsed);
}

/* Submenu inner styles */
.he-submenu__title {
  font-size: 14px; font-weight: 600; color: var(--cds-text-primary);
  padding: 16px 16px 8px; letter-spacing: 0.16px;
}
.he-submenu__item {
  display: flex; align-items: center; gap: 12px;
  padding: 0 16px; height: 32px;
  font-size: 14px; color: var(--cds-text-secondary);
  cursor: pointer; transition: background 0.11s, color 0.11s;
  text-decoration: none; border: none; background: none;
  width: 100%; text-align: left;
  font-family: var(--font-sans); letter-spacing: 0.16px;
  position: relative;
}
.he-submenu__item:hover:not(.he-submenu__item--active) {
  background: var(--cds-layer-hover-01); color: var(--cds-text-primary);
}
.he-submenu__item--active {
  color: var(--cds-text-primary); font-weight: 600;
  background: var(--cds-layer-selected-01, #e0e0e0);
}
.he-submenu__item--active::before {
  content: ''; position: absolute;
  left: 0; top: 0; bottom: 0; width: 3px;
  background: var(--cds-interactive);
}
.he-submenu__item--active:hover {
  background: var(--cds-layer-selected-hover-01, #cacaca);
}
.he-submenu__badge {
  font-size: 12px; color: var(--cds-text-placeholder);
  margin-left: auto; font-weight: 400;
}
.he-submenu__divider { height: 1px; background: var(--cds-border-subtle-00); margin: 8px 0; }
.he-submenu__group {}
.he-submenu__group-header {
  display: flex; align-items: center; gap: 8px;
  padding: 0 16px; height: 32px;
  font-size: 14px; font-weight: 400; color: var(--cds-text-secondary);
  cursor: pointer; transition: background 0.11s; user-select: none;
}
.he-submenu__group-header:hover { background: var(--cds-layer-hover-01); color: var(--cds-text-primary); }
.he-submenu__group-icon { width: 16px; height: 16px; flex-shrink: 0; display: flex; align-items: center; }
.he-submenu__group-icon svg { width: 16px; height: 16px; fill: currentColor; }
.he-submenu__group-label { flex: 1; }
.he-submenu__group-chevron {
  width: 16px; height: 16px; transition: transform 0.15s; flex-shrink: 0; margin-left: auto;
}
.he-submenu__group--expanded > .he-submenu__group-header .he-submenu__group-chevron { transform: rotate(90deg); }
.he-submenu__group-items { display: none; padding-left: 16px; }
.he-submenu__group--expanded > .he-submenu__group-items { display: block; }
.he-submenu__external {
  width: 12px; height: 12px; margin-left: auto; color: var(--cds-text-placeholder); flex-shrink: 0;
}
.he-submenu__footer {
  padding: 12px 16px; border-top: 1px solid var(--cds-border-subtle-00); margin-top: auto;
}
.he-submenu__version { font-size: 11px; color: var(--cds-text-placeholder); font-family: var(--font-mono); }

/* ═══════════════════════════════════════════
   Main Content
   ═══════════════════════════════════════════ */
.he-main {
  position: fixed;
  top: var(--he-header-h);
  left: calc(var(--he-nav-w) + var(--he-submenu-w));
  right: 0; bottom: 0;
  overflow-y: auto;
  background: var(--cds-background);
  padding: 32px 40px;
  transition: left 0.2s ease;
}
/* When submenu is hidden */
.he-main--no-submenu {
  left: var(--he-nav-w);
}
/* When nav collapsed */
.he-nav--collapsed ~ .he-main {
  left: calc(var(--he-nav-w-collapsed) + var(--he-submenu-w));
}
.he-nav--collapsed ~ .he-main.he-main--no-submenu {
  left: var(--he-nav-w-collapsed);
}

/* ═══════════════════════════════════════════
   Page Header
   ═══════════════════════════════════════════ */
.he-page-header {
  display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 24px;
}
.he-page-title { font-size: 28px; font-weight: 400; color: var(--cds-text-primary); line-height: 1.29; }
.he-page-desc { font-size: 14px; color: var(--cds-text-secondary); margin-top: 8px; line-height: 1.43; }

/* ═══════════════════════════════════════════
   Stat Cards
   ═══════════════════════════════════════════ */
.he-stats {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1px; margin-bottom: 24px;
  background: var(--cds-border-subtle-00); border: 1px solid var(--cds-border-subtle-00);
}
.he-stat-card { background: var(--cds-layer-01); padding: 16px; transition: background 0.11s; }
.he-stat-card:hover { background: var(--cds-layer-hover-01); }
.he-stat-card__label { font-size: 12px; color: var(--cds-text-secondary); letter-spacing: 0.32px; margin-bottom: 4px; }
.he-stat-card__value { font-size: 36px; font-weight: 300; color: var(--cds-text-primary); line-height: 1.17; }
.he-stat-card__sub { font-size: 12px; color: var(--cds-text-helper); margin-top: 4px; }

/* ═══════════════════════════════════════════
   Data Table
   ═══════════════════════════════════════════ */
.he-table-toolbar {
  display: flex; align-items: center; justify-content: space-between;
  background: var(--cds-layer-01); min-height: 48px;
  border: 1px solid var(--cds-border-subtle-00); border-bottom: none;
}
.he-table-toolbar__left { display: flex; align-items: center; flex: 1; height: 48px; }
.he-table-toolbar__right { display: flex; align-items: center; height: 48px; }
.he-toolbar-btn {
  width: 48px; height: 48px; display: flex; align-items: center; justify-content: center;
  background: none; border: none; border-left: 1px solid var(--cds-border-subtle-00);
  cursor: pointer; color: var(--cds-text-secondary); transition: background 0.11s;
}
.he-toolbar-btn:hover { background: var(--cds-layer-hover-01); color: var(--cds-text-primary); }
.he-toolbar-primary {
  display: flex; align-items: center; gap: 8px; height: 48px; padding: 0 16px;
  background: var(--cds-interactive); color: var(--cds-text-on-color); border: none;
  font-size: 14px; font-family: var(--font-sans); cursor: pointer; white-space: nowrap;
  transition: background 0.11s;
}
.he-toolbar-primary:hover { background: var(--cds-interactive-hover); }
.he-toolbar-primary svg { width: 16px; height: 16px; }

.he-search { position: relative; flex: 1; }
.he-search__input {
  width: 100%; height: 48px; padding: 0 16px 0 48px;
  border: none; border-bottom: 2px solid transparent;
  background: var(--cds-layer-01); font-size: 14px;
  font-family: var(--font-sans); color: var(--cds-text-primary); outline: none;
}
.he-search__input:focus { border-bottom-color: var(--cds-interactive); }
.he-search__input::placeholder { color: var(--cds-text-placeholder); }
.he-search__icon {
  position: absolute; left: 16px; top: 50%; transform: translateY(-50%);
  width: 16px; height: 16px; color: var(--cds-interactive); pointer-events: none;
}

.he-table-wrap { border: 1px solid var(--cds-border-subtle-00); overflow-x: auto; background: var(--cds-layer-01); }
table.he-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.he-table thead { background: #e0e0e0; }
.he-table th {
  padding: 0 16px; height: 48px; text-align: left; font-weight: 600;
  font-size: 14px; color: var(--cds-text-primary); vertical-align: middle;
  border-bottom: 1px solid var(--cds-border-subtle-00); white-space: nowrap;
  line-height: 1.29;
}
.he-table td {
  padding: 0 16px; height: 48px; border-bottom: 1px solid var(--cds-border-subtle-00);
  color: var(--cds-text-primary); vertical-align: middle;
}
.he-table tbody tr { transition: background 0.11s; }
.he-table tbody tr:hover { background: var(--cds-layer-hover-01); }
.he-table tbody tr:last-child td { border-bottom: none; }

/* ═══════════════════════════════════════════
   Buttons
   ═══════════════════════════════════════════ */
.he-btn {
  display: inline-flex; align-items: center; gap: 8px;
  height: 48px; padding: 0 64px 0 16px;
  font-size: 14px; font-family: var(--font-sans); border: none;
  cursor: pointer; transition: background 0.11s; white-space: nowrap; position: relative;
}
.he-btn svg { width: 16px; height: 16px; }
.he-btn--primary { background: var(--cds-interactive); color: var(--cds-text-on-color); }
.he-btn--primary:hover { background: var(--cds-interactive-hover); }
.he-btn--ghost { background: transparent; color: var(--cds-link-primary); padding: 0 16px; }
.he-btn--ghost:hover { background: var(--cds-layer-hover-01); }
.he-btn--danger { background: var(--cds-support-error); color: var(--cds-text-on-color); }
.he-btn--danger:hover { background: #ba1b23; }
.he-btn--secondary { background: #393939; color: var(--cds-text-on-color); }
.he-btn--secondary:hover { background: #474747; }
.he-btn--tertiary { background: transparent; color: var(--cds-interactive, #0f62fe); border: 1px solid var(--cds-interactive, #0f62fe); }
.he-btn--tertiary:hover { background: var(--cds-interactive, #0f62fe); color: var(--cds-text-on-color, #fff); }
.he-btn--sm { height: 32px; padding: 0 16px; }
.he-btn--md { height: 40px; padding: 0 16px; }

/* Tags */
.he-tag {
  display: inline-flex; align-items: center; height: 24px; padding: 0 8px;
  font-size: 12px; letter-spacing: 0.32px; border-radius: 24px;
}
.he-tag--green  { background: #defbe6; color: #0e6027; }
.he-tag--red    { background: #fff1f1; color: #da1e28; }
.he-tag--purple { background: #e8daff; color: #6929c4; }
.he-tag--gray   { background: #e8e8e8; color: #525252; }
.he-tag--teal   { background: #d9fbfb; color: #004144; }
.he-tag--blue   { background: #d0e2ff; color: #0043ce; }

/* Content Switcher */
.he-content-switcher { display: inline-flex; margin: 0 0 16px; }
.he-content-switcher__btn {
  display: flex; align-items: center; gap: 8px; height: 40px; padding: 0 16px;
  border: 1px solid var(--cds-border-subtle-01); border-right: none;
  background: var(--cds-layer-01); font-size: 14px; color: var(--cds-text-secondary);
  cursor: pointer; font-family: var(--font-sans);
}
.he-content-switcher__btn:last-child { border-right: 1px solid var(--cds-border-subtle-01); }
.he-content-switcher__btn:hover { background: var(--cds-layer-hover-01); }
.he-content-switcher__btn--selected {
  background: var(--cds-text-primary); color: var(--cds-text-on-color); border-color: var(--cds-text-primary);
}
.he-content-switcher__btn--selected:hover { background: var(--cds-text-primary); }
.he-filter-count {
  min-width: 18px; height: 16px; padding: 0 4px; font-size: 11px; font-weight: 600;
  background: rgba(0,0,0,0.08); border-radius: 8px; display: inline-flex; align-items: center; justify-content: center;
}
.he-content-switcher__btn--selected .he-filter-count { background: rgba(255,255,255,0.2); }

/* Tree View */
.he-tree-layout {
  display: grid; grid-template-columns: 340px 1fr;
  height: calc(100vh - 140px); border: 1px solid var(--cds-border-subtle-00); overflow: hidden;
}
.he-tree-panel {
  border-right: 1px solid var(--cds-border-subtle-00);
  background: var(--cds-layer-01); display: flex; flex-direction: column; overflow: hidden;
}
.he-tree-toolbar {
  padding: 8px; border-bottom: 1px solid var(--cds-border-subtle-00);
  background: var(--cds-layer-02); flex-shrink: 0;
}
.he-tree { flex: 1; overflow-y: auto; padding: 8px 0; font-size: 14px; }
.he-tree-detail { overflow-y: auto; background: var(--cds-layer-01); }
.he-tree-detail__header {
  display: flex; align-items: center; padding: 12px 16px;
  font-size: 14px; font-weight: 600;
  border-bottom: 1px solid var(--cds-border-subtle-00);
  background: var(--cds-layer-02); position: sticky; top: 0;
}
.he-tree-node { display: flex; align-items: center; padding: 4px 8px 4px 0; white-space: nowrap; }
.he-tree-children { padding-left: 24px; }
.he-tree-toggle {
  width: 20px; text-align: center; cursor: pointer; color: var(--cds-text-secondary);
  flex-shrink: 0; display: flex; align-items: center; justify-content: center; user-select: none;
}
.he-tree-toggle:hover { color: var(--cds-text-primary); }
.he-tree-icon {
  width: 24px; display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; margin-right: 8px; color: var(--cds-text-secondary);
}
.he-tree-label { cursor: pointer; padding: 4px 8px; }
.he-tree-label:hover { background: var(--cds-layer-hover-01); }
.he-tree-label--disabled { color: var(--cds-text-placeholder); text-decoration: line-through; }
.he-tree-leaf { cursor: pointer; padding: 4px 8px 4px 44px; display: flex; align-items: center; }
.he-tree-leaf:hover { background: var(--cds-layer-hover-01); }
.he-tree-leaf--selected { background: #d0e2ff !important; }
.he-tree-leaf--selected .he-tree-label { font-weight: 600; color: var(--cds-interactive); }

/* Modal */
.he-modal-overlay {
  position: fixed; inset: 0; background: rgba(22,22,22,0.5);
  display: flex; align-items: flex-start; justify-content: center;
  padding-top: 80px; z-index: 9000;
}
.he-modal {
  background: var(--cds-layer-01); width: 500px; max-height: 80vh;
  overflow-y: auto; box-shadow: 0 4px 24px rgba(0,0,0,0.2);
}
.he-modal__header {
  padding: 16px 24px; border-bottom: 1px solid var(--cds-border-subtle-00);
  display: flex; align-items: center; justify-content: space-between;
}
.he-modal__title { font-size: 20px; font-weight: 400; }
.he-modal__close {
  width: 32px; height: 32px; display: flex; align-items: center; justify-content: center;
  background: none; border: none; cursor: pointer; color: var(--cds-text-secondary);
}
.he-modal__close:hover { background: var(--cds-layer-hover-01); }
.he-modal__body { padding: 24px; }
.he-modal__footer { padding: 16px 24px; display: flex; justify-content: flex-end; }
.he-modal__footer .he-btn { flex: 1; max-width: 50%; justify-content: center; padding: 0 16px; }

/* Form */
.he-form-group { margin-bottom: 24px; }
.he-form-label { display: block; font-size: 12px; color: var(--cds-text-secondary); margin-bottom: 8px; letter-spacing: 0.32px; }
.he-form-input {
  width: 100%; height: 40px; padding: 0 16px; border: none;
  border-bottom: 1px solid var(--cds-border-strong-01); background: var(--cds-layer-02);
  font-size: 14px; font-family: var(--font-sans); color: var(--cds-text-primary); outline: none;
}
.he-form-input:focus { border-bottom-width: 2px; border-bottom-color: var(--cds-interactive); }

/* Empty / Loading */
.he-empty { text-align: center; padding: 48px; }
.he-empty__icon { margin-bottom: 16px; color: var(--cds-text-placeholder); }
.he-empty__title { font-size: 20px; font-weight: 400; }
.he-empty__desc { font-size: 14px; color: var(--cds-text-secondary); margin-top: 8px; }
.he-loading { display: flex; align-items: center; justify-content: center; padding: 48px; gap: 8px; color: var(--cds-text-placeholder); }
@keyframes he-spin { to { transform: rotate(360deg); } }
.he-spinner {
  width: 20px; height: 20px; border: 2px solid var(--cds-border-subtle-00);
  border-top-color: var(--cds-interactive); border-radius: 50%; animation: he-spin 0.8s linear infinite;
}

/* Avatar */
.he-avatar {
  width: 32px; height: 32px; border-radius: 50%; background: var(--cds-interactive);
  color: var(--cds-text-on-color); display: inline-flex; align-items: center;
  justify-content: center; font-size: 14px; font-weight: 600; flex-shrink: 0;
}
.he-avatar--sm { width: 24px; height: 24px; font-size: 11px; }
.he-avatar--lg {
  width: 96px; height: 96px;
  border-radius: 50%; overflow: hidden;
  border: 1px solid var(--cds-border-strong,#8d8d8d);
}

/* LDAP attributes */
.he-ldap-attrs { padding: 0 0 8px; }
.he-ldap-table { width: 100%; border-collapse: collapse; font-size: 12px; font-family: var(--font-mono); }
.he-ldap-table tr:hover { background: var(--cds-layer-02); }
.he-ldap-key { padding: 4px 12px 4px 0; color: var(--cds-text-secondary); font-weight: 600; white-space: nowrap; vertical-align: top; border-bottom: 1px solid var(--cds-border-subtle-00); width: 180px; }
.he-ldap-val { padding: 4px 0; color: var(--cds-text-primary); word-break: break-all; border-bottom: 1px solid var(--cds-border-subtle-00); }
.he-detail-section__header { padding: 8px 0; cursor: pointer; }
.he-detail-section__header:hover { background: var(--cds-layer-02); }

/* Row Hover Actions */
.he-row-actions-th { width: 0; padding: 0 !important; }
.he-row-actions-cell { position: relative; width: 0; padding: 0 !important; overflow: visible; }
.he-row-actions {
  position: absolute; right: 16px; top: 50%; transform: translateY(-50%);
  display: none; align-items: center;
  background: linear-gradient(90deg, transparent 0%, var(--cds-layer-hover-01) 16px, var(--cds-layer-hover-01) 100%);
  padding-left: 24px; height: 100%; z-index: 10;
}
.he-row-hover:hover .he-row-actions { display: flex; }
.he-row-hover:hover { background: var(--cds-layer-hover-01); }
.he-action-btn {
  width: 32px; height: 32px; display: inline-flex; align-items: center; justify-content: center;
  background: none; border: none; cursor: pointer; color: var(--cds-text-secondary); border-radius: 50%;
}
.he-action-btn:hover { background: rgba(0,0,0,0.08); color: var(--cds-text-primary); }
.he-action-btn--danger:hover { color: var(--cds-support-error); background: rgba(218,30,40,0.08); }

.he-row-menu {
  position: fixed; min-width: 200px; background: var(--cds-layer-01);
  border: 1px solid var(--cds-border-subtle-00); box-shadow: 0 2px 12px rgba(0,0,0,0.15);
  z-index: 9200; padding: 4px 0;
}
.he-row-menu__item {
  display: flex; align-items: center; gap: 12px; padding: 10px 16px;
  font-size: 14px; color: var(--cds-text-primary); cursor: pointer;
}
.he-row-menu__item:hover { background: var(--cds-layer-hover-01); }
.he-row-menu__item--danger { color: var(--cds-support-error); }
.he-row-menu__item--danger:hover { background: rgba(218,30,40,0.06); }
.he-row-menu__item svg { flex-shrink: 0; color: var(--cds-text-secondary); }
.he-row-menu__item--danger svg { color: var(--cds-support-error); }
.he-row-menu__divider { height: 1px; background: var(--cds-border-subtle-00); margin: 4px 0; }

/* Column settings */
.he-col-settings { position: relative; }
.he-col-panel {
  position: absolute; top: 48px; right: 0; width: 240px;
  background: var(--cds-layer-01); border: 1px solid var(--cds-border-subtle-00);
  box-shadow: 0 4px 16px rgba(0,0,0,0.12); z-index: 100; display: none;
}
.he-col-panel--open { display: block; }
.he-col-panel__header { padding: 12px 16px 8px; font-size: 12px; font-weight: 600; color: var(--cds-text-secondary); }
.he-col-panel__list { max-height: 320px; overflow-y: auto; }
.he-col-panel__item {
  display: flex; align-items: center; gap: 12px; padding: 8px 16px; cursor: pointer;
}
.he-col-panel__item:hover { background: var(--cds-layer-hover-01); }
.he-col-panel__item input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--cds-interactive); }
.he-col-panel__footer {
  padding: 12px 16px; border-top: 1px solid var(--cds-border-subtle-00);
  display: flex; align-items: center; gap: 8px; color: var(--cds-link-primary); cursor: pointer; background: var(--cds-layer-02);
}
.he-col-panel__footer:hover { background: var(--cds-layer-hover-01); }

/* Toast */
.he-toast {
  position: fixed; bottom: 24px; right: 24px; min-width: 320px; max-width: 448px;
  padding: 14px 16px; font-size: 14px; border-left: 3px solid;
  background: var(--cds-layer-01); box-shadow: 0 2px 6px rgba(0,0,0,0.15);
  z-index: 9100; animation: he-slide-in 0.2s ease-out;
}
.he-toast--success { border-left-color: var(--cds-support-success); }
.he-toast--error   { border-left-color: var(--cds-support-error); }
.he-toast--info    { border-left-color: var(--cds-support-info); }
@keyframes he-slide-in { from { transform: translateY(20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

/* Slide Panel */
.he-slide-panel {
  position: fixed; top: var(--he-header-h); right: 0;
  width: 480px; height: calc(100vh - var(--he-header-h));
  background: var(--cds-layer-01); border-left: 1px solid var(--cds-border-subtle-00);
  box-shadow: -4px 0 16px rgba(0,0,0,0.08); z-index: 8500;
  transform: translateX(100%); transition: transform 0.25s ease;
  display: flex; flex-direction: column;
}
.he-slide-panel--open { transform: translateX(0); }
.he-slide-panel__header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px; border-bottom: 1px solid var(--cds-border-subtle-00);
  background: var(--cds-layer-02); flex-shrink: 0;
}
.he-slide-panel__title { font-size: 16px; font-weight: 600; }
.he-slide-panel__body { flex: 1; overflow-y: auto; padding: 16px; }

.he-detail-section { margin-bottom: 16px; }
.he-detail-row {
  display: flex; justify-content: space-between; align-items: flex-start;
  padding: 10px 0; border-bottom: 1px solid var(--cds-border-subtle-00); font-size: 14px;
}
.he-detail-label { color: var(--cds-text-secondary); min-width: 120px; flex-shrink: 0; }
.he-detail-value { font-size: 13px; text-align: right; flex: 1; margin-left: 12px; }
.he-detail-chip {
  display: inline-flex; align-items: center; padding: 4px 8px; margin: 3px 4px;
  background: var(--cds-layer-02); border: 1px solid var(--cds-border-subtle-00); font-size: 13px;
}
.he-chip-remove { background: none; border: none; cursor: pointer; color: var(--cds-text-placeholder); margin-left: 6px; }
.he-chip-remove:hover { color: var(--cds-support-error); }

/* Scrollbar */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #c6c6c6; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #8d8d8d; }

/* ═══════════════════════════════════════════
   Monitoring — Grafana Embedded Panels
   ═══════════════════════════════════════════ */
/* ── DB Status Bar (inside Monitoring) ── */
.he-db-status-bar {
  display: flex; flex-wrap: wrap; gap: 0.5rem;
  padding: 0.75rem 0; margin-bottom: 0.5rem;
  border-bottom: 1px solid var(--cds-border-subtle-00);
}
.he-db-status-item {
  display: flex; align-items: center; flex-wrap: wrap; gap: 0.5rem;
  font-size: 0.8125rem; font-family: 'IBM Plex Sans', sans-serif;
  padding: 0.375rem 0.75rem;
  background: var(--cds-layer-01); border: 1px solid var(--cds-border-subtle-00);
}
.he-db-status-item strong {
  font-weight: 600; margin-right: 0.25rem;
}
.he-db-status-item span {
  color: var(--cds-text-secondary);
}

/* ── Databases ── */
.he-databases { padding: 0; }
.he-databases__header {
  padding: 0 0 1rem 0;
}
.he-databases__header h2 {
  font-size: 1.25rem; font-weight: 600; margin: 0;
  font-family: 'IBM Plex Sans', sans-serif;
}
.he-databases__loading {
  display: flex; align-items: center; gap: 0.5rem;
  padding: 2rem 0; color: var(--cds-text-secondary);
}
.he-db-card {
  background: var(--cds-layer-01); border: 1px solid var(--cds-border-subtle-00);
  margin-bottom: 1rem;
}
.he-db-card__header {
  padding: 0.75rem 1rem; border-bottom: 1px solid var(--cds-border-subtle-00);
}
.he-db-card__title {
  display: flex; align-items: center; gap: 0.5rem;
  font-size: 0.875rem; font-weight: 600;
  font-family: 'IBM Plex Sans', sans-serif;
}
.he-db-card__body {
  display: grid; grid-template-columns: 280px 1fr; min-height: 220px;
}
.he-db-card__info {
  padding: 0.75rem 1rem; border-right: 1px solid var(--cds-border-subtle-00);
}
.he-db-card__row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 0.375rem 0; font-size: 0.8125rem;
  border-bottom: 1px solid var(--cds-border-subtle-00);
}
.he-db-card__row:last-child { border-bottom: none; }
.he-db-card__label {
  color: var(--cds-text-secondary); font-weight: 500;
}
.he-db-card__metrics {
  display: grid; grid-template-columns: 1fr 1fr; gap: 0;
}
.he-db-card__metrics iframe {
  width: 100%; height: 100%; min-height: 220px; border: none;
  border-left: 1px solid var(--cds-border-subtle-00);
}
@media (max-width: 1000px) {
  .he-db-card__body { grid-template-columns: 1fr; }
  .he-db-card__metrics { grid-template-columns: 1fr; }
  .he-db-card__metrics iframe { min-height: 180px; }
}

/* ── Service Console (iframe embed) ── */
.he-main:has(.he-service-console) { padding: 0; }
.he-service-console { display: flex; height: 100%; width: 100%; }
.he-service-console__iframe {
  flex: 1; width: 100%; border: none; min-height: calc(100vh - 48px);
}

/* ── Monitoring: Layout ── */
.he-main:has(.he-monitoring) { padding: 0; }
.he-monitoring { padding: 1rem 1.5rem 0 1.5rem; width: 100%; }
.he-monitoring__header { padding: 1rem 0 0 0; }
.he-monitoring__title-row {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 1rem;
}
.he-monitoring__title {
  font-size: 1.25rem; font-weight: 600; margin: 0;
  font-family: 'IBM Plex Sans', sans-serif; color: var(--cds-text-primary);
}
.he-monitoring__actions {
  display: flex; align-items: center; gap: 0.5rem;
}
.he-monitoring__body {
  padding: 1rem 0; overflow-y: auto;
}

/* ── Monitoring: Sections ── */
.he-mon-section { margin-bottom: 1.5rem; }
.he-mon-section__title {
  font-size: 0.75rem; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.32px; color: var(--cds-text-secondary);
  font-family: 'IBM Plex Sans', sans-serif;
  margin: 0 0 0.75rem 0; padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--cds-border-subtle-00);
}
.he-mon-section__grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 0.75rem;
}

/* ── Monitoring: Panels ── */
.he-mon-panel {
  background: var(--cds-layer-01); border: 1px solid var(--cds-border-subtle-00);
  display: flex; flex-direction: column; min-height: 180px;
}
.he-mon-panel--wide {
  grid-column: span 3; min-height: 280px;
}
.he-mon-panel__header {
  padding: 0.5rem 0.75rem; font-size: 0.75rem; font-weight: 600;
  color: var(--cds-text-secondary); text-transform: uppercase;
  letter-spacing: 0.32px; border-bottom: 1px solid var(--cds-border-subtle-00);
  font-family: 'IBM Plex Sans', sans-serif;
  display: flex; justify-content: space-between; align-items: center;
}
.he-mon-panel__header a:hover { color: var(--cds-link-primary, #0f62fe); }
.he-mon-panel__overlay {
  position: absolute; inset: 0; z-index: 1; cursor: pointer;
}
.he-monitoring__panel-iframe {
  flex: 1; width: 100%; border: none; min-height: 140px;
}

@media (max-width: 1200px) {
  .he-mon-section__grid { grid-template-columns: repeat(3, 1fr); }
  .he-mon-panel--wide { grid-column: span 3; }
}
@media (max-width: 900px) {
  .he-mon-section__grid { grid-template-columns: repeat(2, 1fr); }
  .he-mon-panel--wide { grid-column: span 2; }
}

/* ── Tabs (Carbon-style contained tabs) ── */
.he-tabs { display: flex; border-bottom: 1px solid var(--cds-border-subtle-00, #e0e0e0); }
.he-tabs--contained { background: var(--cds-layer-01, #f4f4f4); }
.he-tab {
  padding: 8px 16px; font-size: 14px; font-weight: 600;
  color: var(--cds-text-secondary, #525252); background: none; border: none;
  border-bottom: 2px solid transparent; cursor: pointer; transition: all 0.11s;
  white-space: nowrap;
}
.he-tab:hover { color: var(--cds-text-primary, #161616); background: var(--cds-layer-hover-01, #e8e8e8); }
.he-tab--active {
  color: var(--cds-text-primary, #161616);
  border-bottom-color: var(--cds-border-interactive, #0f62fe);
}

/* ── Select (Carbon-style) ── */
.he-select {
  appearance: none; -webkit-appearance: none;
  padding: 0 2.5rem 0 1rem; height: 2.5rem; font-size: 0.875rem;
  font-family: var(--font-sans); color: var(--cds-text-primary, #161616);
  background: var(--cds-field-01, #f4f4f4) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3E%3Cpath fill='%23161616' d='M8 11L3 6h10z'/%3E%3C/svg%3E") no-repeat right 0.75rem center;
  border: none; border-bottom: 1px solid var(--cds-border-strong-01, #8d8d8d);
  outline: none; cursor: pointer;
}
.he-select:focus { border-bottom-color: var(--cds-focus, #0f62fe); outline: 2px solid var(--cds-focus, #0f62fe); outline-offset: -2px; }
.he-select--sm { height: 2rem; padding: 0 2rem 0 0.75rem; font-size: 0.8125rem; }

/* ── Tag cyan variant ── */
.he-tag--cyan { background: var(--cds-cyan-20, #d9fbfb); color: var(--cds-cyan-70, #004144); }

/* ── Mail Directory styles ── */
.he-slide-panel--wide { width: 640px; }
.he-slide-panel__footer {
  display: flex; justify-content: flex-end; gap: 8px;
  padding: 12px 16px; border-top: 1px solid var(--cds-border-subtle-00);
  background: var(--cds-layer-02); flex-shrink: 0;
}
.he-edit-section { margin-bottom: 24px; padding-bottom: 16px; border-bottom: 1px solid var(--cds-border-subtle-00); }
.he-edit-section:last-child { border-bottom: none; }
.he-edit-section__title { font-size: 12px; font-weight: 600; letter-spacing: 0.32px; color: var(--cds-text-secondary); text-transform: uppercase; margin-bottom: 12px; }
.he-multi-input__row { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.he-multi-input__row .he-form-input { flex: 1; }
.he-multi-input__add { margin-top: 4px; }
.he-table-footer { display: flex; justify-content: space-between; align-items: center; padding: 8px 16px; font-size: 12px; color: var(--cds-text-secondary); }
.he-pagination { display: flex; gap: 2px; }
.he-page-btn { width: 32px; height: 32px; border: none; background: none; cursor: pointer; font-size: 13px; color: var(--cds-text-secondary); border-radius: 4px; }
.he-page-btn:hover { background: var(--cds-layer-hover-01); }
.he-page-btn--active { background: var(--cds-background-brand, #0f62fe); color: #fff; font-weight: 600; }
.he-checkbox { width: 16px; height: 16px; cursor: pointer; accent-color: var(--cds-background-brand, #0f62fe); }
.he-toolbar-btn--danger { color: var(--cds-support-error, #da1e28); }
.he-toolbar-btn--danger:hover { background: var(--cds-support-error, #da1e28); color: #fff; }
.he-details { font-size: 13px; }
.he-details summary { cursor: pointer; font-weight: 500; padding: 6px 0; color: var(--cds-link-primary, #0f62fe); }
.he-details summary:hover { text-decoration: underline; }
.he-table--compact td, .he-table--compact th { padding: 6px 12px; font-size: 13px; }

/* ── Action cards (Maintenance) ── */
.he-action-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; margin-bottom: 16px; }
.he-action-card {
  display: flex; align-items: flex-start; gap: 12px; padding: 16px;
  background: var(--cds-layer-01); border: 1px solid var(--cds-border-subtle-00);
  border-radius: 4px; transition: box-shadow 0.15s;
}
.he-action-card:hover { box-shadow: 0 2px 8px rgba(0,0,0,0.08); }
.he-action-card__icon { width: 40px; height: 40px; border-radius: 8px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; color: #fff; }
.he-action-card__icon--blue { background: var(--cds-background-brand, #0f62fe); }
.he-action-card__icon--teal { background: var(--cds-teal-60, #009d9a); }
.he-action-card__icon--green { background: var(--cds-support-success, #24a148); }
.he-action-card__icon--purple { background: var(--cds-purple-60, #8a3ffc); }
.he-action-card__icon--red { background: var(--cds-support-error, #da1e28); }
.he-action-card__icon--gray { background: var(--cds-icon-secondary, #525252); }
.he-action-card__body { flex: 1; min-width: 0; }
.he-action-card__title { font-size: 14px; font-weight: 600; margin-bottom: 4px; }
.he-action-card__desc { font-size: 12px; color: var(--cds-text-secondary); line-height: 1.4; }
.he-action-card__btn { flex-shrink: 0; align-self: center; }
.he-form-row { display: flex; gap: 16px; }

/* ── Info Box (collapsible) ── */
.he-info-box { background: var(--cds-layer-01); border: 1px solid var(--cds-border-subtle-00); }
.he-info-box__summary { display: flex; align-items: center; gap: 8px; padding: 12px 16px; cursor: pointer; font-size: 13px; font-weight: 500; color: var(--cds-text-secondary); list-style: none; user-select: none; }
.he-info-box__summary::-webkit-details-marker { display: none; }
.he-info-box__summary svg:last-child { margin-left: auto; transition: transform .2s; }
.he-info-box[open] .he-info-box__summary svg:last-child { transform: rotate(180deg); }
.he-info-box__body { padding: 0 16px 16px; font-size: 13px; line-height: 1.6; color: var(--cds-text-primary); }
.he-info-box__body p { margin: 0 0 8px; }
.he-info-box__body code { background: var(--cds-field-01); padding: 1px 6px; font-family: var(--font-mono); font-size: 12px; }

/* ── Toggle Switch ── */
.he-toggle { display: flex; align-items: center; gap: 12px; cursor: pointer; }
.he-toggle input { display: none; }
.he-toggle__switch {
  position: relative; width: 48px; height: 24px; border-radius: 12px;
  background: var(--cds-toggle-off, #8d8d8d); transition: background 0.15s;
}
.he-toggle__switch::after {
  content: ''; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px;
  border-radius: 50%; background: #fff; transition: transform 0.15s;
}
.he-toggle input:checked + .he-toggle__switch { background: var(--cds-support-success, #198038); }
.he-toggle input:checked + .he-toggle__switch::after { transform: translateX(24px); }
.he-toggle__label { font-size: 13px; font-weight: 500; color: var(--cds-text-primary); user-select: none; }

/* ── Sentinel Config Edit Form ── */
.sn-cfg-edit { padding: 4px 0; }
.sn-cfg-edit__toggle { padding: 4px 0 12px; }
.sn-cfg-edit__divider { border-top: 1px solid var(--cds-border-subtle-00); margin: 4px 0 16px; }
.sn-cfg-edit__section { margin-bottom: 20px; }
.sn-cfg-edit__section-title { font-size: 12px; font-weight: 600; color: var(--cds-text-secondary); letter-spacing: 0.32px; text-transform: uppercase; margin-bottom: 12px; }
.sn-cfg-edit__grid { display: grid; gap: 16px; }
.sn-cfg-edit__grid--2col { grid-template-columns: 1fr 1fr; }
.sn-cfg-edit__grid--3col { grid-template-columns: 1fr 1fr 1fr; }
.sn-cfg-edit__helper { font-size: 11px; color: var(--cds-text-helper, #6f6f6f); margin-top: 4px; letter-spacing: 0.32px; }
.sn-cfg-edit__helper code { background: var(--cds-field-01); padding: 1px 4px; font-family: var(--font-mono); font-size: 11px; }
.sn-cfg-edit__key-wrap { position: relative; }
.sn-cfg-edit__key-toggle {
  position: absolute; right: 0; top: 0; width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  background: none; border: none; cursor: pointer; color: var(--cds-icon-secondary, #525252);
}
.sn-cfg-edit__key-toggle:hover { color: var(--cds-icon-primary, #161616); }
.sn-cfg-edit__suffix-wrap { position: relative; }
.sn-cfg-edit__suffix {
  position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
  font-size: 13px; color: var(--cds-text-placeholder, #a8a8a8); pointer-events: none;
}
.sn-cfg-edit__actions { display: flex; justify-content: flex-end; gap: 8px; padding-top: 16px; border-top: 1px solid var(--cds-border-subtle-00); }

/* ── Sentinel Threshold Cards ── */
.sn-thresh__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.sn-thresh__card {
  background: var(--cds-layer-02, #fff); border: 1px solid var(--cds-border-subtle-00);
  border-radius: 0; padding: 16px;
}
.sn-thresh__card-header { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 12px; }
.sn-thresh__card-header svg { color: var(--cds-icon-secondary, #525252); flex-shrink: 0; margin-top: 1px; }
.sn-thresh__card-title { font-size: 14px; font-weight: 600; color: var(--cds-text-primary); }
.sn-thresh__card-desc { font-size: 11px; color: var(--cds-text-helper, #6f6f6f); margin-top: 2px; letter-spacing: 0.32px; }
.sn-thresh__bar { margin-top: 4px; }
.sn-thresh__bar-track { position: relative; height: 8px; background: var(--cds-layer-accent-01, #e0e0e0); border-radius: 0; overflow: hidden; }
.sn-thresh__bar-safe { position: absolute; top: 0; left: 0; height: 100%; background: var(--cds-support-success, #198038); }
.sn-thresh__bar-warn { position: absolute; top: 0; height: 100%; background: var(--cds-support-warning, #f1c21b); }
.sn-thresh__bar-crit { position: absolute; top: 0; height: 100%; background: var(--cds-support-error, #da1e28); }
.sn-thresh__bar-marker {
  position: absolute; top: -3px; width: 2px; height: 14px;
  background: var(--cds-text-primary, #161616); transform: translateX(-1px);
}
.sn-thresh__bar-marker--crit { background: var(--cds-support-error, #da1e28); }
.sn-thresh__bar-labels {
  position: relative; display: flex; justify-content: space-between;
  margin-top: 6px; font-size: 10px; color: var(--cds-text-placeholder, #a8a8a8);
}
.sn-thresh__bar-labels > span:not(:first-child):not(:last-child) { position: absolute; transform: translateX(-50%); }
.sn-thresh__preview { margin-top: 12px; }

/* ── Threshold Groups ── */
.sn-thresh__group { margin-bottom: 20px; }
.sn-thresh__group-title {
  display: flex; align-items: center; gap: 6px;
  font-size: 12px; font-weight: 600; color: var(--cds-text-secondary);
  letter-spacing: 0.32px; text-transform: uppercase; margin-bottom: 10px;
  padding-bottom: 6px; border-bottom: 1px solid var(--cds-border-subtle-00);
}
.sn-thresh__group-title svg { color: var(--cds-icon-secondary, #525252); }
.sn-thresh__card--compact { padding: 12px 16px; }
.sn-thresh__card-row { display: flex; align-items: center; justify-content: space-between; }
.sn-thresh__card-info { display: flex; flex-direction: column; gap: 2px; }
.sn-thresh__card-row .sn-thresh__card-title { font-size: 13px; }
.sn-thresh__card-row .sn-thresh__card-desc { font-size: 11px; }
.sn-thresh__card-values { display: flex; gap: 6px; flex-shrink: 0; }

/* ── Threshold Edit Table ── */
.sn-thresh__edit-table { display: flex; flex-direction: column; }
.sn-thresh__edit-header {
  display: grid; grid-template-columns: 1fr 120px 120px 80px;
  gap: 12px; padding: 6px 0; margin-bottom: 4px;
  font-size: 11px; font-weight: 600; color: var(--cds-text-secondary);
  letter-spacing: 0.32px; text-transform: uppercase;
  border-bottom: 1px solid var(--cds-border-subtle-00);
}
.sn-thresh__edit-row {
  display: grid; grid-template-columns: 1fr 120px 120px 80px;
  gap: 12px; align-items: center; padding: 8px 0;
  border-bottom: 1px solid var(--cds-border-subtle-00, #e0e0e0);
}
.sn-thresh__edit-row:last-child { border-bottom: none; }
.sn-thresh__edit-label { display: flex; flex-direction: column; gap: 1px; }
.sn-thresh__edit-name { font-size: 13px; font-weight: 500; color: var(--cds-text-primary); }
.sn-thresh__edit-desc { font-size: 11px; color: var(--cds-text-helper, #6f6f6f); letter-spacing: 0.32px; }
.sn-thresh__edit-input { }
.sn-thresh__edit-bar { }

/* ── Firewall ── */
.fw-group { background: var(--cds-layer-01); border: 1px solid var(--cds-border-subtle-00); margin-bottom: 16px; }
.fw-group__header {
  display: flex; align-items: center; gap: 8px; padding: 12px 16px;
  font-size: 12px; font-weight: 600; color: var(--cds-text-secondary);
  letter-spacing: 0.32px; text-transform: uppercase;
  border-bottom: 1px solid var(--cds-border-subtle-00);
  background: var(--cds-layer-accent-01, #e0e0e0);
}
.fw-group__header svg { color: var(--cds-icon-secondary); }
.fw-group__count { margin-left: auto; font-weight: 400; text-transform: none; font-size: 11px; color: var(--cds-text-placeholder); }
.fw-group__table { }
.fw-row {
  display: grid; grid-template-columns: 1.5fr 70px 1fr 120px 60px;
  gap: 8px; align-items: center; padding: 10px 16px;
  border-bottom: 1px solid var(--cds-border-subtle-00);
  font-size: 13px; transition: background 0.15s;
}
.fw-row:last-child { border-bottom: none; }
.fw-row:hover { background: var(--cds-layer-hover-01, #e8e8e8); }
.fw-row--header {
  font-size: 11px; font-weight: 600; color: var(--cds-text-secondary);
  letter-spacing: 0.32px; text-transform: uppercase; padding: 8px 16px;
  background: var(--cds-layer-02, #fff);
}
.fw-row--header:hover { background: var(--cds-layer-02, #fff); }
.fw-row--changed { background: var(--cds-highlight, #d0e2ff); }
.fw-row--changed:hover { background: var(--cds-highlight, #d0e2ff); }
.fw-col--name { display: flex; flex-direction: column; gap: 2px; }
.fw-svc-name { font-weight: 500; color: var(--cds-text-primary); }
.fw-svc-desc { font-size: 11px; color: var(--cds-text-helper, #6f6f6f); }
.fw-col--port code { font-size: 13px; font-weight: 600; }
.fw-port-internal { font-size: 11px; color: var(--cds-text-placeholder); }
.fw-col--bind code { font-size: 11px; }
.fw-col--toggle { display: flex; justify-content: center; }
.he-toggle--sm .he-toggle__switch { width: 36px; height: 18px; border-radius: 9px; }
.he-toggle--sm .he-toggle__switch::after { width: 14px; height: 14px; top: 2px; left: 2px; }
.he-toggle--sm input:checked + .he-toggle__switch::after { transform: translateX(18px); }
.he-toggle--sm input:disabled + .he-toggle__switch { opacity: 0.5; cursor: not-allowed; }

.fw-banner { display: flex; align-items: center; gap: 8px; padding: 10px 16px; margin-bottom: 12px; font-size: 13px; }
.fw-banner--warning { background: var(--cds-support-warning, #f1c21b); color: var(--cds-text-primary); }
.fw-banner--info { background: var(--cds-background-brand, #e0e0ff); color: var(--cds-text-primary); border: 1px solid var(--cds-interactive, #0f62fe); }
.fw-banner svg { flex-shrink: 0; }

.fw-apply-bar {
  position: sticky; bottom: 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 20px; margin-top: 16px;
  background: var(--cds-layer-01); border: 1px solid var(--cds-border-subtle-00);
  box-shadow: 0 -2px 8px rgba(0,0,0,0.08);
}
.fw-apply-bar__info { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--cds-text-secondary); }
.fw-apply-bar__actions { display: flex; gap: 8px; }

/* ── Firewall Apply Modal ── */
.fw-modal-overlay {
  position: fixed; inset: 0; z-index: 9000;
  background: rgba(22,22,22,0.5); display: flex; align-items: center; justify-content: center;
}
.fw-modal {
  background: var(--cds-layer-01, #f4f4f4); width: 520px; max-height: 80vh;
  display: flex; flex-direction: column; box-shadow: 0 4px 24px rgba(0,0,0,0.2);
}
.fw-modal__header {
  display: flex; align-items: center; gap: 10px; padding: 16px 20px;
  border-bottom: 1px solid var(--cds-border-subtle-00);
}
.fw-modal__header h3 { font-size: 16px; font-weight: 600; margin: 0; }
.fw-modal__body { padding: 20px; flex: 1; overflow-y: auto; }
.fw-modal__footer { padding: 12px 20px; border-top: 1px solid var(--cds-border-subtle-00); display: flex; justify-content: flex-end; }
.fw-modal__status {
  display: flex; align-items: center; gap: 8px; padding: 12px 16px; margin: 16px 0 0; font-size: 13px; font-weight: 500;
}
.fw-modal__status--success { background: var(--cds-support-success, #198038); color: #fff; }
.fw-modal__status--error { background: var(--cds-support-error, #da1e28); color: #fff; }

/* Steps */
.fw-step {
  display: flex; align-items: flex-start; gap: 12px; padding: 10px 0;
  border-bottom: 1px solid var(--cds-border-subtle-00);
}
.fw-step:last-child { border-bottom: none; }
.fw-step__icon { flex-shrink: 0; width: 20px; height: 20px; display: flex; align-items: center; justify-content: center; margin-top: 1px; }
.fw-step__content { flex: 1; }
.fw-step__text { font-size: 13px; font-weight: 500; color: var(--cds-text-primary); }
.fw-step__detail {
  font-size: 11px; color: var(--cds-text-secondary); margin-top: 4px;
  font-family: var(--font-mono); white-space: pre-wrap; line-height: 1.4;
  background: var(--cds-field-01); padding: 6px 8px; max-height: 80px; overflow-y: auto;
}
.fw-step--done .fw-step__text { color: var(--cds-text-secondary); }
.fw-step__check { color: var(--cds-support-success, #198038); }
.fw-step__error { color: var(--cds-support-error, #da1e28); }
.fw-step__warn { color: var(--cds-support-warning, #f1c21b); }
.fw-step--running .fw-step__text { color: var(--cds-interactive, #0f62fe); }
.sn-thresh__edit-hint {
  grid-column: 1 / -1; font-size: 11px; color: var(--cds-support-error, #da1e28);
  margin-top: -4px; letter-spacing: 0.32px;
}

/* ── Credentials Table ── */
.cred-table { background: var(--cds-layer-01, #f4f4f4); border: 1px solid var(--cds-border-subtle-00); }
.cred-row {
  display: grid; grid-template-columns: 1.2fr 1fr 1.5fr 60px;
  gap: 8px; align-items: center; padding: 12px 16px;
  border-bottom: 1px solid var(--cds-border-subtle-00);
  font-size: 13px;
}
.cred-row:last-child { border-bottom: none; }
.cred-row:hover { background: var(--cds-layer-hover-01, #e8e8e8); }
.cred-row--header {
  font-size: 11px; font-weight: 600; color: var(--cds-text-secondary);
  letter-spacing: 0.32px; text-transform: uppercase; padding: 8px 16px;
  background: var(--cds-layer-02, #fff);
}
.cred-row--header:hover { background: var(--cds-layer-02, #fff); }
.cred-col--name { display: flex; align-items: center; gap: 8px; }
.cred-svc-name { font-weight: 500; }
.cred-col--pw { display: flex; align-items: center; gap: 6px; font-family: var(--font-mono, 'IBM Plex Mono', monospace); }
.cred-pw-masked { letter-spacing: 2px; color: var(--cds-text-secondary); }
.cred-col--actions { display: flex; justify-content: center; }

/* ── Header Panels (Notification & User) ── */
.he-header__badge {
  position: absolute; top: 4px; right: 4px;
  background: var(--cds-support-error, #da1e28); color: #fff;
  font-size: 0.625rem; font-weight: 600;
  min-width: 16px; height: 16px; line-height: 16px;
  text-align: center; border-radius: 8px; padding: 0 4px;
}
.he-header__panel {
  position: absolute; top: 100%; right: 0; z-index: 9000;
  width: 320px; max-height: 400px;
  background: var(--cds-layer, #fff); border: 1px solid var(--cds-border-subtle, #e0e0e0);
  box-shadow: 0 4px 16px rgba(0,0,0,.12);
  display: flex; flex-direction: column;
}
.he-header__panel--user { width: 240px; max-height: none; }
.he-header__panel-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.75rem 1rem; border-bottom: 1px solid var(--cds-border-subtle, #e0e0e0);
}
.he-header__panel-body {
  overflow-y: auto; flex: 1; padding: 0.5rem 0;
}
.he-header__menu-item {
  display: flex; align-items: center; gap: 0.5rem;
  width: 100%; padding: 0.625rem 1rem; border: none; background: none;
  font-size: 0.8125rem; color: var(--cds-text-primary, #161616);
  cursor: pointer; text-align: left;
}
.he-header__menu-item:hover { background: var(--cds-layer-hover, #e8e8e8); }
.he-header__menu-item--danger { color: var(--cds-support-error, #da1e28); }
.he-header__menu-item--danger:hover { background: #fff1f1; }

/* Notification item */
.he-notif-item {
  padding: 0.625rem 1rem; border-bottom: 1px solid var(--cds-border-subtle, #e0e0e0);
  font-size: 0.8125rem; cursor: pointer;
}
.he-notif-item:hover { background: var(--cds-layer-hover, #e8e8e8); }
.he-notif-item__title { font-weight: 600; margin-bottom: 2px; }
.he-notif-item__time { font-size: 0.75rem; color: var(--cds-text-secondary); }

/* ── Form Helper Text ── */
.he-form-helper {
  font-size: 0.75rem;
  color: var(--cds-text-helper, #6f6f6f);
  margin-top: 0.25rem;
  line-height: 1.34;
}

/* ── Content Switcher (Carbon) ── */
.he-content-switcher { display: inline-flex; height: 32px; }
.he-content-switcher__btn {
  display: flex; align-items: center; padding: 0 16px; border: 1px solid var(--cds-border-strong-01, #8d8d8d);
  background: var(--cds-layer, #fff); color: var(--cds-text-primary); font-size: 0.8125rem;
  cursor: pointer; white-space: nowrap; margin-left: -1px;
}
.he-content-switcher__btn:first-child { margin-left: 0; }
.he-content-switcher__btn--selected {
  background: var(--cds-background-inverse, #393939); color: var(--cds-text-inverse, #fff);
  border-color: var(--cds-background-inverse, #393939); z-index: 1;
}
.he-content-switcher__btn:hover:not(.he-content-switcher__btn--selected) {
  background: var(--cds-layer-hover, #e8e8e8);
}

/* ── Structured List (Carbon) ── */
.he-structured-list { width: 100%; border-collapse: collapse; }
.he-structured-list th {
  padding: 12px 16px; font-size: 0.75rem; font-weight: 600;
  letter-spacing: 0.32px; color: var(--cds-text-secondary);
  text-align: left; border-bottom: 1px solid var(--cds-border-subtle);
}
.he-structured-list td {
  padding: 12px 16px; font-size: 0.875rem; color: var(--cds-text-primary);
  border-bottom: 1px solid var(--cds-border-subtle); vertical-align: top;
}
.he-structured-list td:first-child {
  width: 160px; font-weight: 500; color: var(--cds-text-secondary); font-size: 0.8125rem;
}

/* ── Inline Notification (Carbon) ── */
.he-notification {
  display: flex; align-items: flex-start; padding: 12px 16px; gap: 12px;
  font-size: 0.875rem; border-left: 3px solid;
}
.he-notification--success { background: #defbe6; border-color: #198038; color: #0e6027; }
.he-notification--error   { background: #fff1f1; border-color: #da1e28; color: #da1e28; }
.he-notification--info    { background: #edf5ff; border-color: #0043ce; color: #0043ce; }
.he-notification--warning { background: #fff8e1; border-color: #f1c21b; color: #8e6a00; }

/* ── Avatar hover zoom popup ── */
.he-avatar-zoom {
  position: fixed; z-index: 9999; pointer-events: none;
  width: 96px; height: 96px; border-radius: 50%; overflow: hidden;
  border: 2px solid var(--cds-border-strong, #8d8d8d);
  box-shadow: 0 8px 24px rgba(0,0,0,.25);
  opacity: 0; transition: opacity .15s ease;
  background: var(--cds-layer-01, #fff);
}
.he-avatar-zoom.active { opacity: 1; }
.he-avatar-zoom img { width: 100%; height: 100%; object-fit: cover; }

/* ── Form input disabled state ── */
.he-form-input:disabled, .he-form-input[readonly] {
  background: var(--cds-field-01, #f4f4f4); color: var(--cds-text-disabled, #c6c6c6);
  border-bottom-color: transparent; cursor: not-allowed;
}

/* ── Audit Log Tabs ── */
.he-audit-tabs{display:flex;gap:0;margin:0 32px 16px;border:1px solid var(--cds-border-subtle);border-radius:4px;overflow:hidden}
.he-audit-tab{flex:1;padding:12px 16px;cursor:pointer;position:relative;overflow:hidden;background:#ffffff;transition:background .15s}
.he-audit-tab+.he-audit-tab{border-left:1px solid var(--cds-border-subtle)}
.he-audit-tab::before{content:'';position:absolute;top:0;left:0;width:100%;height:100%;background:linear-gradient(90deg,#e0e0e0 0%,transparent 100%);opacity:0;transition:opacity .35s ease}
.he-audit-tab:hover::before{opacity:1}
.he-audit-tab--active{background:#e0e0e0!important;border-bottom:2px solid var(--cds-border-interactive,#0f62fe)}
.he-audit-tab--active::before{display:none}
.he-audit-tab__label{font-size:.75rem;color:var(--cds-text-secondary);display:flex;align-items:center;gap:4px;position:relative;z-index:1}
.he-audit-tab__value{font-size:1.5rem;font-weight:600;color:var(--cds-text-primary);margin-top:4px;position:relative;z-index:1}
.he-audit-tab--active .he-audit-tab__label{color:var(--cds-text-primary)}

/* ══════════════════════════════════════════════════════════════════════════
   DATABASE VIEW — pgweb iframe + 상태 대시보드
   ══════════════════════════════════════════════════════════════════════════ */

/* 루트 레이아웃 */
.he-db-root {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
}

/* 페이지 헤더 */
.he-db-header {
  flex-shrink: 0;
  padding: 24px 24px 0;
  background: var(--cds-background);
  border-bottom: 1px solid var(--cds-border-subtle-00);
}
.he-db-header__title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0;
}

/* 탭 바디 — 나머지 공간 채움 */
.he-db-body {
  flex: 1;
  overflow: auto;
  background: var(--cds-background);
}

/* pgweb Wrapper */
.he-db-pgweb-wrap {
  display: flex;
  flex-direction: column;
  height: 100%;
}

/* pgweb 툴바 */
.he-db-pgweb-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 16px;
  background: var(--cds-layer-01);
  border-bottom: 1px solid var(--cds-border-subtle-00);
  flex-shrink: 0;
}

/* pgweb iframe 컨테이너 */
.he-db-pgweb-frame-container {
  position: relative;
  flex: 1;
  overflow: hidden;
}

/* pgweb iframe */
.he-db-pgweb-iframe {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
  background: #fff;
}

/* 연결 실패 오버레이 */
.he-db-pgweb-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--cds-background);
  z-index: 10;
}
.he-db-pgweb-overlay__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  color: var(--cds-text-secondary);
  text-align: center;
}
.he-db-pgweb-overlay__inner svg {
  opacity: 0.3;
  color: var(--cds-icon-secondary);
}
