@font-face {
  font-family: "CMDBSans";
  src: url("/static/fonts/IBMPlexSans-Regular.9fcda9095ff5.ttf") format("truetype");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "CMDBSans";
  src: url("/static/fonts/IBMPlexSans-Medium.975cd69e434d.ttf") format("truetype");
  font-style: normal;
  font-weight: 500;
  font-display: swap;
}

@font-face {
  font-family: "CMDBSans";
  src: url("/static/fonts/IBMPlexSans-SemiBold.a1b41556d541.ttf") format("truetype");
  font-style: normal;
  font-weight: 600;
  font-display: swap;
}

@font-face {
  font-family: "CMDBSans";
  src: url("/static/fonts/IBMPlexSans-Bold.075c09530e7a.ttf") format("truetype");
  font-style: normal;
  font-weight: 700;
  font-display: swap;
}

:root {
  --topbar-height: 70px;
  --bg-0: #f2f6fa;
  --bg-1: #e8f0f6;
  --ink-0: #13212e;
  --ink-1: #51687e;
  --card: #ffffff;
  --line: #d8e2ec;
  --accent: #006d8f;
  --accent-2: #0f9d87;
  --critical: #a43a3a;
  --shadow-lg: 0 12px 28px rgba(20, 40, 60, 0.12);
  --shadow-sm: 0 4px 10px rgba(20, 40, 60, 0.08);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  min-width: 0;
}

body {
  font-family: "CMDBSans", "Segoe UI", "Noto Sans", Arial, sans-serif;
  font-feature-settings: "kern" 1, "tnum" 1;
  font-kerning: normal;
  color: var(--ink-0);
  background:
    radial-gradient(circle at 8% 0%, #f9fcff 0%, transparent 36%),
    radial-gradient(circle at 92% 0%, #edf8ff 0%, transparent 34%),
    linear-gradient(180deg, var(--bg-0) 0%, var(--bg-1) 100%);
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  height: var(--topbar-height);
  padding: 0 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(90deg, #0b2439 0%, #10334e 52%, #154664 100%);
  border-bottom: 1px solid #0f3d5e;
  box-shadow: var(--shadow-sm);
  font-size: 16px;
  line-height: normal;
}

.brand {
  display: flex;
  align-items: baseline;
  gap: 12px;
}

.brand-mark {
  color: #6be4ff;
  font-weight: 800;
  letter-spacing: 1.1px;
  font-size: 22px;
}

.brand-name {
  color: #d4e9f6;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.7px;
}

.menu {
  display: flex;
  gap: 10px;
}

.menu a {
  text-decoration: none;
  color: #d8edf9;
  font-weight: 600;
  padding: 8px 12px;
  border-radius: 9px;
  transition: background 0.2s ease, color 0.2s ease;
}

.menu a:hover {
  background: rgba(123, 226, 255, 0.16);
  color: #ffffff;
}

.userbox {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #d8edf9;
}

.userbox form {
  margin: 0;
}

.userbox button {
  border: 1px solid rgba(154, 225, 255, 0.35);
  background: rgba(17, 73, 103, 0.7);
  color: #e7f5ff;
  border-radius: 9px;
  font-size: 13.3333px;
  line-height: normal;
  padding: 6px 12px;
  font-family: inherit;
  cursor: pointer;
}

.userbox button:hover {
  background: rgba(29, 99, 136, 0.85);
}

.page {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 24px clamp(16px, 2vw, 32px) 32px;
}

.hero {
  border: 1px solid #d6e4f1;
  border-radius: 18px;
  padding: 24px 26px;
  background:
    linear-gradient(115deg, rgba(0, 109, 143, 0.08), rgba(15, 157, 135, 0.08)),
    #ffffff;
  box-shadow: var(--shadow-sm);
  margin-bottom: 18px;
}

.hero h1 {
  margin: 0 0 6px;
  font-size: 28px;
  line-height: 1.15;
}

.hero p {
  margin: 0;
  color: var(--ink-1);
  font-size: 14px;
}

.asset-scope-bar {
  margin-top: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: flex-start;
}

.asset-scope-picker {
  position: relative;
  flex: 1 1 170px;
  min-width: 150px;
  max-width: 290px;
}

.asset-scope-checkbox {
  position: relative;
  flex: 0 0 168px;
  width: auto;
  grid-template-columns: auto 1fr;
  align-items: center;
  align-content: center;
  padding-right: 10px;
}

.asset-scope-checkbox::after {
  content: none;
}

.asset-scope-checkbox input {
  width: 18px;
  height: 18px;
  margin: 0;
}

.asset-scope-chip {
  width: 100%;
  min-height: 48px;
  display: grid;
  gap: 2px;
  align-content: center;
  text-align: left;
  padding: 8px 28px 8px 10px;
  border: 1px solid #cfe0eb;
  border-radius: 12px;
  background: linear-gradient(180deg, #ffffff 0%, #f5fbff 100%);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  font-family: inherit;
}

.asset-scope-checkbox {
  width: auto;
  grid-template-columns: auto 1fr;
  align-items: center;
  padding-right: 12px;
}

.asset-scope-chip::after {
  content: "▾";
  position: absolute;
  top: 50%;
  right: 10px;
  transform: translateY(-50%);
  color: #507089;
  font-size: 12px;
}

.asset-scope-picker.is-open .asset-scope-chip::after {
  content: "▴";
}

.asset-scope-chip__label {
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.25px;
  color: #6b8296;
}

.asset-scope-chip__value {
  font-size: 12.5px;
  line-height: 1.2;
  color: var(--ink-0);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.asset-scope-picker.has-value .asset-scope-chip {
  border-color: rgba(13, 127, 167, 0.28);
  background: linear-gradient(180deg, rgba(225, 244, 252, 0.95) 0%, rgba(243, 251, 255, 0.98) 100%);
}

.asset-scope-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  z-index: 40;
  width: min(420px, calc(100vw - 48px));
  min-width: 100%;
  border: 1px solid #d9e6f0;
  border-radius: 14px;
  background: #ffffff;
  box-shadow: var(--shadow-lg);
  padding: 10px;
}

.asset-scope-menu[hidden] {
  display: none;
}

.asset-scope-search {
  width: 100%;
  height: 40px;
  border: 1px solid #cfdae4;
  border-radius: 10px;
  padding: 0 12px;
  font-family: inherit;
  font-size: 13px;
}

.asset-scope-options {
  margin-top: 10px;
  max-height: min(320px, 48vh);
  overflow: auto;
  display: grid;
  gap: 6px;
}

.asset-scope-option {
  width: 100%;
  text-align: left;
  border: 1px solid #e2e9ef;
  border-radius: 10px;
  background: #f8fbfe;
  color: var(--ink-0);
  padding: 10px 12px;
  font-family: inherit;
  font-size: 13px;
  cursor: pointer;
}

.asset-scope-option:hover {
  background: #eef7fd;
  border-color: #c6d8e6;
}

.asset-scope-option-clear {
  font-weight: 700;
}

.column-visibility-picker,
.asset-export-csv,
.asset-reset-filters {
  position: relative;
  flex: 0 0 134px;
  min-width: 0;
  max-width: none;
}

.column-visibility-trigger,
.asset-export-csv,
.asset-reset-filters {
  width: 100%;
  min-height: 48px;
  display: grid;
  gap: 8px;
  align-items: center;
  text-align: left;
  padding: 8px 10px;
  border: 1px solid #cfe0eb;
  border-radius: 12px;
  background: linear-gradient(180deg, #ffffff 0%, #f5fbff 100%);
  box-shadow: var(--shadow-sm);
  color: var(--ink-0);
  cursor: pointer;
  font-family: inherit;
}

.column-visibility-trigger {
  grid-template-columns: 20px minmax(0, 1fr);
}

.column-visibility-picker {
  flex-basis: 150px;
}

.asset-export-csv {
  grid-template-columns: 20px minmax(0, 1fr);
  flex-basis: 116px;
}

.asset-reset-filters {
  flex-basis: 112px;
}

.column-visibility-picker.is-open .column-visibility-trigger,
.column-visibility-trigger:hover,
.asset-export-csv:hover,
.asset-reset-filters:hover {
  border-color: rgba(13, 127, 167, 0.32);
  background: linear-gradient(180deg, rgba(225, 244, 252, 0.95) 0%, rgba(243, 251, 255, 0.98) 100%);
}

.column-visibility-trigger__icon,
.asset-export-csv__icon,
.column-visibility-eye {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.column-visibility-trigger__icon {
  color: #0a6d90;
}

.asset-export-csv__icon {
  color: #0a6d90;
}

.asset-export-csv:disabled {
  opacity: 0.65;
  cursor: wait;
}

.column-visibility-menu {
  right: 0;
  left: auto;
  width: min(320px, calc(100vw - 48px));
}

.column-visibility-options {
  display: grid;
  gap: 6px;
  max-height: min(380px, 54vh);
  overflow: auto;
}

.column-visibility-option {
  width: 100%;
  min-height: 38px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 24px;
  gap: 10px;
  align-items: center;
  text-align: left;
  border: 1px solid #e2e9ef;
  border-radius: 10px;
  background: #f8fbfe;
  color: var(--ink-1);
  padding: 8px 10px 8px 12px;
  font-family: inherit;
  font-size: 13px;
  cursor: pointer;
}

.column-visibility-option:hover {
  background: #eef7fd;
  border-color: #c6d8e6;
}

.column-visibility-option.is-visible {
  color: var(--ink-0);
  font-weight: 700;
}

.column-visibility-option:not(.is-visible) .column-visibility-eye {
  opacity: 0.5;
}

.column-visibility-option:disabled {
  cursor: default;
  opacity: 0.6;
}

@keyframes pulse {
  0% {
    background-position: 100% 0;
  }
  100% {
    background-position: 0 0;
  }
}

.table-panel {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--card);
  padding: 14px;
  box-shadow: var(--shadow-sm);
}

.filters {
  position: sticky;
  top: 78px;
  z-index: 25;
  display: grid;
  grid-template-columns: minmax(120px, 0.95fr) minmax(160px, 1.2fr) minmax(120px, 0.95fr) minmax(150px, 1fr) minmax(150px, 1fr) 88px 120px;
  gap: 10px;
  margin-bottom: 12px;
  padding: 10px;
  border: 1px solid #dfe7ef;
  border-radius: 12px;
  background: linear-gradient(180deg, #f9fcff 0%, #eef4f9 100%);
}

.assets-filters {
  grid-template-columns: minmax(120px, 1fr) minmax(180px, 1.4fr) minmax(150px, 1fr) minmax(150px, 1fr) 120px;
}

.filters input,
.filters select,
.filters button {
  border: 1px solid #cfdae4;
  border-radius: 10px;
  height: 38px;
  padding: 0 10px;
  font-family: inherit;
  font-size: 13px;
  background: #ffffff;
}

.filters button {
  border-color: #0a6d90;
  background: linear-gradient(180deg, #0d7fa7 0%, #08688a 100%);
  color: #ffffff;
  font-weight: 700;
  cursor: pointer;
}

.table-wrap {
  width: 100%;
  overflow: auto;
  max-height: calc(100vh - 285px);
  border-radius: 12px;
  border: 1px solid #e2e9ef;
}

.assets-page-panel {
  overflow-x: clip;
  overflow-y: visible;
}

.assets-update-banner {
  display: grid;
  gap: 8px;
  margin-bottom: 12px;
  padding: 12px 14px;
  border: 1px solid #f1d59a;
  border-radius: 12px;
  background: linear-gradient(180deg, #fff8e5 0%, #fffdf6 100%);
  color: #6b4b04;
}

.assets-update-banner[hidden] {
  display: none !important;
}

.assets-update-banner__title {
  font-size: 14px;
  font-weight: 700;
}

.assets-update-banner__text {
  font-size: 12px;
  color: #8a6720;
}

.assets-update-banner__sources {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.assets-update-banner__source {
  display: inline-flex;
  align-items: flex-start;
  gap: 8px;
  min-width: 220px;
  padding: 8px 10px;
  border: 1px solid rgba(188, 142, 32, 0.18);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.72);
}

.assets-update-banner__badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  background: #c98b11;
  color: #fff8ec;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.4px;
  text-transform: uppercase;
}

.assets-update-banner__source-text {
  display: grid;
  gap: 2px;
  font-size: 11px;
  color: #7a5d1a;
}

.assets-table-wrap {
  overflow-x: visible;
  overflow-y: visible;
  max-height: none;
}

.assets-table {
  width: 100%;
  min-width: 0;
  table-layout: fixed;
  border-collapse: collapse;
  font-size: 11.5px;
}

.assets-table.has-hidden-columns {
  min-width: 0;
}

.assets-table thead th {
  position: sticky;
  top: var(--topbar-height);
  z-index: 10;
  overflow: visible;
  text-align: left;
  background: linear-gradient(180deg, #13334d 0%, #1a4566 100%);
  color: #e5f2fb;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  padding: 8px 5px;
  border-right: 1px solid rgba(255, 255, 255, 0.06);
}

.assets-page-panel .assets-table th[data-column-key="ip"],
.assets-page-panel .assets-table td[data-column-key="ip"] {
  width: 160px;
}

.assets-page-panel .assets-table th[data-column-key="ping"],
.assets-page-panel .assets-table td[data-column-key="ping"] {
  width: 58px;
}

.column-filter {
  position: relative;
  min-width: 0;
  display: grid;
  gap: 6px;
}

.column-filter > span {
  overflow-wrap: anywhere;
  line-height: 1.15;
}

.column-filter__label {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.column-filter__sort {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  font: inherit;
  text-align: left;
  text-transform: inherit;
  letter-spacing: inherit;
}

.column-filter__sort:hover .column-filter__sort-indicator,
.column-filter__sort.is-active .column-filter__sort-indicator {
  opacity: 1;
  color: #ffffff;
}

.column-filter__sort:focus-visible {
  outline: 2px solid rgba(155, 213, 201, 0.6);
  outline-offset: 2px;
  border-radius: 6px;
}

.column-filter__sort-indicator {
  flex: 0 0 auto;
  min-width: 12px;
  color: #9dc0d6;
  opacity: 0.7;
  line-height: 1;
}

.column-filter--updating {
  z-index: 20;
}

.column-update-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 18px;
  padding: 0 6px;
  border-radius: 999px;
  background: rgba(245, 191, 53, 0.18);
  color: #fff0c2;
  border: 1px solid rgba(255, 240, 194, 0.3);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.35px;
  text-transform: uppercase;
}

.column-filter input,
.column-filter select {
  width: 100%;
  min-width: 0;
  height: 30px;
  border: 1px solid rgba(229, 242, 251, 0.28);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.96);
  color: var(--ink-0);
  padding: 0 6px;
  font: inherit;
  font-size: 11px;
  text-transform: none;
}

.column-filter input::placeholder {
  color: #7890a4;
}

.column-filter:focus-within,
.column-filter.is-expanded {
  z-index: 35;
}

.column-filter:focus-within input,
.column-filter:focus-within select,
.column-filter.is-expanded input,
.column-filter.is-expanded select {
  position: relative;
  width: min(260px, calc(100vw - 40px));
  min-width: 180px;
  box-shadow: 0 0 0 2px rgba(155, 213, 201, 0.34);
}

.assets-page-panel .assets-table th[data-column-key="ping"] .column-filter:focus-within select,
.assets-page-panel .assets-table th[data-column-key="ping"] .column-filter.is-expanded select {
  width: 100%;
  min-width: 0;
}

.column-filter-date {
  position: relative;
  grid-template-columns: minmax(0, 1fr);
}

.column-filter-date-controls {
  position: relative;
  min-width: 0;
}

.column-filter-date-controls select {
  padding-right: 28px;
}

.date-picker-toggle {
  position: absolute;
  top: 3px;
  right: 3px;
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #3e617a;
  cursor: pointer;
  padding: 0;
}

.date-picker-toggle:hover,
.date-picker-toggle.is-active {
  box-shadow: 0 0 0 2px rgba(155, 213, 201, 0.34);
}

.date-picker-toggle svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.date-picker-popover {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  width: min(260px, calc(100vw - 40px));
  display: grid;
  gap: 6px;
  padding: 8px;
  border: 1px solid #d4e2ec;
  border-radius: 10px;
  background: #ffffff;
  box-shadow: 0 14px 28px rgba(20, 40, 60, 0.18);
  z-index: 60;
}

.date-picker-popover[hidden] {
  display: none !important;
}

.column-filter-date-range {
  display: grid;
  gap: 6px;
}

.date-picker-actions {
  display: flex;
  justify-content: space-between;
  gap: 8px;
}

.date-picker-actions button {
  min-height: 28px;
  border: 1px solid #d4e2ec;
  border-radius: 8px;
  background: #f8fbfd;
  color: var(--ink-0);
  padding: 0 10px;
  font: inherit;
  font-size: 11px;
  cursor: pointer;
}

.column-filter-date:focus-within,
.column-filter-date.is-expanded {
  z-index: 36;
}

.assets-table td {
  padding: 8px 5px;
  border-bottom: 1px solid #edf2f7;
  vertical-align: top;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.assets-table tbody tr:nth-child(2n) {
  background: #fafcff;
}

.assets-table tbody tr:hover {
  background: #f1f8fd;
}

.asset-ip-copy {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  gap: 5px;
  padding: 2px 5px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: #102a43;
  cursor: pointer;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: inherit;
  line-height: 1.2;
  text-align: left;
}

.asset-ip-copy:hover,
.asset-ip-copy:focus-visible {
  border-color: #b9d5e8;
  background: #eef7fd;
  outline: none;
}

.asset-ip-copy.is-copied {
  border-color: #91d4ad;
  background: #e9f8ef;
  color: #16733a;
}

.asset-ip-copy__value {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.asset-ip-copy__icon {
  display: inline-grid;
  flex: 0 0 auto;
  place-items: center;
  width: 14px;
  height: 14px;
  opacity: 0.42;
  transition: opacity 0.14s ease;
}

.asset-ip-copy:hover .asset-ip-copy__icon,
.asset-ip-copy:focus-visible .asset-ip-copy__icon,
.asset-ip-copy.is-copied .asset-ip-copy__icon,
.assets-table tbody tr:hover .asset-ip-copy__icon {
  opacity: 1;
}

.asset-ip-copy__icon svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.asset-cell-input,
.asset-cell-select,
.asset-cell-textarea {
  width: 100%;
  border: 1px solid #c6d8e6;
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink-0);
  font: inherit;
}

.asset-cell-input,
.asset-cell-select {
  min-height: 34px;
  padding: 0 8px;
}

.asset-cell-textarea {
  min-height: 92px;
  padding: 8px;
  resize: vertical;
  white-space: pre-wrap;
}

.asset-actions {
  min-width: 44px;
  text-align: center;
}

.asset-actions button,
.asset-editor-actions button {
  width: 100%;
  border-radius: 8px;
  border: 1px solid transparent;
  padding: 7px 10px;
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}

.asset-actions button + button,
.asset-editor-actions button + button {
  margin-top: 6px;
}

.asset-edit-btn,
.asset-save-btn {
  background: linear-gradient(180deg, #0d7fa7 0%, #08688a 100%);
  color: #ffffff;
}

.asset-cancel-btn {
  background: #ffffff;
  border-color: #c6d8e6 !important;
  color: var(--ink-0);
}

.asset-actions-cell {
  min-width: 44px;
}

.asset-icon-btn {
  display: inline-grid;
  place-items: center;
  width: 32px !important;
  height: 32px;
  padding: 0 !important;
  border-radius: 8px;
}

.asset-icon-btn svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.asset-editor-row td {
  padding: 0;
  background: #eef8ff;
}

.asset-editor-panel {
  display: grid;
  gap: 16px;
  padding: 18px;
  border-top: 1px solid #d5e4f1;
  background:
    linear-gradient(180deg, rgba(235, 246, 255, 0.95) 0%, rgba(244, 250, 255, 0.98) 100%);
}

.asset-editor-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: baseline;
  font-size: 13px;
  color: var(--ink-1);
}

.asset-editor-summary strong {
  color: var(--ink-0);
  font-size: 15px;
}

.asset-editor-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(180px, 1fr));
  gap: 14px 16px;
}

.asset-editor-field {
  display: grid;
  gap: 6px;
  align-content: start;
}

.asset-editor-field span {
  font-size: 12px;
  font-weight: 700;
  color: #35536b;
}

.asset-static-value {
  min-height: 34px;
  padding: 8px 10px;
  border: 1px solid #dbe7f0;
  border-radius: 8px;
  background: #f7fafc;
  color: var(--ink-0);
  overflow-wrap: anywhere;
}

.asset-static-value-multiline {
  min-height: 54px;
  white-space: pre-wrap;
}

.asset-editor-field-wide {
  grid-column: span 2;
}

.asset-editor-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.asset-editor-actions button {
  width: auto;
  min-width: 140px;
}

.asset-editor-actions button:disabled,
.trusted-port-delete:disabled,
.trusted-port-add-btn:disabled {
  cursor: wait;
  opacity: 0.65;
}

.host-card-message {
  padding: 10px 12px;
  border: 1px solid #a9d6b8;
  border-radius: 8px;
  background: #edf9f0;
  color: #176138;
  font-size: 13px;
  font-weight: 700;
}

.host-card-message[data-tone="error"] {
  border-color: #f0b8b0;
  background: #fff1ef;
  color: #b42318;
}

.asset-expand-header,
.asset-expand-cell {
  width: 34px;
  min-width: 34px;
  text-align: center;
}

.asset-expand-btn {
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.asset-expand-btn span {
  display: block;
  width: 0;
  height: 0;
  border-top: 6px solid transparent;
  border-bottom: 6px solid transparent;
  border-left: 9px solid #111111;
  transition: transform 0.16s ease;
}

.asset-expand-btn[aria-expanded="true"] span {
  transform: rotate(90deg);
}

.assets-table tbody tr.is-expanded {
  background: #f6fbff;
}

.ports-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  align-items: center;
}

.port-badge {
  position: relative;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 2px 7px;
  font-size: 12px;
  line-height: 1.25;
  white-space: nowrap;
}

.port-badge--trusted {
  border: 1px solid #91d4ad;
  background: #e9f8ef;
  color: #16733a;
}

.port-badge--untrusted {
  color: #b42318;
  font-weight: 700;
}

.port-badge--with-tooltip {
  cursor: help;
}

.port-badge-tooltip {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 3000;
  display: none;
  width: min(360px, 82vw);
  max-width: calc(100vw - 16px);
  border: 1px solid #cbd8e6;
  border-radius: 12px;
  padding: 10px 12px;
  background: #fff;
  color: #26384f;
  box-shadow: 0 14px 34px rgba(28, 48, 74, 0.18);
  font-size: 12px;
  font-weight: 400;
  line-height: 1.35;
  white-space: normal;
}

.port-badge-tooltip::after {
  content: "";
  position: absolute;
  left: var(--tooltip-arrow-left, 50%);
  top: 100%;
  width: 10px;
  height: 10px;
  transform: translate(-50%, -5px) rotate(45deg);
  border-right: 1px solid #cbd8e6;
  border-bottom: 1px solid #cbd8e6;
  background: #fff;
}

.port-badge-tooltip.is-below::after {
  top: auto;
  bottom: 100%;
  transform: translate(-50%, 5px) rotate(45deg);
  border: 0;
  border-left: 1px solid #cbd8e6;
  border-top: 1px solid #cbd8e6;
}

.port-badge-tooltip strong,
.port-badge-tooltip span {
  display: block;
}

.port-badge-tooltip strong {
  margin-bottom: 6px;
  color: #102a43;
  font-size: 13px;
  font-weight: 700;
}

.port-badge--with-tooltip:hover .port-badge-tooltip,
.port-badge--with-tooltip:focus .port-badge-tooltip,
.port-badge--with-tooltip:focus-within .port-badge-tooltip {
  display: block;
}

.port-catalog-inline-form textarea {
  min-width: 240px;
  max-width: 320px;
}

.asset-host-card-row td {
  padding: 0;
  background: #f7fbff;
}

.asset-host-card {
  display: grid;
  grid-template-columns: minmax(260px, 0.95fr) minmax(360px, 1.1fr) minmax(240px, 0.8fr);
  gap: 22px;
  padding: 18px 28px 22px;
  border: 2px solid #1c1c1c;
  background:
    linear-gradient(90deg, rgba(248, 251, 253, 0.98), rgba(255, 255, 255, 0.98)),
    repeating-linear-gradient(0deg, rgba(34, 51, 68, 0.04) 0 1px, transparent 1px 16px);
}

.host-card-section {
  display: grid;
  align-content: start;
  gap: 12px;
}

.host-card-info {
  grid-template-columns: minmax(220px, 0.95fr) minmax(260px, 1.25fr);
  column-gap: 12px;
}

.host-card-title {
  font-size: 15px;
  font-weight: 800;
  color: #111111;
}

.host-card-title-secondary {
  margin-top: 2px;
  color: #35536b;
}

.host-card-headline {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  align-items: baseline;
  font-size: 15px;
}

.host-card-headline strong {
  font-size: 17px;
}

.host-card-headline > span {
  background: #eef6ff;
}

.host-card-reference {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: minmax(82px, 0.7fr) minmax(150px, 1.4fr) minmax(170px, 1.5fr) minmax(82px, 0.7fr);
  gap: 8px 14px;
  margin: 0;
  padding: 9px 10px;
  width: 100%;
  box-sizing: border-box;
  border: 1px solid #dbe7f0;
  border-radius: 8px;
  background: #ffffff;
}

.host-card-device-type {
  grid-column: 1 / -1;
}

.host-card-reference__item {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.host-card-reference dt {
  color: #637991;
  font-size: 11px;
  font-weight: 700;
}

.host-card-reference dd {
  min-width: 0;
  margin: 0;
  color: #163457;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.trusted-ports-table {
  width: 100%;
  border-collapse: collapse;
  background: #ffffff;
}

.trusted-ports-table td {
  padding: 7px 9px;
  border: 1px solid #1f2933;
  vertical-align: top;
}

.trusted-ports-table td:first-child {
  width: 96px;
  text-align: center;
  font-weight: 700;
}

.trusted-ports-table td:last-child {
  width: 42px;
  text-align: center;
}

.trusted-ports-empty {
  padding: 12px;
  border: 1px dashed #c6d8e6;
  border-radius: 8px;
  color: var(--ink-1);
  background: #ffffff;
}

.trusted-port-delete,
.trusted-port-add-btn {
  border: 1px solid #c6d8e6;
  border-radius: 6px;
  background: #ffffff;
  color: #d92d20;
  cursor: pointer;
  font-weight: 800;
}

.trusted-port-delete {
  width: 26px;
  height: 26px;
}

.trusted-port-add {
  display: grid;
  grid-template-columns: 78px minmax(96px, 0.6fr) minmax(160px, 1fr) 42px;
  gap: 0;
}

.trusted-port-add .asset-cell-select,
.trusted-port-add .asset-cell-input,
.trusted-port-add-btn {
  border-radius: 0;
}

.trusted-port-add-btn {
  color: #1f65b7;
  font-size: 24px;
  line-height: 1;
}

.host-card-controls {
  gap: 18px;
}

.ports-badges-card {
  min-height: 30px;
}

.host-card-flags {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.loading-row {
  text-align: center;
  color: var(--ink-1);
  padding: 24px;
}

.pager {
  margin-top: 11px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: space-between;
}

.pager-nav,
.pager-pages,
.pager-size,
.pager-jumper {
  display: flex;
  align-items: center;
  gap: 8px;
}

.pager button,
.pager-page,
.pager-size select,
.pager-jumper input {
  border: 1px solid #ccdae4;
  border-radius: 10px;
  background: #ffffff;
  min-height: 38px;
  padding: 0 12px;
  font-family: inherit;
  font-size: 13px;
}

.pager button,
.pager-page {
  cursor: pointer;
}

.pager button:hover,
.pager-page:hover {
  background: #f2f8fd;
}

.pager button:disabled {
  opacity: 0.45;
  cursor: default;
  background: #f6f8fb;
}

.pager-page {
  min-width: 38px;
  padding: 0 10px;
}

.pager-page.is-active {
  border-color: #0a6d90;
  background: linear-gradient(180deg, #0d7fa7 0%, #08688a 100%);
  color: #ffffff;
  font-weight: 700;
}

.pager-ellipsis {
  min-width: 20px;
  text-align: center;
  color: var(--ink-1);
  font-size: 14px;
}

.pager-total,
.pager-size span,
.pager-jumper span {
  color: var(--ink-1);
  font-size: 13px;
}

.pager-size select {
  min-width: 88px;
}

.pager-total {
  min-width: 96px;
}

.pager-jumper input {
  width: 68px;
  text-align: center;
}

.login-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 18% 8%, rgba(13, 127, 167, 0.22), transparent 38%),
    radial-gradient(circle at 82% 10%, rgba(15, 157, 135, 0.24), transparent 36%),
    linear-gradient(180deg, #eaf3fa 0%, #dde9f3 100%);
}

@media (max-width: 1180px) {
  .asset-scope-picker,
  .column-visibility-picker,
  .asset-export-csv,
  .asset-reset-filters {
    min-width: calc(50% - 6px);
    max-width: none;
  }

  .filters {
    grid-template-columns: repeat(3, minmax(160px, 1fr));
  }

  .asset-editor-grid {
    grid-template-columns: repeat(2, minmax(180px, 1fr));
  }

  .asset-host-card {
    grid-template-columns: 1fr;
    padding: 20px;
  }

  .host-card-info {
    grid-template-columns: 1fr;
  }

  .host-card-reference {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .asset-editor-field-wide {
    grid-column: span 2;
  }

  .host-card-info .asset-editor-field-wide,
  .host-card-device-type,
  .host-card-reference {
    grid-column: 1 / -1;
  }

  .pager {
    justify-content: flex-start;
  }
}

@media (max-width: 860px) {
  .asset-scope-picker,
  .column-visibility-picker,
  .asset-export-csv,
  .asset-reset-filters {
    min-width: 100%;
  }

  .asset-scope-menu,
  .column-visibility-menu {
    width: min(100%, calc(100vw - 32px));
  }

  .trusted-port-add {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .pager-nav,
  .pager-pages,
  .pager-size,
  .pager-jumper {
    flex-wrap: wrap;
  }
}

.flash-list {
  display: grid;
  gap: 8px;
  margin-bottom: 12px;
}

.flash {
  border-radius: 10px;
  border: 1px solid #d7e3ed;
  background: #f5fbff;
  padding: 10px 12px;
  font-size: 13px;
}

.flash.success {
  border-color: #9bd5c9;
  background: #edfbf7;
  color: #1d5b4f;
}

.flash.error {
  border-color: #d56a6a;
  background: linear-gradient(180deg, #fff0f0 0%, #ffe3e3 100%);
  color: #842d2d;
  box-shadow: 0 8px 18px rgba(164, 58, 58, 0.12);
  font-weight: 700;
}

.flash.warning {
  border-color: #e6c88f;
  background: #fff7e9;
  color: #7a5a1c;
}

.login-card {
  width: 420px;
  border-radius: 18px;
  border: 1px solid #c7d9e7;
  background: #ffffff;
  padding: 28px;
  box-shadow: var(--shadow-lg);
}

.login-card h1 {
  margin: 0;
  font-size: 32px;
  letter-spacing: 0.5px;
}

.login-card p {
  margin: 6px 0 18px;
  color: var(--ink-1);
  font-size: 14px;
}

.login-card form {
  display: grid;
  gap: 11px;
}

.login-card label {
  display: grid;
  gap: 6px;
  font-size: 13px;
  color: var(--ink-1);
}

.login-card input {
  height: 40px;
  border: 1px solid #ccdae5;
  border-radius: 10px;
  padding: 0 12px;
  font-family: inherit;
  font-size: 14px;
}

.login-card button {
  height: 42px;
  border: none;
  border-radius: 10px;
  background: linear-gradient(180deg, #0b769b 0%, #085e7d 100%);
  color: #ffffff;
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}

.login-card button:hover {
  background: linear-gradient(180deg, #1285ad 0%, #0a688a 100%);
}

.error {
  margin-top: 11px;
  color: var(--critical);
  font-size: 13px;
  font-weight: 700;
}

@media (max-width: 640px) {
  .topbar {
    align-items: center;
    flex-wrap: wrap;
    gap: 8px 12px;
    height: auto;
    min-height: var(--topbar-height);
    overflow: hidden;
    padding: 10px 16px;
  }

  .brand {
    flex: 1 1 auto;
    min-width: 0;
  }

  .brand-name {
    font-size: 12px;
    line-height: 1.15;
  }

  .menu {
    flex: 1 0 100%;
    gap: 6px;
    order: 3;
    overflow-x: auto;
    padding-top: 2px;
  }

  .menu a {
    flex: 0 0 auto;
    padding: 6px 8px;
  }

  .userbox {
    flex: 0 0 auto;
    gap: 6px;
  }

  .userbox > span {
    display: none;
  }

  .userbox button {
    padding: 5px 8px;
  }
}
