.ip-overview { margin-bottom: 1.25rem; padding-bottom: 1rem; }
.ip-overview > p, .ip-summary { margin-left: 1.25rem; margin-right: 1.25rem; }
.ip-summary { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; margin-top: 1rem; margin-bottom: .75rem; }
.ip-status { display: inline-block; border-radius: 6px; padding: .3rem .6rem; font-size: .9rem; font-weight: 600; white-space: nowrap; }
.ip-status-unknown { background: #eef0f3; color: #505d69; }
.ip-status-free { background: #e1f2e9; color: #195c3d; }
.ip-status-reserved { background: #fff0d4; color: #765000; }
.ip-status-used { background: #e4ecfa; color: #294f88; }
.ip-reservation-label { display: block; max-width: 18rem; margin-top: .4rem; white-space: normal; overflow-wrap: anywhere; }
.asset-table.ip-table table { width: 100%; min-width: 700px; }
.ip-table td { white-space: normal; }
.ip-editor-row > td { padding: 1.25rem; background: #f0f6f4; }
.ip-quick-form { text-align: left; white-space: normal; }
.ip-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.ip-form-grid input, .ip-form-grid select, .ip-form-grid textarea { width: 100%; max-width: 100%; }
.ip-quick-form .field { min-width: 0; }
#id_subnet_categories, #id_subnet_custom_fields { max-height: 20rem; overflow-y: auto; padding: .5rem; border: 1px solid var(--line); border-radius: 6px; }
[id^="ip-"]:target { outline: 2px solid #206a5d; outline-offset: -2px; }
@media (max-width: 760px) { .ip-form-grid { grid-template-columns: 1fr; } }

:root {
  --bg: #f4f6f8;
  --surface: #ffffff;
  --surface-muted: #f7f8fa;
  --ink: #17212b;
  --muted: #677481;
  --line: #dfe4e8;
  --accent: #206a5d;
  --accent-dark: #174d44;
  --danger: #b23b3b;
  --sidebar: #14211f;
  --radius: 12px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--bg);
}

* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; background: var(--bg); }
a { color: inherit; }
button, input, select { font: inherit; }
.sr-only { position: absolute; overflow: hidden; width: 1px; height: 1px; padding: 0; border: 0; margin: -1px; clip: rect(0, 0, 0, 0); white-space: nowrap; }
.skip-link { position: fixed; z-index: 100; top: 8px; left: 8px; padding: 9px 12px; border-radius: 8px; color: white; background: var(--accent); transform: translateY(-150%); }
.skip-link:focus { transform: translateY(0); }
:focus-visible { outline: 3px solid rgba(32, 106, 93, .42); outline-offset: 2px; }

.app-shell { display: grid; grid-template-columns: 248px minmax(0, 1fr); min-height: 100vh; }
.sidebar { position: sticky; top: 0; height: 100vh; height: 100dvh; min-width: 0; display: flex; flex-direction: column; overflow-y: auto; padding: 22px 16px; color: #edf5f3; background: var(--sidebar); }
.brand, .auth-brand { display: flex; align-items: center; gap: 10px; font-size: 19px; font-weight: 750; text-decoration: none; }
.brand { flex-shrink: 0; padding: 0 8px 22px; }
.brand-mark { display: inline-grid; width: 31px; height: 31px; place-items: center; border-radius: 9px; color: white; background: var(--accent); font-weight: 800; }
.nav { display: flex; flex: 1; flex-direction: column; gap: 3px; }
.desktop-navigation { min-height: 0; overflow-y: auto; overscroll-behavior-y: contain; scrollbar-width: thin; scrollbar-color: #71827d var(--sidebar); padding: 0 4px 10px; }
.desktop-navigation > * { flex-shrink: 0; }
.nav-heading { margin: 20px 10px 6px; color: #849690; font-size: 11px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; }
.nav-item { display: flex; justify-content: space-between; gap: 8px; overflow-wrap: anywhere; padding: 10px; border-radius: 8px; color: #dce7e4; text-decoration: none; }
.nav-item:hover { background: #20332f; }
.nav-item.is-active { color: white; background: #29423c; }
.nav-item.is-disabled { color: #71827d; cursor: default; }
.nav-item small { font-size: 10px; }
.nav-badge { flex-shrink: 0; align-self: flex-start; min-width: 21px; padding: 2px 6px; border-radius: 999px; color: #123c34; background: #bce5d9; font-size: 10px; font-weight: 800; text-align: center; }
.nav-item-nested { padding-top: 7px; padding-bottom: 7px; padding-left: 22px; color: #9fb0ab; font-size: 13px; }
.mobile-navigation { display: none; }
.sidebar-footer { flex-shrink: 0; border-top: 1px solid #2b3c38; padding-top: 16px; }
.user-summary { display: flex; min-width: 0; flex-direction: column; gap: 3px; overflow-wrap: anywhere; padding: 0 8px 12px; }
.user-summary span { color: #9fb0ab; font-size: 12px; }
.main-column { min-width: 0; }
.topbar { display: flex; align-items: center; height: 64px; padding: 0 34px; border-bottom: 1px solid var(--line); background: rgba(255,255,255,.88); }
.search-placeholder { width: min(520px, 100%); padding: 9px 13px; border: 1px solid var(--line); border-radius: 9px; color: #98a1aa; background: var(--surface-muted); font-size: 13px; }
.global-search { display: flex; width: min(640px, 100%); overflow: hidden; border: 1px solid var(--line); border-radius: 9px; background: var(--surface-muted); }
.global-search:focus-within { border-color: var(--accent); outline: 3px solid rgba(32, 106, 93, .11); }
.global-search input { min-width: 0; flex: 1; padding: 9px 13px; border: 0; outline: 0; color: var(--ink); background: transparent; }
.global-search button { padding: 7px 14px; border: 0; color: var(--accent); background: transparent; cursor: pointer; font-weight: 700; }
.content { width: min(1180px, 100%); margin: 0 auto; padding: 34px; }
.page-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 26px; }
.page-actions { display: flex; flex-wrap: wrap; gap: 9px; }
.page-header > *, .page-actions, .section-header > *, .detail-field, .reference-row > span { min-width: 0; max-width: 100%; }
h1, h2, h3, .lead, .detail-field, .breadcrumbs, .reference-row { overflow-wrap: anywhere; }
h1 { margin: 2px 0 7px; font-size: clamp(28px, 4vw, 38px); letter-spacing: -.035em; }
.lead { margin: 0; color: var(--muted); }
.eyebrow { margin: 0; color: var(--accent); font-size: 12px; font-weight: 750; letter-spacing: .1em; text-transform: uppercase; }
.card-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.card, .form-card, .table-wrap { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: 0 8px 26px rgba(27, 40, 44, .04); }
.card { min-height: 180px; padding: 22px; }
.card-label { display: block; color: var(--muted); font-size: 12px; text-transform: uppercase; }
.card-value { display: block; margin: 20px 0 8px; font-size: 22px; }
.card p { margin: 0; color: var(--muted); line-height: 1.55; }
.dashboard-updates { margin-top: 24px; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: 0 8px 26px rgba(27, 40, 44, .04); }
.dashboard-update-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.dashboard-update { display: flex; min-width: 0; flex-direction: column; align-items: flex-start; gap: 8px; padding: 19px 21px; border-right: 1px solid var(--line); text-decoration: none; }
.dashboard-update:last-child { border-right: 0; }
.dashboard-update:hover { background: var(--surface-muted); }
.dashboard-update strong { font-size: 15px; }
.dashboard-update small { color: var(--muted); line-height: 1.45; }
.text-link { color: var(--accent); font-weight: 650; text-decoration: none; }
.text-link:hover { text-decoration: underline; }
.resource-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.resource-card { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 15px; min-height: 108px; padding: 18px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: 0 8px 26px rgba(27, 40, 44, .04); text-decoration: none; transition: border-color .15s, transform .15s; }
.resource-card:hover { border-color: #aabbb6; transform: translateY(-1px); }
.resource-card strong, .resource-card small { display: block; }
.resource-card strong { margin-bottom: 6px; font-size: 17px; }
.resource-card small { color: var(--muted); line-height: 1.4; }
.resource-icon { display: grid; width: 43px; height: 43px; place-items: center; border-radius: 11px; color: var(--accent); background: #e3f0ed; font-size: 12px; font-weight: 800; }
.resource-arrow { color: var(--muted); font-size: 20px; }
.empty-state { grid-column: 1 / -1; padding: 48px 24px; border: 1px dashed #c9d1d6; border-radius: var(--radius); color: var(--muted); text-align: center; }
.empty-state strong { display: block; color: var(--ink); font-size: 18px; }
.empty-state p { margin: 8px 0 20px; }
.section-card { overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: 0 8px 26px rgba(27, 40, 44, .04); }
.section-header { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; padding: 19px 21px; border-bottom: 1px solid var(--line); }
.section-header h2 { margin: 0 0 4px; font-size: 19px; }
.section-header p { margin: 0; color: var(--muted); font-size: 13px; }
.archive-section { margin-top: 20px; }
.tree-list { display: grid; }
.tree-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 58px; padding: 9px 16px 9px calc(18px + var(--tree-depth) * 26px); border-bottom: 1px solid var(--line); }
.tree-row:last-child { border-bottom: 0; }
.tree-main { display: flex; align-items: center; min-width: 0; gap: 10px; }
.tree-main > span:last-child { min-width: 0; overflow-wrap: anywhere; }
.tree-main strong, .tree-main small { display: block; }
.tree-title { display: block; color: var(--ink); font-weight: 700; text-decoration: none; }
.tree-title:hover { color: var(--accent); }
.tree-main small { overflow: hidden; max-width: 580px; margin-top: 3px; color: var(--muted); text-overflow: ellipsis; white-space: nowrap; }
.tree-branch { width: 15px; color: #90a29d; font-size: 13px; }
.tree-actions { display: flex; align-items: center; gap: 7px; flex-shrink: 0; }
.tree-actions form { display: inline; }
.category-row { flex-wrap: wrap; align-items: flex-start; }
.category-row .tree-actions { flex-wrap: wrap; align-items: flex-start; max-width: 100%; margin-left: auto; }
.category-actions { min-width: 0; max-width: 100%; font-size: 12px; }
.category-actions summary { padding: 6px 10px; border: 1px solid var(--line); border-radius: 7px; color: var(--accent); cursor: pointer; font-weight: 650; }
.category-actions-links { display: grid; gap: 4px; margin-top: 8px; padding: 6px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-muted); }
.category-actions-links a { overflow-wrap: anywhere; }
.icon-action { display: inline-grid; width: 29px; height: 29px; place-items: center; border: 1px solid var(--line); border-radius: 7px; color: var(--accent); text-decoration: none; }
.text-action { padding: 6px; border: 0; color: var(--accent); background: none; cursor: pointer; font: inherit; font-size: 12px; font-weight: 650; text-decoration: none; }
.text-action-danger { color: var(--danger); }
.danger-zone { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-top: 28px; padding: 18px 20px; border: 1px solid #efd2d2; border-radius: var(--radius); background: #fffafa; }
.danger-zone p { margin: 4px 0 0; color: var(--muted); font-size: 13px; }
.danger-zone form { display: flex; align-items: center; gap: 8px; }
.danger-comment { min-height: 38px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; }
.compact-comment { min-height: 36px; padding: 7px 9px; border: 1px solid var(--line); border-radius: 8px; }
.filter-bar { display: flex; align-items: flex-end; flex-wrap: wrap; gap: 10px; margin-bottom: 18px; padding: 15px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.filter-field { display: grid; min-width: 190px; max-width: 100%; flex: 0 1 240px; gap: 5px; }
.filter-field label { color: var(--muted); font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.filter-field input, .filter-field select { width: 100%; min-height: 38px; padding: 7px 9px; border: 1px solid #cfd6dc; border-radius: 8px; background: white; }
.filter-search { flex: 1; min-width: 220px; }
.filter-errors { flex-basis: 100%; color: var(--danger); font-size: 12px; }
.archive-bulk-toolbar { align-items: flex-end; }
.selection-cell { width: 44px; text-align: center; }
.selection-cell input { width: 17px; height: 17px; cursor: pointer; }
.table-primary { color: var(--ink); font-weight: 750; text-decoration: none; }
.table-primary:hover { color: var(--accent); }
.asset-table time { white-space: nowrap; }
.asset-table, .custom-field-table { overflow-x: auto; }
.assignment-counts { display: flex; flex-wrap: wrap; gap: 4px 12px; color: var(--muted); font-size: 12px; white-space: nowrap; }
.assignment-counts strong { color: var(--ink); }
.asset-table table { width: max-content; min-width: 100%; }
.pagination { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 15px; margin-top: 18px; color: var(--muted); font-size: 13px; }
.detail-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: 0 8px 26px rgba(27, 40, 44, .04); }
.detail-field { display: flex; min-height: 105px; flex-direction: column; justify-content: center; gap: 5px; padding: 20px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.detail-field:nth-child(2n) { border-right: 0; }
.detail-field:nth-last-child(-n+2) { border-bottom: 0; }
.detail-field > span { color: var(--muted); font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.detail-field small { color: var(--muted); }
.detail-field code { overflow-wrap: anywhere; color: #47545e; }
.custom-field-details { margin-top: 24px; }
.custom-field-details .detail-grid { border: 0; border-radius: 0; box-shadow: none; }
.empty-custom-fields { border-top: 1px solid var(--line); }
.empty-custom-fields summary { padding: 14px 20px; color: var(--accent); cursor: pointer; font-size: 13px; font-weight: 700; }
.empty-custom-fields[open] summary { border-bottom: 1px solid var(--line); }
.reference-text { white-space: pre-wrap; }
.asset-reference { color: var(--accent); font-weight: 700; text-decoration: underline; text-decoration-color: #9abdb5; text-underline-offset: 2px; }
.asset-reference.is-archived { color: var(--muted); text-decoration-style: dashed; }
.reference-backlinks { margin-top: 24px; }
.reference-list { display: grid; }
.reference-row { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 14px 20px; border-bottom: 1px solid var(--line); text-decoration: none; }
.reference-row:last-child { border-bottom: 0; }
.reference-row:hover { background: var(--surface-muted); }
.reference-row > span { display: flex; flex-direction: column; gap: 4px; }
.reference-row > span:last-child { align-items: flex-end; }
.reference-row small { color: var(--muted); }
.button { display: inline-flex; align-items: center; justify-content: center; max-width: 100%; min-height: 38px; padding: 8px 13px; border: 1px solid transparent; border-radius: 8px; background: none; cursor: pointer; font-weight: 650; text-align: center; overflow-wrap: anywhere; text-decoration: none; }
.button-primary { color: white; background: var(--accent); }
.button-primary:hover { background: var(--accent-dark); }
.button-quiet { border-color: var(--line); color: inherit; background: var(--surface); }
.sidebar .button-quiet { border-color: #3b4c48; color: #dce7e4; background: transparent; }
.button-danger { border-color: #efd2d2; color: var(--danger); background: #fff7f7; }
.button-full { width: 100%; }
.breadcrumbs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; color: var(--muted); font-size: 13px; }
.breadcrumbs a { color: var(--accent); text-decoration: none; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 14px 16px; border-bottom: 1px solid var(--line); text-align: left; }
th { color: var(--muted); background: var(--surface-muted); font-size: 12px; letter-spacing: .04em; text-transform: uppercase; }
tbody tr:last-child td { border-bottom: 0; }
.table-actions { text-align: right; }
.action-group { display: inline-flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 8px; max-width: 100%; vertical-align: middle; }
.action-group-start { justify-content: flex-start; }
.action-group > form { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0; min-width: 0; max-width: 100%; }
.action-group .compact-comment { width: 190px; min-width: 0; max-width: 100%; }
.muted, .help { color: var(--muted); }
.help { margin-top: 5px; font-size: 12px; line-height: 1.4; }
.help ul { margin: 6px 0; padding-left: 20px; }
.badge { display: inline-block; padding: 4px 8px; border-radius: 999px; color: var(--muted); background: #e9edf0; font-size: 11px; font-weight: 700; }
.badge-good { color: #176244; background: #dff3e9; }
.update-badge-new { color: #176244; background: #dff3e9; }
.update-badge-improvement { color: #31558a; background: #e5eefb; }
.update-badge-fix { color: #81591b; background: #fff0cf; }
.update-badge-security { color: #8c3535; background: #fae3e3; }
.release-list { display: grid; gap: 18px; }
.release-card { scroll-margin-top: 82px; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: 0 8px 26px rgba(27, 40, 44, .04); }
.release-card.is-unread { border-color: #9bc8bd; box-shadow: 0 8px 30px rgba(32, 106, 93, .09); }
.release-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; padding: 22px 24px; }
.release-header h2 { margin: 10px 0 5px; font-size: 22px; }
.release-header p { margin: 0; color: var(--muted); line-height: 1.5; }
.release-header .badge + .badge { margin-left: 5px; }
.release-meta { display: flex; flex-shrink: 0; flex-direction: column; align-items: flex-end; gap: 5px; color: var(--muted); font-size: 12px; }
.release-meta strong { color: var(--ink); }
.release-body { padding: 20px 24px 24px; border-top: 1px solid var(--line); }
.release-body h2 { font-size: 18px; }
.empty { padding: 32px; color: var(--muted); text-align: center; }
.messages { display: grid; gap: 8px; margin-bottom: 20px; }
.message { padding: 12px 14px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
.message-success { border-color: #b7dfcc; background: #effaf5; }
.message-error { border-color: #efd2d2; background: #fff7f7; }
.message-warning { border-color: #ead59d; background: #fff9e8; }
.auth-shell { display: grid; min-height: 100vh; place-items: center; padding: 24px; background: radial-gradient(circle at 20% 0%, #dcebe7 0, transparent 35%), var(--bg); }
.auth-card { display: grid; width: min(420px, 100%); gap: 28px; padding: 34px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); box-shadow: 0 24px 60px rgba(28, 45, 43, .1); }
.auth-card h1 { margin-bottom: 6px; }
.auth-note { margin: 0; color: var(--muted); font-size: 12px; text-align: center; }
.stack { display: grid; gap: 17px; }
[hidden] { display: none !important; }
.field { display: grid; min-width: 0; gap: 7px; }
.field input, .field select, .field textarea { min-width: 0; max-width: 100%; }
.field label { font-size: 13px; font-weight: 700; }
.field input, .field select, .field textarea { width: 100%; min-height: 42px; padding: 9px 11px; border: 1px solid #cfd6dc; border-radius: 8px; color: var(--ink); background: white; }
.field input[type="checkbox"] { width: auto; min-height: 0; padding: 0; }
.field ul { display: flex; flex-wrap: wrap; gap: 8px 18px; margin: 0; padding: 10px 0; list-style: none; }
.field ul label { display: flex; align-items: center; gap: 7px; font-weight: 500; }
.field textarea { resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--accent); outline: 3px solid rgba(32, 106, 93, .11); }
.form-card { width: min(700px, 100%); padding: 26px; }
.form-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; padding-top: 8px; }
.form-errors, .field-error { color: var(--danger); }
.form-errors { padding: 11px; border-radius: 7px; background: #fff3f3; }
.form-errors ul { margin: 0; padding-left: 20px; }
.field-error { font-size: 12px; }
.form-section-title { display: flex; flex-direction: column; gap: 4px; margin-top: 8px; padding-top: 20px; border-top: 1px solid var(--line); }
.form-section-title span, .custom-fields-empty { font-size: 12px; }
.custom-fields-empty { padding: 15px; border: 1px dashed var(--line); border-radius: 8px; }
.required-mark { color: var(--danger); }
#custom-fields[aria-busy="true"] { opacity: .55; }
.audit-list { display: grid; gap: 14px; }
.audit-card { overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: 0 8px 26px rgba(27, 40, 44, .04); }
.audit-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 18px 10px; }
.audit-header > div { display: flex; min-width: 0; flex-wrap: wrap; align-items: center; gap: 10px; }
.audit-header time, .audit-meta { color: var(--muted); font-size: 12px; }
.audit-target { color: var(--ink); font-size: 16px; text-decoration: none; }
.audit-target:hover { color: var(--accent); }
.audit-meta { display: flex; flex-wrap: wrap; gap: 12px; padding: 0 18px 13px; overflow-wrap: anywhere; }
.audit-comment { margin: 0 18px 14px; padding: 10px 12px; border-left: 3px solid #9abdb5; background: var(--surface-muted); font-size: 13px; }
.audit-source { margin: -5px 18px 14px; color: var(--muted); font-size: 12px; }
.change-list { border-top: 1px solid var(--line); }
.change-row { display: grid; grid-template-columns: minmax(140px, .7fr) 2fr; gap: 16px; padding: 12px 18px; border-bottom: 1px solid var(--line); }
.change-row:last-child { border-bottom: 0; }
.change-label { font-weight: 700; }
.change-values { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 10px; align-items: start; overflow-wrap: anywhere; }
.change-values b { color: var(--muted); }
.field-change { padding: 4px 18px 18px; }
.history-icon { margin-left: 5px; color: var(--accent); font-size: 13px; text-decoration: none; }
.audit-filters .filter-field { min-width: 160px; }
.rollback-link { display: block; margin-top: 5px; color: var(--accent); font-size: 11px; font-weight: 650; text-decoration: none; }
.audit-actions { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 8px; padding: 11px 18px; border-top: 1px solid var(--line); background: var(--surface-muted); }
.audit-actions .button { min-height: 32px; padding: 6px 10px; font-size: 12px; }
.rollback-preview { margin-bottom: 18px; }
.rollback-form { width: 100%; }
.rollback-blockers { margin-bottom: 18px; padding: 16px 18px; border: 1px solid #efd2d2; border-radius: var(--radius); color: var(--danger); background: #fff7f7; }
.rollback-blockers ul { margin: 8px 0 0; padding-left: 20px; }
.rollback-blockers a { color: inherit; font-weight: 700; }
.blocking-reference-list { display: grid; gap: 6px; }
.button:disabled { opacity: .45; cursor: not-allowed; }
.button[aria-disabled="true"] { opacity: .45; cursor: not-allowed; pointer-events: none; }
.import-help { margin-top: 20px; }
.mapping-table select { min-width: 240px; }
.import-sample { display: block; max-width: 440px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.search-summary { margin: 0 0 12px; color: var(--muted); font-size: 13px; }
.search-results { display: grid; gap: 11px; }
.search-result { display: grid; grid-template-columns: minmax(220px, .8fr) minmax(0, 1.2fr); gap: 22px; padding: 18px 20px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: 0 8px 26px rgba(27, 40, 44, .04); }
.search-result-main { min-width: 0; }
.search-result-main > a { display: block; margin: 9px 0 4px; color: var(--ink); font-size: 18px; font-weight: 750; text-decoration: none; }
.search-result-main > a:hover { color: var(--accent); }
.search-result-main p { margin: 0; color: var(--muted); font-size: 13px; overflow-wrap: anywhere; }
.search-contexts { display: grid; align-content: center; gap: 6px; margin: 0; padding: 0; color: #43505a; font-size: 13px; list-style: none; }
.search-contexts li { padding: 7px 9px; border-radius: 7px; background: var(--surface-muted); overflow-wrap: anywhere; }
.error-page { width: min(620px, 100%); margin: 8vh auto 0; padding: 34px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); box-shadow: 0 20px 55px rgba(27, 40, 44, .08); text-align: center; }
.error-page h1 { margin-bottom: 10px; }
.error-page > p { color: var(--muted); line-height: 1.6; }
.error-code { margin: 0; color: var(--accent) !important; font-size: 13px; font-weight: 800; letter-spacing: .16em; }
.error-request { overflow-wrap: anywhere; font-size: 12px; }
.error-page .button { margin-top: 10px; }

@media (max-width: 850px) {
  .app-shell { grid-template-columns: 1fr; }
  .sidebar { position: static; width: 100%; height: auto; overflow: visible; }
  .desktop-navigation { display: none; }
  .mobile-navigation { display: block; margin-bottom: 14px; }
  .mobile-navigation summary { padding: 10px; border: 1px solid #3b4c48; border-radius: 8px; cursor: pointer; font-weight: 700; }
  .mobile-navigation[open] summary { margin-bottom: 8px; }
  .mobile-navigation-links { display: flex; flex-direction: column; gap: 3px; max-height: 60vh; overflow-y: auto; }
  .mobile-navigation-links .nav-heading { margin-top: 13px; }
  .sidebar-footer { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; padding-top: 12px; }
  .sidebar-footer form { width: auto; }
  .card-grid { grid-template-columns: 1fr; }
  .dashboard-update-grid { grid-template-columns: 1fr; }
  .dashboard-update { border-right: 0; border-bottom: 1px solid var(--line); }
  .dashboard-update:last-child { border-bottom: 0; }
  .resource-grid { grid-template-columns: 1fr; }
  .detail-grid { grid-template-columns: 1fr; }
  .detail-field, .detail-field:nth-child(2n), .detail-field:nth-last-child(-n+2) { border-right: 0; border-bottom: 1px solid var(--line); }
  .detail-field:last-child { border-bottom: 0; }
  .filter-bar { align-items: stretch; flex-direction: column; }
  .filter-field, .filter-search { width: 100%; min-width: 0; flex: auto; }
  .asset-table table, .asset-table tbody, .asset-table tr, .asset-table td { display: block; width: 100%; }
  .asset-table table, .asset-table.ip-table table { min-width: 0; }
  .asset-table thead { display: none; }
  .asset-table tbody tr { padding: 8px 0; border-bottom: 1px solid var(--line); }
  .asset-table tbody tr:last-child { border-bottom: 0; }
  .asset-table td { padding: 8px 14px; border: 0; }
  .asset-table td::before { display: block; margin-bottom: 4px; color: var(--muted); content: attr(data-label); font-size: 10px; font-weight: 750; letter-spacing: .06em; text-transform: uppercase; }
  .topbar, .content { padding-right: 20px; padding-left: 20px; }
  .page-header { align-items: flex-start; flex-direction: column; }
  .release-header { flex-direction: column; }
  .release-meta { align-items: flex-start; }
  .tree-row { align-items: flex-start; flex-direction: column; gap: 8px; padding-left: calc(12px + var(--tree-depth) * 10px); }
  .tree-main { width: 100%; align-items: flex-start; }
  .tree-main > span:last-child { min-width: 0; }
  .tree-main strong, .tree-main small { overflow-wrap: anywhere; white-space: normal; }
  .tree-actions { width: 100%; flex-wrap: wrap; padding-left: 25px; }
  .danger-zone { align-items: flex-start; flex-direction: column; }
  .danger-zone form { width: 100%; align-items: stretch; flex-direction: column; }
  .reference-row { align-items: flex-start; flex-direction: column; }
  .reference-row > span:last-child { align-items: flex-start; }
  .audit-header, .change-row { align-items: flex-start; grid-template-columns: 1fr; flex-direction: column; }
  .change-values { grid-template-columns: 1fr; }
  .search-result { grid-template-columns: 1fr; gap: 12px; }
}
.network-port-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 0.75rem;
  padding: 1.25rem;
}

.network-port {
  display: grid;
  gap: 0.35rem;
  padding: 0.85rem;
  border: 1px solid var(--line);
  border-radius: 0.75rem;
  background: var(--surface-muted);
}

.network-port.is-connected {
  border-color: var(--accent);
  background: rgba(32, 106, 93, 0.08);
}

.network-port.is-stack {
  border-color: #aa7a24;
  background: rgba(170, 122, 36, 0.1);
}

.wiki-filter { align-items: end; }
.wiki-stats { display: flex; gap: 8px; margin: -7px 0 16px; }
.wiki-tree { display: grid; }
.wiki-tree-row { display: flex; align-items: center; justify-content: space-between; gap: 18px; min-height: 66px; padding: 12px 18px 12px calc(18px + var(--wiki-depth) * 28px); border-bottom: 1px solid var(--line); text-decoration: none; }
.wiki-tree-row:last-child { border-bottom: 0; }
.wiki-tree-row:hover { background: var(--surface-muted); }
.wiki-tree-row > span:first-child { min-width: 0; }
.wiki-tree-row strong, .wiki-tree-row small { display: block; }
.wiki-tree-row strong { color: var(--ink); }
.wiki-tree-row small { margin-top: 4px; color: var(--muted); }
.wiki-tree-row > span:last-child { display: flex; align-items: flex-end; flex-direction: column; flex-shrink: 0; }
.wiki-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; align-items: start; gap: 18px; margin-bottom: 20px; }
.wiki-sidebar { display: grid; gap: 18px; }
.wiki-article { min-height: 360px; padding: 28px; }
.compact-card { padding: 18px; }
.compact-card h2, .wiki-preview h2 { margin: 0 0 14px; font-size: 17px; }
.wiki-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 12px; margin: 0; font-size: 13px; }
.wiki-meta dt { color: var(--muted); }
.wiki-meta dd { margin: 0; text-align: right; }
.tag-list { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 16px; }
.block-link { display: block; margin-top: 9px; }
.attachment-form { display: flex; align-items: center; gap: 10px; padding: 18px 20px; border-top: 1px solid var(--line); }
.inline-form { display: inline; }
.link-button { padding: 0; border: 0; background: none; cursor: pointer; font: inherit; }
.danger-text { color: var(--danger); }
.wiki-editor-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(340px, 1fr); align-items: start; gap: 18px; }
.wiki-preview { position: sticky; top: 82px; min-height: 420px; max-height: calc(100vh - 105px); padding: 20px; overflow-y: auto; }
.wiki-preview-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.wiki-preview-header h2 { margin: 0; }
.wiki-preview-header span { color: var(--muted); font-size: 12px; }
.markdown-field textarea { min-height: 430px; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; line-height: 1.55; }
.markdown-field { transition: background .15s, outline-color .15s; }
.markdown-field.is-dragging { border-radius: 10px; background: #edf7f4; outline: 2px dashed var(--accent); outline-offset: 5px; }
.markdown-toolbar { display: flex; align-items: center; flex-wrap: wrap; gap: 4px; padding: 7px; border: 1px solid var(--line); border-bottom: 0; border-radius: 9px 9px 0 0; background: var(--surface-muted); }
.markdown-toolbar button { min-height: 31px; padding: 5px 8px; border: 1px solid transparent; border-radius: 6px; color: var(--ink); background: transparent; cursor: pointer; font-size: 12px; }
.markdown-toolbar button:hover { border-color: var(--line); color: var(--accent); background: var(--surface); }
.toolbar-separator { width: 1px; height: 23px; margin: 0 3px; background: var(--line); }
.markdown-toolbar + .wiki-link-picker + textarea, .markdown-toolbar + textarea { border-radius: 0 0 9px 9px; }
.wiki-link-picker { padding: 11px; border: 1px solid var(--line); border-bottom: 0; background: #fbfcfc; }
.wiki-link-picker label { margin-bottom: 6px; font-size: 12px; }
.wiki-link-picker input { width: 100%; }
.wiki-link-results { display: grid; gap: 4px; max-height: 250px; margin-top: 7px; overflow-y: auto; color: var(--muted); font-size: 12px; }
.wiki-link-option { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 8px 9px; border: 0; border-radius: 7px; color: var(--ink); background: transparent; cursor: pointer; text-align: left; }
.wiki-link-option:hover, .wiki-link-option:focus { background: #e8f2ef; }
.wiki-link-option strong, .wiki-link-option small { display: block; }
.wiki-link-option small { color: var(--muted); text-align: right; }
.editor-hint { margin-top: 7px; color: var(--muted); font-size: 12px; }
.editor-state { display: flex; justify-content: space-between; gap: 12px; padding: 0 4px; color: var(--muted); font-size: 12px; }
.editor-state span:last-child { color: var(--accent); text-align: right; }
.markdown-body { color: var(--ink); line-height: 1.7; overflow-wrap: anywhere; }
.markdown-body > :first-child { margin-top: 0; }
.markdown-body > :last-child { margin-bottom: 0; }
.markdown-body h1, .markdown-body h2, .markdown-body h3 { margin: 1.45em 0 .55em; line-height: 1.25; }
.markdown-body h1 { font-size: 30px; }
.markdown-body h2 { padding-bottom: 7px; border-bottom: 1px solid var(--line); font-size: 23px; }
.markdown-body h3 { font-size: 18px; }
.markdown-body a { color: var(--accent); font-weight: 650; }
.markdown-body img { max-width: 100%; height: auto; border-radius: 8px; }
.markdown-body pre { overflow-x: auto; padding: 14px; border-radius: 8px; background: #17212b; color: #eef5f4; }
.markdown-body code { padding: 2px 5px; border-radius: 5px; background: #edf1f3; font-size: .9em; }
.markdown-body pre code { padding: 0; background: transparent; }
.markdown-body blockquote { margin-left: 0; padding-left: 16px; border-left: 4px solid #9bbab3; color: var(--muted); }
.markdown-body table { width: 100%; border-collapse: collapse; }
.markdown-body th, .markdown-body td { padding: 8px 10px; border: 1px solid var(--line); text-align: left; }
.wiki-link-missing { border-bottom: 1px dashed var(--danger); color: var(--danger); }
.muted { color: var(--muted); }

.category-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 20px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.category-tabs a { padding: 9px 14px; border-radius: 8px; color: var(--accent); font-weight: 650; text-decoration: none; }
.category-tabs a:hover { background: var(--surface-muted); }
.category-tabs a[aria-current="page"] { color: white; background: var(--accent); }
.category-fields-footer { padding: 20px; }
.category-fields-footer h2, .category-fields-footer h3, .category-fields-footer p { margin: 0; }
.category-fields-form small { display: block; margin-top: 5px; }
.category-fields-form select, .category-fields-form input[type="number"] { min-height: 38px; padding: 7px 9px; border: 1px solid #cfd6dc; border-radius: 8px; color: var(--ink); background: white; }
.category-fields-form select { min-width: 190px; max-width: 100%; }
.category-fields-form select:focus, .category-fields-form input:focus { border-color: var(--accent); outline: 3px solid rgba(32, 106, 93, .11); }
.category-fields-form input[type="number"] { width: 105px; }
.category-fields-form input[type="checkbox"], .category-field-picker input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--accent); flex-shrink: 0; }
.category-field-picker { max-height: 280px; overflow-y: auto; padding: 12px; border: 1px solid var(--line); border-radius: 9px; }
.category-field-picker label { display: flex; align-items: center; gap: 10px; padding: 7px 0; font-weight: 400; }
.ip-field-notice { padding: 14px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); }
.ip-field-notice p { margin: 7px 0; }

@media (max-width: 980px) {
  .wiki-layout, .wiki-editor-grid { grid-template-columns: 1fr; }
  .wiki-preview { position: static; }
}

@media (max-width: 600px) {
  .wiki-tree-row { align-items: flex-start; flex-direction: column; padding-left: calc(14px + var(--wiki-depth) * 12px); }
  .wiki-tree-row > span:last-child { align-items: flex-start; }
  .attachment-form { align-items: stretch; flex-direction: column; }
}
