:root {
  color-scheme: dark;
  --bg: #0b0b0b;
  --sidebar: #000000;
  --surface: #161616;
  --surface-2: #202020;
  --surface-3: #292929;
  --text: #f6f6f6;
  --muted: #aaa;
  --muted-2: #828282;
  --accent: #ffffff;
  --accent-bright: #ffffff;
  --accent-wash: #303030;
  --danger: #ffffff;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-width: 360px; background: var(--bg); color: var(--text); }
button, input, select, textarea { font: inherit; color: inherit; border: 0; outline: 0; }
button, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; background: none; }
button:disabled { opacity: .35; cursor: not-allowed; }
button:not(:disabled):hover { color: #fff; background-color: var(--surface-3); }
a { color: var(--accent-bright); text-decoration: none; }
input, select, textarea { background: var(--surface-2); border-radius: 6px; padding: 10px 12px; }
input:focus, select:focus, textarea:focus { background: #333333; outline: 1px solid #ffffff; }
input::placeholder, textarea::placeholder { color: var(--muted-2); }
button:focus-visible, a:focus-visible, summary:focus-visible { outline: 2px solid #ffffff; outline-offset: 2px; }
input[type="checkbox"] { accent-color: var(--accent); width: 18px; height: 18px; }
::selection { color: #000; background: #fff; }
::-webkit-scrollbar { width: 7px; height: 7px; }
::-webkit-scrollbar-thumb { background: #383838; border-radius: 4px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.app-shell { display: grid; grid-template-columns: 244px minmax(0, 1fr); height: 100dvh; overflow: hidden; }
.sidebar { display: flex; flex-direction: column; min-width: 0; padding: 25px 14px 18px; background: var(--sidebar); border-right: 1px solid #292929; overflow: hidden; }
.sidebar-dismiss { display: none; }
.brand { display: flex; align-items: center; gap: 11px; padding: 0 10px 30px; color: var(--text); }
.brand b, .brand small { display: block; }
.brand b { font-size: 18px; letter-spacing: -.6px; }
.brand small { margin-top: 2px; color: var(--muted-2); font-size: 12px; letter-spacing: 2px; text-transform: uppercase; }
.nav { overflow-y: auto; min-height: 0; padding-right: 2px; }
.nav-item { width: 100%; display: grid; grid-template-columns: 19px 1fr auto; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 5px; text-align: left; color: var(--muted); font-size: 13px; }
.nav-item.is-active, .nav-item.is-active:not(:disabled):hover { background: #ffffff; color: #000000; font-weight: 650; }
.nav-icon { font-size: 17px; }
.nav-count, .table-list-count { font-size: 12px; color: var(--muted-2); }
.nav-label { display: flex; justify-content: space-between; margin: 25px 10px 10px; font-size: 12px; font-weight: 600; letter-spacing: 1px; text-transform: uppercase; color: var(--muted-2); }
.database-directory { margin: 0; }
.database-directory summary { cursor: pointer; padding: 9px; border-radius: 6px; font-size: 14px; color: var(--muted); }
.table-filter { display: flex; align-items: center; gap: 7px; margin: 8px 0; padding-left: 10px; background: var(--surface); border-radius: 6px; color: var(--muted-2); }
.table-filter input { min-width: 0; width: 100%; padding-left: 0; background: transparent; font-size: 14px; }
.table-list-item { display: flex; align-items: center; gap: 9px; width: 100%; text-align: left; padding: 9px 10px; border-radius: 5px; font-size: 13px; color: var(--muted); }
.table-list-item.is-active, .table-list-item.is-active:not(:disabled):hover { background: #ffffff; color: #000000; }
.table-list-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.table-list-count { margin-left: auto; }
.table-list-dot { width: 4px; height: 4px; flex-shrink: 0; border-radius: 50%; background: var(--muted-2); }
.table-list-empty, .sidebar-note { padding: 6px 10px; color: var(--muted-2); font-size: 13px; line-height: 1.6; }
.sidebar-footer { display: flex; align-items: center; gap: 10px; margin-top: auto; padding: 20px 10px 0; }
.sidebar-footer b, .sidebar-footer small { display: block; }
.sidebar-footer b { font-size: 13px; font-weight: 500; }
.sidebar-footer small { color: var(--muted-2); font-size: 12px; margin-top: 4px; }
.connection-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); flex-shrink: 0; }
.connection-dot.is-pending, .connection-dot.is-error { background: #aaa; }
.workspace { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.topbar { height: 68px; flex-shrink: 0; display: flex; align-items: center; gap: 14px; padding: 0 26px; }
.sidebar-toggle { display: none !important; }
.workspace-label { margin-right: auto; font-size: 13px; color: var(--muted-2); }
.workspace-label span { padding: 0 12px; color: #555; }
.workspace-label b { font-weight: 500; color: var(--muted); }
.global-search { display: flex; align-items: center; gap: 9px; margin-right: auto; width: min(450px, 50%); background: var(--surface); padding: 0 11px; border-radius: 7px; }
.global-search input { min-width: 0; width: 100%; background: transparent; font-size: 14px; padding-left: 0; }
kbd { white-space: nowrap; background: var(--surface-3); color: var(--muted-2); padding: 3px 5px; border-radius: 4px; font-size: 12px; }
.icon-button, .row-menu { display: grid; place-items: center; background: var(--surface-2); color: var(--muted); border-radius: 6px; }
.icon-button { width: 34px; height: 34px; font-size: 20px; flex-shrink: 0; }
.row-menu { width: 28px; height: 28px; }
.admin-chip { display: flex; align-items: center; gap: 9px; }
.admin-chip > span { width: 31px; height: 31px; border-radius: 50%; display: grid; place-items: center; background: var(--accent-wash); color: var(--accent-bright); font-size: 12px; font-weight: 650; }
.admin-chip b { font-size: 13px; font-weight: 550; }
.admin-chip small { display: block; font-size: 12px; color: var(--muted-2); margin-top: 2px; }
.content { display: flex; flex-direction: column; flex: 1; min-height: 0; padding: 20px 26px 22px; }
.page-heading { display: flex; justify-content: space-between; align-items: center; gap: 18px; margin-bottom: 24px; }
.eyebrow { margin: 0 0 10px; color: var(--muted-2); font-size: 12px; letter-spacing: .6px; }
h1 { margin: 0; font-size: clamp(23px, 2.3vw, 32px); font-weight: 600; letter-spacing: -1px; }
.heading-actions { display: flex; align-items: center; gap: 20px; }
.view-switch { display: flex; gap: 4px; background: var(--surface); border-radius: 7px; padding: 4px; }
.view-switch button { font-size: 13px; padding: 7px 13px; color: var(--muted-2); border-radius: 4px; }
.view-switch button[aria-pressed="true"] { color: white; background: var(--surface-3); }
.sync-state { display: flex; align-items: center; gap: 7px; font-size: 12px; color: var(--muted-2); white-space: nowrap; }
.sync-state i { width: 5px; height: 5px; background: var(--accent); border-radius: 50%; }
.sync-state.is-error { color: var(--accent-bright); }
.sync-state.is-loading i { animation: pulse 1s ease-in-out infinite alternate; }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 36px; padding: 8px 13px; border-radius: 6px; font-size: 14px; font-weight: 550; }
.button-primary { background: var(--accent); color: #0b0b0b; }
.button-primary:not(:disabled):hover { background: var(--accent-bright); color: #0b0b0b; }
.button-ghost { background: var(--surface-2); color: var(--text); }
.button-danger { background: var(--accent-wash); color: var(--accent-bright); }
.text-button { color: var(--muted); font-size: 13px; padding: 7px; border-radius: 5px; }
.metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-bottom: 16px; }
.metrics article { min-width: 0; padding: 14px; background: var(--surface); border-radius: 8px; }
.metrics small, .metrics strong, .metrics span { display: block; }
.metrics small { color: var(--muted); font-size: 13px; }
.metrics strong { margin: 8px 0; font-size: 22px; font-weight: 550; }
.metrics .metric-time { font-size: 17px; }
.metrics span { color: var(--muted-2); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.data-grid { display: grid; grid-template-columns: minmax(0, 1fr) 324px; gap: 12px; flex: 1; min-height: 0; }
.table-panel { min-width: 0; display: flex; flex-direction: column; border-radius: 8px; background: var(--surface); overflow: hidden; }
.panel-tools { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 17px; flex-wrap: wrap; }
.panel-tools h2 { font-size: 14px; margin: 0; }
.panel-tools h2 span { color: var(--muted-2); font-weight: 400; margin-left: 6px; }
.panel-actions { display: flex; align-items: center; gap: 10px; }
.filter-button { padding: 7px 9px; background: var(--surface-2); border-radius: 5px; font-size: 12px; color: var(--muted); }
.page-size-label { color: var(--muted-2); font-size: 12px; }
.page-size-label select { padding: 6px; margin-left: 5px; font-size: 12px; }
.table-scroll { overflow: auto; flex: 1; min-height: 0; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 12px 14px; text-align: left; }
th { background: #1b1b1b; font-size: 12px; font-weight: 500; color: var(--muted-2); }
td { font-size: 14px; color: #ccc; max-width: 270px; overflow: hidden; text-overflow: ellipsis; }
tbody tr { cursor: pointer; }
tbody tr:nth-child(even) { background: #191919; }
tbody tr:hover, tbody tr.is-selected { background: var(--accent-wash); }
.sort-button { color: inherit; text-transform: uppercase; font-size: 12px; padding: 0; }
.sort-direction { padding-left: 5px; color: var(--accent-bright); }
.user-cell { display: flex; align-items: center; gap: 10px; }
.user-cell b { font-weight: 500; }
.avatar { display: grid; place-items: center; flex-shrink: 0; width: 29px; height: 29px; border-radius: 50%; font-size: 11px; font-weight: 600; background: var(--accent-wash); color: var(--accent-bright); }
.avatar-large { width: 38px; height: 38px; font-size: 13px; }
.mono { font-family: ui-monospace, Consolas, monospace; color: var(--muted-2); font-size: 12px; }
.null-value, .status-muted { color: var(--muted-2); }
.status { display: inline-block; font-size: 12px; padding: 4px 7px; border-radius: 4px; background: var(--surface-2); }
.status-green { color: var(--accent-bright); background: var(--accent-wash); }
.pagination { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: auto; padding: 13px 17px; font-size: 12px; color: var(--muted-2); }
.pagination > div { display: flex; gap: 5px; }
.pagination button { padding: 5px 11px; background: var(--surface-2); border-radius: 5px; }
.detail-panel { display: flex; min-width: 0; min-height: 0; border-radius: 8px; background: var(--surface); overflow: hidden; }
.detail-empty { align-self: center; text-align: center; padding: 30px; width: 100%; }
.detail-empty > span { display: block; color: var(--accent); font-size: 35px; }
.detail-empty h2 { font-size: 18px; font-weight: 500; }
.detail-empty p { font-size: 14px; line-height: 1.7; color: var(--muted-2); }
.detail-record { display: flex; flex-direction: column; width: 100%; min-height: 0; }
.inspector-label { padding: 18px 18px 0; margin: 0; font-size: 12px; color: var(--muted-2); }
.detail-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 17px; }
.detail-head > div { display: flex; align-items: center; gap: 11px; min-width: 0; }
.detail-head > div > div { min-width: 0; }
.detail-head h2 { margin: 0; font-size: 17px; font-weight: 550; overflow: hidden; text-overflow: ellipsis; }
.detail-head p { margin: 5px 0 0; font-size: 12px; color: var(--muted-2); overflow-wrap: anywhere; }
.record-navigation { display: flex; align-items: center; gap: 4px; padding: 0 17px 16px; }
.record-navigation .button { font-size: 12px; }
.detail-body { overflow-y: auto; flex: 1; min-height: 0; }
.form-section { padding: 18px; }
.section-title { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-bottom: 16px; }
.section-title h3 { font-size: 14px; margin: 0; font-weight: 500; }
.section-title > span { color: var(--muted-2); font-size: 12px; max-width: 50%; overflow: hidden; text-overflow: ellipsis; }
.field-row { margin-bottom: 17px; }
.field-label { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; font-size: 13px; color: var(--muted); }
.field-type { color: #767676; font-size: 11px; }
.field-row > input:not([type="checkbox"]), .field-row > textarea, .field-row > select { width: 100%; font-size: 14px; }
.field-row > textarea { resize: vertical; min-height: 80px; line-height: 1.5; }
.field-row input:disabled, .field-row textarea:disabled { color: #8e8e8e; background: #1b1b1b; }
.null-toggle { display: flex; align-items: center; gap: 5px; margin-top: 6px; color: var(--muted-2); font-size: 12px; }
.null-toggle input { width: 13px; height: 13px; }
.secret-notice { display: flex; gap: 8px; font-size: 12px; line-height: 1.6; color: var(--muted-2); }
.secret-notice p { margin: 0; overflow-wrap: anywhere; }
.secret-notice > span { color: var(--accent); }
.related-links { display: grid; gap: 5px; }
.related-link { display: grid; grid-template-columns: 1fr auto; text-align: left; padding: 10px; border-radius: 6px; background: var(--surface-2); }
.related-link span { font-size: 13px; }
.related-link small { grid-column: 1; margin-top: 4px; font-size: 12px; color: var(--muted-2); }
.related-link i { grid-column: 2; grid-row: 1 / span 2; align-self: center; color: var(--accent); font-style: normal; }
.full-button { width: 100%; font-size: 12px; line-height: 1.5; }
.full-button + .full-button { margin-top: 8px; }
.detail-actions { display: flex; align-items: center; gap: 6px; padding: 14px; background: #1b1b1b; }
.detail-actions .button { font-size: 12px; padding: 8px 11px; }
.detail-spacer { flex: 1; }
.conflict-banner { margin: 0 16px; padding: 13px; border-radius: 6px; background: var(--accent-wash); }
.conflict-banner b, .conflict-banner span { display: block; font-size: 12px; line-height: 1.5; }
.conflict-banner b { color: var(--accent-bright); }
.conflict-banner span { color: var(--muted); margin-top: 4px; }
.conflict-banner button { margin-top: 7px; padding: 7px; border-radius: 4px; background: #383838; font-size: 12px; }
.active-filter { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; padding: 10px 13px; background: var(--accent-wash); color: var(--accent-bright); border-radius: 6px; font-size: 13px; }
.active-filter button { font-size: 12px; }
.loading-state, .empty-state { margin: auto; padding: 30px; text-align: center; color: var(--muted-2); font-size: 14px; }
.empty-state > span { font-size: 30px; color: var(--accent); }
.empty-state h3 { color: var(--text); font-size: 17px; font-weight: 500; }
.spinner { display: block; width: 12px; height: 12px; background: var(--accent); border-radius: 3px; margin: 12px auto; animation: pulse .8s ease-in-out infinite alternate; }
.graph-panel { display: flex; flex-direction: column; min-width: 0; min-height: 0; position: relative; background: #101010; border-radius: 8px; }
.graph-toolbar { display: flex; gap: 10px; padding: 16px; z-index: 4; }
.user-picker { display: flex; align-items: center; position: relative; gap: 7px; flex: 1; min-width: 0; max-width: 400px; padding: 0 11px; background: var(--surface-2); border-radius: 6px; }
.user-picker > span { color: var(--muted); font-size: 20px; }
.user-picker input { width: 100%; min-width: 0; padding: 10px 0; font-size: 14px; background: transparent; }
.user-picker:focus-within { background: #303030; }
.graph-filter { margin-left: auto; min-width: 0; width: 180px; }
.graph-filter input { width: 100%; font-size: 13px; background: var(--surface); }
.user-results { position: absolute; top: calc(100% + 6px); left: 0; right: 0; max-height: 360px; overflow: auto; padding: 6px; background: #252525; border-radius: 7px; }
.user-result { display: flex; align-items: center; gap: 10px; text-align: left; width: 100%; padding: 11px 9px; border-radius: 5px; }
.user-result > div { display: grid; gap: 4px; min-width: 0; }
.user-result b { font-size: 14px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; }
.user-result small { font-size: 12px; color: var(--muted); overflow-wrap: anywhere; }
.user-result > span:last-child { margin-left: auto; font-size: 12px; color: var(--muted-2); }
.user-results > p { color: var(--muted); padding: 5px 10px; font-size: 13px; }
.graph-focusbar { display: flex; align-items: center; padding: 0 16px; gap: 9px; min-height: 32px; }
.graph-focusbar > span { font-size: 13px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.graph-focusbar .icon-button { width: 26px; height: 26px; background: transparent; }
.graph-focusbar .text-button { margin-left: auto; font-size: 12px; color: var(--accent-bright); white-space: nowrap; }
.graph-main { display: grid; grid-template-columns: 210px minmax(0, 1fr); flex: 1; min-height: 0; }
.graph-sidebar { min-height: 0; overflow-y: auto; padding: 10px 8px; border-right: 1px solid #dedede; background: #f7f7f7; }
.graph-sidebar .nav-label { margin: 8px 8px 12px; }
.graph-sidebar .graph-relation { color: #333; }
.graph-sidebar .graph-relation:not(:disabled):hover { background: #e8e8e8; }
.graph-stage { position: relative; flex: 1; min-height: 260px; overflow: hidden; }
#user-graph { display: block; width: 100%; height: 100%; position: absolute; inset: 0; touch-action: none; user-select: none; }
.graph-node { cursor: pointer; outline: 0; }
.graph-node:focus-visible { filter: brightness(1.5); }
.graph-label { user-select: none; }
.graph-message { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 40px; text-align: center; background: #101010; }
.graph-message h2 { font-size: 23px; font-weight: 500; margin: 14px 0 8px; letter-spacing: -.5px; }
.graph-message p { color: var(--muted-2); font-size: 14px; line-height: 1.7; max-width: 420px; margin: 0 0 14px; }
.map-symbol { color: var(--accent); font-size: 54px; font-weight: 300; }
.graph-legend { position: absolute; left: 20px; bottom: 19px; display: flex; gap: 15px; pointer-events: none; }
.graph-legend > span { display: flex; align-items: center; gap: 7px; font-size: 11px; color: var(--muted-2); }
.graph-legend i { width: 7px; height: 7px; background: var(--accent); border-radius: 50%; }
.graph-legend span:nth-child(2) i { background: #ddd; }
.graph-legend span:nth-child(3) i { background: #707070; }
.graph-controls { position: absolute; right: 17px; bottom: 15px; display: flex; gap: 3px; background: #202020; padding: 4px; border-radius: 6px; }
.graph-controls button { width: 30px; height: 30px; color: var(--muted); font-size: 19px; border-radius: 4px; }
.graph-footer { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 13px 17px; color: var(--muted-2); font-size: 11px; line-height: 1.5; }
.graph-footer span:first-child { color: var(--muted); white-space: nowrap; }
.graph-relation { width: 100%; display: flex; align-items: center; gap: 9px; padding: 10px; border-radius: 6px; text-align: left; color: var(--muted); }
.graph-relation > i { width: 5px; height: 5px; border-radius: 50%; background: var(--accent); flex-shrink: 0; }
.graph-relation > div { display: grid; gap: 3px; min-width: 0; }
.graph-relation b { font-size: 13px; font-weight: 450; overflow: hidden; text-overflow: ellipsis; }
.graph-relation small { font-size: 11px; color: var(--muted-2); }
.graph-relation > span { margin-left: auto; color: var(--muted-2); font-size: 12px; }
.view-home .content > .page-heading, .view-home .content > .metrics, .view-home .content > .active-filter, .view-home .content > .data-grid, .view-home .global-search { display: none; }
.view-home .graph-sidebar, .view-news .graph-sidebar { display: none; }
.view-graph .metrics, .view-graph .table-panel, .view-graph .global-search, .view-graph #active-filter, .view-graph #add-button { display: none; }
.view-table .graph-panel, .view-table .workspace-label, .view-table .graph-sidebar { display: none; }
.view-news .content > .page-heading,
.view-news .content > .metrics,
.view-news .content > .active-filter,
.view-news .content > .data-grid,
.view-news .global-search,
.view-news .view-switch,
.view-news #refresh-button { display: none; }

.home-workspace { min-height: 0; overflow-y: auto; padding: 10px 0 32px; }
.home-heading { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 26px; }
.home-updated { color: var(--muted-2); font-size: 12px; text-align: right; }
.usage-track { height: 9px; overflow: hidden; background: #373737; border-radius: 99px; }
.usage-track > span { display: block; height: 100%; width: 0; background: #ffffff; border-radius: inherit; transition: width .35s ease; }

.news-workspace { min-height: 0; height: 100%; display: flex; flex-direction: column; }
.news-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; margin-bottom: 22px; }
.news-heading h1 { margin: 4px 0 8px; font-size: 31px; letter-spacing: -1px; }
.news-heading > div > p:last-child { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.5; }
.news-layout { display: grid; grid-template-columns: 300px minmax(0, 1fr); min-height: 0; flex: 1; background: var(--surface); border-radius: 10px; overflow: hidden; }
.news-library { display: flex; min-height: 0; flex-direction: column; background: #121212; }
.news-library-head { min-height: 58px; padding: 0 17px; display: flex; align-items: center; justify-content: space-between; background: #191919; }
.news-library-head b { font-size: 14px; }
.news-library-head span { color: var(--muted-2); font-size: 12px; }
.news-list { min-height: 0; overflow-y: auto; }
.news-list-state { padding: 35px 20px; color: var(--muted-2); font-size: 13px; line-height: 1.6; text-align: center; }
.news-list-item { display: grid; grid-template-columns: 58px minmax(0, 1fr); gap: 11px; width: 100%; padding: 13px; color: var(--text); text-align: left; background: transparent; }
.news-list-item + .news-list-item { border-top: 1px solid #202020; }
.news-list-item.is-active { background: #303030; }
.news-list-cover { width: 58px; height: 48px; display: grid; place-items: center; overflow: hidden; border-radius: 5px; background: #272727; color: #747474; font-size: 18px; }
.news-list-cover img { width: 100%; height: 100%; object-fit: cover; }
.news-list-copy { min-width: 0; }
.news-list-copy b { display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: 13px; }
.news-list-copy span { display: block; margin-top: 6px; color: var(--muted-2); font-size: 11px; }
.news-list-copy .is-published { color: var(--accent-bright); }

.news-editor { min-height: 0; overflow-y: auto; background: #181818; }
.news-editor-empty { min-height: 100%; display: grid; place-content: center; justify-items: center; padding: 40px; text-align: center; }
.news-editor-empty > span { display: grid; place-items: center; width: 54px; height: 54px; border-radius: 12px; background: var(--accent-wash); color: var(--accent-bright); font-size: 26px; }
.news-editor-empty h2 { margin: 18px 0 6px; font-size: 20px; }
.news-editor-empty p { max-width: 430px; margin: 0; color: var(--muted); font-size: 14px; line-height: 1.6; }
#news-editor-fields { max-width: 920px; margin: 0 auto; padding: 28px; }
.news-editor-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 24px; }
.news-editor-head h2 { margin: 5px 0 0; font-size: 24px; letter-spacing: -.7px; }
.news-status { padding: 7px 10px; border-radius: 6px; background: #282828; color: var(--muted); font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .7px; }
.news-status.is-published { background: var(--accent-wash); color: var(--accent-bright); }
.news-field { position: relative; display: block; margin-top: 18px; color: var(--muted); font-size: 13px; }
.news-field input, .news-field textarea { display: block; width: 100%; margin-top: 7px; padding-right: 72px; resize: vertical; }
.news-field > small { position: absolute; right: 10px; bottom: 10px; color: var(--muted-2); font-size: 10px; }
.news-cover-section, .news-body-section, .news-preview-section { margin-top: 27px; }
.news-section-label { display: flex; align-items: baseline; justify-content: space-between; gap: 18px; margin-bottom: 10px; }
.news-section-label b { color: var(--text); font-size: 14px; }
.news-section-label span { color: var(--muted-2); font-size: 11px; }
.news-cover-row { display: flex; align-items: center; gap: 16px; padding: 14px; background: #202020; border-radius: 8px; }
.news-cover-preview { width: 160px; aspect-ratio: 16 / 9; flex: none; display: grid; place-items: center; overflow: hidden; border-radius: 6px; background: #101010; color: #696969; font-size: 11px; }
.news-cover-preview img { width: 100%; height: 100%; object-fit: cover; }
.news-cover-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.news-toolbar { display: flex; flex-wrap: wrap; gap: 3px; padding: 7px; background: #242424; border-radius: 7px 7px 0 0; }
.news-toolbar button { min-width: 34px; height: 32px; padding: 0 9px; border-radius: 5px; color: var(--muted); font-size: 12px; }
.news-toolbar button:last-child { margin-left: auto; color: var(--accent-bright); }
#news-body { display: block; width: 100%; min-height: 280px; border-radius: 0 0 7px 7px; resize: vertical; font-family: ui-monospace, "Cascadia Code", monospace; font-size: 13px; line-height: 1.65; }
.news-format-hint { margin: 8px 0 0; color: var(--muted-2); font-size: 11px; }
.news-preview { min-height: 150px; padding: 22px; overflow-wrap: anywhere; background: #202020; border-radius: 8px; color: #eaeaea; font-size: 15px; line-height: 1.7; }
.news-preview-placeholder { color: var(--muted-2); }
.rt-content p { margin: 0 0 11px; }
.rt-content p:last-child { margin-bottom: 0; }
.rt-content .rt-center { text-align: center; }
.rt-content strong { color: #fff; font-weight: 850; }
.rt-content code { padding: 2px 5px; border-radius: 4px; background: #0e0e0e; color: var(--accent-bright); font-family: ui-monospace, "Cascadia Code", monospace; }
.rt-content a { color: var(--accent-bright); text-decoration: underline; }
.rt-content ul { padding-left: 22px; }
.rt-content blockquote { margin: 12px 0; padding: 8px 14px; background: #171717; color: #cfcfcf; }
.rt-content img { display: block; max-width: 100%; max-height: 580px; margin: 16px 0; border-radius: 7px; object-fit: contain; }
.rt-content .rt-center img { margin-inline: auto; }
.news-editor-actions { position: sticky; bottom: -28px; display: grid; grid-template-columns: auto 1fr auto auto; align-items: center; gap: 10px; margin: 28px -28px -28px; padding: 15px 28px; background: #202020; }

.modal { width: min(520px, calc(100vw - 30px)); max-height: calc(100dvh - 40px); padding: 0; border: 0; border-radius: 10px; background: #1c1c1c; color: var(--text); }
.modal::backdrop { background: rgba(0,0,0,.8); }
.modal form { margin: 0; }
.modal header, .modal footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 20px; }
.modal footer { justify-content: flex-end; background: #242424; }
.modal h2 { font-size: 22px; letter-spacing: -.5px; margin: 0; font-weight: 550; }
.modal-close { width: 30px; height: 30px; border-radius: 5px; background: var(--surface-3); color: var(--muted); }
.modal-body { max-height: calc(100dvh - 230px); overflow: auto; padding: 0 20px 24px; }
.modal-body > p { font-size: 14px; line-height: 1.7; color: var(--muted); }
.modal-body > label, .modal-field { display: block; margin-top: 17px; font-size: 14px; color: var(--muted); }
.modal-body > label input, .modal-field input { display: block; width: 100%; margin-top: 7px; background: #303030; }
.modal code { color: var(--accent-bright); }
.toast-region { position: fixed; right: 24px; bottom: 24px; z-index: 50; display: grid; gap: 8px; width: min(400px, calc(100vw - 40px)); }
.toast { display: flex; align-items: flex-start; gap: 10px; padding: 15px; border-radius: 8px; background: #303030; }
.toast-mark { color: var(--accent-bright); font-size: 16px; }
.toast p { margin: 0; color: white; font-size: 14px; line-height: 1.5; }
.login-page { min-height: 100dvh; display: grid; place-items: center; padding: 24px; background: #000000; }
.login-shell { width: min(360px, 100%); }
.login-form { display: grid; gap: 12px; }
.login-form input { width: 100%; height: 48px; padding: 0 16px; background: #161616; border: 1px solid #414141; border-radius: 6px; }
.login-form input:focus { background: #161616; border-color: #fff; }
.login-form input:-webkit-autofill { -webkit-text-fill-color: #fff; box-shadow: 0 0 0 100px #161616 inset; caret-color: #fff; }
.login-form button { min-height: 48px; margin-top: 4px; }
.login-error { margin: 0; padding: 10px 0; color: #fff; font-size: 13px; line-height: 1.5; }
@keyframes pulse { from { opacity: .3; } to { opacity: 1; } }
@media (max-width: 1250px) {
  .app-shell { grid-template-columns: 220px minmax(0, 1fr); }
  .data-grid { grid-template-columns: minmax(0, 1fr) 280px; }
  .content { padding: 16px; }
  .topbar { padding: 0 16px; }
  .graph-footer span:last-child { display: none; }
  .graph-filter { width: 135px; }
  .heading-actions { gap: 10px; }
  .sync-state { font-size: 11px; }
}
@media (max-width: 1000px) {
  .data-grid { grid-template-columns: minmax(0, 1fr); }
  .detail-panel { display: none; position: fixed; z-index: 10; right: 16px; top: 80px; bottom: 20px; width: min(340px, calc(100vw - 32px)); background: #1c1c1c; }
  .detail-panel.is-mobile-open { display: flex; }
  .workspace-label { font-size: 12px; }
  .page-heading { align-items: flex-start; margin-bottom: 18px; }
  .heading-actions { flex-wrap: wrap; justify-content: flex-end; }
  .sync-state { display: none; }
  .metrics { grid-template-columns: repeat(2, 1fr); }
  .news-layout { grid-template-columns: 240px minmax(0, 1fr); }
  #news-editor-fields { padding: 20px; }
  .news-editor-actions { bottom: -20px; margin: 24px -20px -20px; padding: 14px 20px; }
}
@media (max-width: 700px) {
  .app-shell { grid-template-columns: minmax(0, 1fr); }
  .sidebar { position: fixed; z-index: 30; top: 0; bottom: 0; left: 0; width: min(280px, calc(100vw - 48px)); transform: translateX(-100%); transition: transform .2s ease; box-shadow: 12px 0 32px #0009; }
  .sidebar-open .sidebar { transform: translateX(0); }
  .sidebar-dismiss:not([hidden]), .sidebar-dismiss:not([hidden]):hover { display: block; position: fixed; inset: 0; z-index: 20; background: #0009; }
  .sidebar-toggle { display: grid !important; }
  .topbar { height: 58px; }
  .workspace-label { font-size: 12px; }
  .workspace-label > span, .workspace-label > b, .admin-chip > div { display: none; }
  .content { padding: 12px; }
  .page-heading h1 { font-size: 24px; }
  .view-switch button { padding: 7px 9px; }
  .graph-toolbar { flex-wrap: wrap; padding: 12px; gap: 8px; }
  .user-picker { max-width: none; }
  .graph-filter { width: 100%; }
  .graph-filter input { padding: 8px 10px; }
  .graph-focusbar { padding: 0 8px; }
  .graph-stage { min-height: 220px; }
  .graph-legend { left: 12px; gap: 9px; }
  .graph-legend > span { font-size: 10px; }
  .graph-controls { right: 10px; }
  .graph-footer { padding: 10px 13px; }
  .panel-tools { padding: 12px; }
  .global-search { width: auto; flex: 1; }
  .global-search kbd { display: none; }
  .metrics article:nth-child(n+3) { display: none; }
  .news-heading { align-items: center; }
  .news-heading > div > p:last-child { display: none; }
  .news-layout { display: flex; flex-direction: column; overflow: auto; }
  .news-library { max-height: 230px; flex: none; }
  .news-editor { overflow: visible; }
  .news-cover-row { align-items: flex-start; }
  .news-cover-preview { width: 120px; }
  .news-editor-actions { grid-template-columns: auto 1fr; }
  .news-editor-actions > span { display: none; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; scroll-behavior: auto !important; } }

/* Neutral data canvas with a dark navigation rail; login remains monochrome. */
body:not(.login-page) {
  color-scheme: light;
  --bg: #ededed;
  --surface: #ffffff;
  --surface-2: #f2f2f2;
  --surface-3: #e5e5e5;
  --text: #202020;
  --muted: #595959;
  --muted-2: #777777;
  --accent: #252525;
  --accent-bright: #1b1b1b;
  --accent-wash: #ebebeb;
  --danger: #a53f3f;
}
body:not(.login-page) button:not(:disabled):hover { color: var(--text); background-color: #e5e5e5; }
body:not(.login-page) input:focus, body:not(.login-page) select:focus, body:not(.login-page) textarea:focus { background: #fff; outline: 1px solid var(--accent); }
body:not(.login-page) .sidebar { color: #f4f4f4; background: #171717; border-right-color: #111; }
.sidebar .brand { color: #fff; padding-bottom: 22px; }
.sidebar .nav-item { width: calc(100% - 12px); min-height: 36px; margin: 2px 6px; }
.sidebar .brand small, .sidebar .nav-label, .sidebar .sidebar-footer small { color: #9e9e9e; }
.sidebar .nav-item, .sidebar .sidebar-footer { color: #d1d1d1; }
.sidebar .nav-item:not(:disabled):hover { color: #fff; background: #303030; }
.sidebar .nav-item.is-active, .sidebar .nav-item.is-active:not(:disabled):hover { color: #171717; background: #fff; }
.sidebar .sidebar-footer { border-top: 1px solid #383838; }
.sidebar .sidebar-footer b { color: #f4f4f4; }
.sidebar .connection-dot { background: #fff; }
.workspace { background: var(--bg); }
.topbar { background: #fff; border-bottom: 1px solid #d4d4d4; }
.workspace-label { color: #6d6d6d; }
.workspace-label b { color: #272727; }
.global-search { background: #f3f3f3; border: 1px solid #e1e1e1; }
.global-search input, .global-search input:focus { background: transparent !important; outline: 0 !important; }
.icon-button, .row-menu, .filter-button { background: #eaeaea; color: #333; }
.admin-chip > span { background: #e3e3e3; color: #252525; }
.content { padding: 18px 22px 20px; }
.eyebrow { color: #777; font-weight: 650; text-transform: uppercase; letter-spacing: 1.2px; }
.button-primary { background: #242424; color: #fff; }
.button-primary:not(:disabled):hover, body:not(.login-page) .button-primary:not(:disabled):hover { background: #000; color: #fff; }
.button-ghost { background: #ececec; color: #333; }
.button-danger { background: #f9e4e1; color: #9a3030; }
.button-danger:not(:disabled):hover { background: #f3d1cb; color: #842626; }
.view-switch { background: #e0e0e0; }
.view-switch button[aria-pressed="true"] { background: #fff; color: #222; box-shadow: 0 1px 3px #0002; }
.sync-state.is-error { color: #a53f3f; }
.metrics article { background: #fff; border: 1px solid #d6d6d6; border-radius: 3px; }
.home-workspace { padding-top: 3px; }
.home-heading { margin-bottom: 17px; }
.home-heading h1 { font-size: clamp(22px, 2vw, 29px); }
.home-updated { color: #666; }
.system-panel, .cores-panel { background: #fff; border: 1px solid #cfcfcf; border-radius: 2px; overflow: hidden; }
.system-panel h2, .cores-heading { margin: 0; padding: 12px 15px; background: #f5f5f5; border-bottom: 1px solid #d4d4d4; }
.system-panel h2, .cores-heading h2 { font-size: 15px; font-weight: 650; }
.cores-panel { margin-top: 12px; padding: 0; }
.cores-heading { display: flex; align-items: center; justify-content: space-between; }
.cores-heading h2 { margin: 0; }
.cores-heading > span { color: #777; font-size: 12px; }
.system-table-scroll, .core-table-scroll { overflow: auto; }
.system-table, .core-table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.system-table { min-width: 590px; }
.core-table { min-width: 380px; }
.system-table thead th, .core-table thead th { background: #e8e8e8; color: #333; text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .4px; }
.system-table tbody th, .core-table tbody th { position: static; z-index: auto; color: #262626; background: transparent; font-size: 12px; font-weight: 600; text-align: left; }
.system-table th, .system-table td, .core-table th, .core-table td { padding: 10px 14px; border-right: 1px solid #dfdfdf; border-bottom: 1px solid #dfdfdf; }
.system-table tr > :last-child, .core-table tr > :last-child { border-right: 0; }
.system-table tbody tr:last-child > *, .core-table tbody tr:last-child > * { border-bottom: 0; }
.system-table tbody tr:nth-child(even), .core-table tbody tr:nth-child(even) { background: #f7f7f7; }
.system-table tbody tr:hover, .core-table tbody tr:hover { background: #f0f0f0; }
.system-table th:first-child { width: 23%; }
.system-table td:nth-child(2), .core-table td:nth-child(2) { width: 45%; }
.system-table td:nth-child(3) { color: #666; font-size: 11px; overflow-wrap: anywhere; }
.system-table td:last-child, .core-table td:last-child { width: 82px; text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.core-table th:first-child { width: 23%; }
.cores-list { display: table-row-group; }
.core-row { display: table-row; }
.core-label, .core-percent { color: #262626; font-size: 12px; }
.cores-state { color: #777; text-align: center; }
.usage-track { height: 9px; background: #e4e4e4; border: 1px solid #bdbdbd; border-radius: 1px; }
.usage-track > span { background: #303030; border-radius: 0; }
.system-table tr[data-level="warning"] td:last-child, .core-row[data-level="warning"] td:last-child { background: #ffe89c; }
.system-table tr[data-level="critical"] td:last-child, .core-row[data-level="critical"] td:last-child { background: #efb1a9; }
.system-table tr[data-level="warning"] .usage-track > span, .core-row[data-level="warning"] .usage-track > span { background: #aa800e; }
.system-table tr[data-level="critical"] .usage-track > span, .core-row[data-level="critical"] .usage-track > span { background: #b63f39; }
.data-grid { gap: 8px; }
.table-panel, .detail-panel { background: #fff; border: 1px solid #d0d0d0; border-radius: 2px; }
.panel-tools { background: #f7f7f7; border-bottom: 1px solid #dedede; padding: 12px 14px; }
.database-directory { flex: none; border-bottom: 1px solid #dedede; background: #fff; }
.database-directory summary { padding: 10px 14px; color: #333; font-size: 12px; font-weight: 650; }
.database-directory summary:hover { background: #f3f3f3; }
.database-directory-content { display: grid; grid-template-columns: minmax(170px, 220px) minmax(0, 1fr); max-height: 240px; overflow-y: auto; border-top: 1px solid #dedede; }
.database-pinned { padding: 4px 8px 10px; border-right: 1px solid #dedede; }
.database-all { min-width: 0; padding: 4px 10px 10px; }
.database-directory .nav-label { margin: 12px 8px 8px; color: #666; }
.database-directory .nav-item, .database-directory .table-list-item { color: #333; }
.database-directory .nav-item.is-active, .database-directory .table-list-item.is-active { background: #e6e6e6; color: #111; }
.database-directory .table-filter { margin: 7px 0; background: #f2f2f2; }
.database-directory .table-filter input:focus { background: transparent; outline: 0; }
.database-directory .table-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 2px 8px; }
.table-scroll { background: #fff; }
th, td { padding: 8px 10px; border-bottom: 1px solid #e1e1e1; border-right: 1px solid #eeeeee; }
th { position: sticky; top: 0; z-index: 1; background: #e8e8e8; color: #414141; font-size: 11px; font-weight: 700; }
td { color: #292929; font-size: 12px; }
tbody tr:nth-child(even) { background: #f8f8f8; }
tbody tr:hover, tbody tr.is-selected { background: #ededed; }
.sort-direction { color: #303030; }
.avatar, .admin-chip > span { background: #e4e4e4; color: #303030; }
.mono { color: #666; }
.status-green { background: #e3e3e3; color: #333; }
.status-muted { background: #f1f1f1; color: #777; }
.pagination { background: #fafafa; border-top: 1px solid #ddd; }
.detail-actions { background: #f6f6f6; border-top: 1px solid #ddd; }
.detail-empty > span { color: #888; }
.field-row input:disabled, .field-row textarea:disabled { background: #ededed; color: #777; }
.conflict-banner { background: #fff2cf; }
.conflict-banner b { color: #815f00; }
.conflict-banner button { background: #f5df9f; }
.graph-panel, .graph-message { background: #fff; }
.graph-panel { border: 1px solid #d0d0d0; border-radius: 2px; }
.user-picker:focus-within { background: #f7f7f7; }
.user-results { background: #fff; border: 1px solid #d2d2d2; box-shadow: 0 8px 25px #0002; }
.graph-controls { background: #ededed; }
.graph-legend span:nth-child(2) i { background: #888; }
.news-layout { background: #fff; border: 1px solid #d0d0d0; border-radius: 2px; }
.news-library, .news-editor { background: #fff; }
.news-library { border-right: 1px solid #dedede; }
.news-library-head { background: #e8e8e8; }
.news-list-item + .news-list-item { border-top-color: #e4e4e4; }
.news-list-item.is-active { background: #ececec; }
.news-list-cover, .news-cover-preview { background: #ededed; color: #777; }
.news-status { background: #ededed; }
.news-status.is-published { background: #dedede; color: #333; }
.news-cover-row, .news-preview { background: #f4f4f4; }
.news-toolbar { background: #e8e8e8; }
.news-preview { color: #292929; }
.rt-content strong { color: #191919; }
.rt-content code { background: #e7e7e7; color: #333; }
.rt-content blockquote { background: #eee; color: #444; }
.news-editor-actions { background: #f6f6f6; border-top: 1px solid #ddd; }
.modal { background: #fff; color: #292929; border: 1px solid #d0d0d0; }
.modal footer { background: #f5f5f5; }
.modal-body > label input, .modal-field input { background: #f2f2f2; }
.modal code { color: #333; }
.toast { background: #252525; box-shadow: 0 6px 24px #0003; }
.toast-mark { color: #fff; }
@media (max-width: 700px) {
  .app-shell { grid-template-columns: minmax(0, 1fr); }
  .content { padding: 12px; }
  .graph-main { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(90px, 125px) minmax(220px, 1fr); }
  .graph-sidebar { border-right: 0; border-bottom: 1px solid #dedede; }
  .database-directory-content { grid-template-columns: minmax(0, 1fr); }
  .database-pinned { border-right: 0; border-bottom: 1px solid #dedede; }
}
