/* Rebario × VECTOR PLM 0.5.
   Presentation only: the v0.4 forms, tables, routes and command handlers remain authoritative.
   Palette, wordmark treatment, logo and local Inter fonts come from the supplied Rebario export.
   The dark header follows the previously described v0.5 integration. */



:root {
  color-scheme: light;
  --bg: #f5f6f8;
  --surface: #fff;
  --ink: #171b20;
  --muted: #5e646b;
  --line: #e0e3e6;
  --blue: #2f5da0;
  --blue-soft: #e9eff8;
  --teal: #367794;
  --green: #2a7d57;
  --amber: #98601d;
  --red: #c43f3e;
  --nav: #f9fafb;
  --shadow: 0 1px 2px #00000005;
  --sidebar-width: 256px;
  --rebario-header: #1a2331;
}
body {
  font-family: "Rebario Inter", Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  font-size: 13px;
  -webkit-font-smoothing: antialiased;
}
button { border-radius: 6px; font-weight: 500; }
button:hover { background: #eef0f3; border-color: #ced1d5; }
button.primary:hover, .primary:hover { background: #1d4682; border-color: #1d4682; }
.secondary { background: var(--blue-soft); color: #1d4682; border-color: #d8e2f0; }
input, select, textarea { border-color: #d8dbdf; }
input:focus-visible, select:focus-visible, textarea:focus-visible,
button:focus-visible, a:focus-visible, summary:focus-visible, [tabindex]:focus-visible {
  outline-color: #5581c1;
}
input[type=checkbox] { accent-color: var(--blue); }
.pill { background: #eef0f3; color: #5e646b; font-size: 11px; }
.pill.blue { background: #e9eff8; color: #1d4682; }
.pill.green { background: #edf6f0; color: #256c4c; }
.pill.amber { background: #fff4e3; color: #98601d; }
.pill.red { background: #fbeceb; color: #b33433; }
.eyebrow, .section-label { color: #5e646b; }
code { color: #484e55; background: #eef0f3; }

/* Main navigation retains every working data-view and server-provided count. */
.sidebar {
  padding: 0;
  color: #2f3339;
  border-right: 1px solid var(--line);
  height: 100vh;
  height: 100dvh;
}
.sidebar .brand {
  width: 100%;
  min-height: 60px;
  margin: 0;
  padding: 9px 16px;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: #f9fafb;
  color: var(--ink);
  gap: 10px;
  flex-shrink: 0;
}
.sidebar .brand:hover { background: #eef0f3; }
.rebario-logo { display: block; object-fit: contain; flex-shrink: 0; }
.sidebar .rebario-logo { border-radius: 4px; }
.rebario-wordmark, .sidebar .brand-word {
  font-size: 21px;
  font-weight: 650;
  letter-spacing: -.8px;
  line-height: 1.08;
  text-align: left;
}
.rebario-wordmark > span { color: #325ed9; }
.brand .rebario-wordmark small {
  margin-top: 5px;
  color: #5e646b;
  font-size: 9px;
  font-weight: 500;
  letter-spacing: .35px;
}
.sidebar > .sidebar-label { margin: 18px 20px 7px; }
.sidebar-label {
  margin: 20px 10px 7px;
  color: #81878d;
  font-size: 10px;
  letter-spacing: .65px;
  flex-shrink: 0;
}
#main-nav {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  padding: 0 8px 16px;
}
.nav-item, .rebario-reference-link {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 9px;
  width: 100%;
  min-height: 36px;
  margin: 2px 0;
  padding: 8px 10px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #2f3339;
  font-size: 13px;
  font-weight: 450;
  line-height: 1.35;
  text-decoration: none;
  white-space: nowrap;
}
.nav-item .ui-icon, .rebario-reference-link .ui-icon {
  width: 17px;
  height: 17px;
  color: #6d7279;
}
.nav-item:hover, .rebario-reference-link:hover {
  color: #12161b;
  background: #eaedf0;
}
.nav-item.active {
  color: #1d4682;
  background: #e9eff8;
  font-weight: 600;
  box-shadow: none;
}
.nav-item.active .ui-icon { color: #2f5da0; }
.nav-count { color: #5e646b; background: #eaedf0; font-variant-numeric: tabular-nums; }
.nav-item.active .nav-count { color: #1d4682; background: #dce6f5; }
.rebario-reference-link { color: #5e646b; }
.rebario-reference-link > span:first-child { display: flex; flex-shrink: 0; }
.rebario-reference-badge {
  margin-left: auto;
  padding: 1px 5px;
  border: 1px solid #d8dbdf;
  border-radius: 4px;
  color: #6d7279;
  background: #fff;
  font-size: 10px;
  font-weight: 400;
  line-height: 1.5;
}
.sidebar-bottom {
  margin-top: auto;
  padding: 12px 16px;
  border-top: 1px solid var(--line);
  background: #f9fafb;
  flex-shrink: 0;
}
.sidebar-bottom > div { margin: 0; color: #5e646b; font-size: 11px; }
.sidebar-bottom > small { color: #81878d; font-size: 10px; margin: 5px 0 8px; }
.live-dot { background: #2a7d57; }
.nav-collapse { padding: 5px 0; min-height: 30px; color: #5e646b; font-size: 12px; }
.nav-collapse:hover { color: #1d4682; background: transparent; }
#rebario-nav-shade { display: none; }

/* Dark contextual header, compact controls and light content panels. */
.topbar {
  height: 60px;
  min-height: 60px;
  padding: 0 22px;
  border-bottom: 1px solid #1a2331;
  background: var(--rebario-header);
  color: #fcfcfc;
}
.topbar-context { flex: 1; min-width: 0; }
.project-selector { min-width: 0; }
.topbar .mini-label { color: #aebccc; font-size: 8px; }
.topbar .project-selector select {
  max-width: min(320px, 35vw);
  color: #fcfcfc;
  background: var(--rebario-header);
  font-size: 13px;
}
.topbar .project-selector option { color: var(--ink); background: #fff; }
.topbar .context-divider, .topbar .top-divider { background: #3b4655; }
.topbar #top-section { color: #c9d1da; font-size: 12px; }
.topbar-right { flex-shrink: 0; gap: 11px; }
.topbar .icon-button { color: #c9d1da; }
.topbar .icon-button:hover { background: #2f3b4c; color: #fff; border-color: transparent; }
.topbar .environment-chip { color: #c9d1da; border-color: #465261; background: #253241; }
.topbar .user-avatar { color: #e9eff8; background: #3d506d; font-size: 12px; }
.topbar .user-info strong { font-size: 12px; font-weight: 500; color: #fcfcfc; }
.topbar .user-info small { color: #aebccc; }
.topbar :focus-visible { outline-color: #a8caff; }
#main-content { padding: 22px 24px 16px; }
.view-heading { margin-bottom: 18px; }
.view-heading h1 { font-size: 22px; font-weight: 600; letter-spacing: -.5px; }
.view-heading p { color: #5e646b; font-size: 12px; }
.heading-actions button { font-size: 12px; }
.content-card, .structure-panel, .inspector, .configuration-list,
.context-card, .metadata-content, .meta-class-panel, .meta-inspector {
  border-color: var(--line);
  border-radius: 6px;
  box-shadow: var(--shadow);
}
.structure-panel { background: #f9fafb; }
.structure-panel .section-label { color: #81878d; }
.all-nodes.selected, .tree-label.selected { color: #1d4682; background: #e9eff8; }
.tree-label, .tree-label small { color: #5e646b; }
.tree-children { border-left-color: #e0e3e6; }
.registry-viewbar { background: #fff; }
.registry-toolbar { background: #fff; }
.registry-toolbar input, .registry-toolbar select { font-size: 12px; }
.registry-toolbar .small-button { font-size: 12px; }
.density-label select { color: #5e646b; background: #eef0f3; }
.filter-bar { background: #f9fafb; }
.query-context { color: #5e646b; }
.table-scroll { scrollbar-width: thin; }
.data-table { font-size: 13px; }
.data-table th, .data-table thead .select-cell,
.data-table thead .sticky-code, .data-table thead .sticky-name {
  background: #f9fafb;
  color: #5e646b;
  border-bottom-color: #e0e3e6;
}
.data-table th { font-size: 11px; letter-spacing: .12px; font-weight: 500; }
.data-table th button { font-size: 11px; font-weight: 500; }
.data-table td { font-size: 13px; border-bottom-color: #edeff1; }
.data-table tbody tr:hover td { background: #f5f6f8; }
.data-table tr.inspected td, .data-table tr.selected td { background: #e9eff8; }
.data-table tbody tr.inspected td.sticky-code { box-shadow: inset 2px 0 #2f5da0; }
.data-table .sticky-name { border-right-color: #e0e3e6; }
.data-table .code-link { color: #2f5da0; font-size: 12px; letter-spacing: .1px; }
.data-table .object-name, .data-table .cell-text { font-size: 13px; }
.data-table .numeric { font-variant-numeric: tabular-nums; }
.data-table td.numeric { font-size: 14px; }
.pagination { min-height: 42px; font-size: 11px; }
.selection-bar { background: #e9eff8; color: #1d4682; border-top-color: #d8e2f0; }
.entity-tabs { border-color: var(--line); }
.entity-tabs button { font-size: 13px; }
.entity-tabs button.active { color: #1d4682; border-bottom-color: #2f5da0; }
.document-state-banner { border-color: var(--line); }
.file-upload-box { border-color: #9ba6b1; background: #f9fafb; border-radius: 6px; }
.file-download { color: #2f5da0; border-color: #d8dbdf; font-size: 12px; }
.file-download:hover { background: #eef0f3; }
.workspace-footer { padding: 8px 24px 12px; color: #81878d; font-size: 10px; gap: 16px; }
.footer-version { color: #5e646b; font-weight: 500; }

/* Keep command dialogs and provenance/file warnings readable and independent of the shell. */
.drawer { border-left-color: var(--line); }
.drawer-header { border-bottom-color: var(--line); }
.drawer-header h2 { font-size: 21px; font-weight: 600; }
.drawer .primary, .confirmation .primary { background: #2f5da0; border-color: #2f5da0; }
.drawer .primary:hover, .confirmation .primary:hover { background: #1d4682; border-color: #1d4682; }
.drawer input, .drawer select, .drawer textarea { font-size: 14px; }
.notice.amber { color: #825719; background: #fff7e7; border-color: #ecd8b6; }
.source-result { justify-content: flex-start; }
.source-result[aria-selected=true] { border-color: #5581c1; background: #e9eff8; }
.login-story { background: var(--rebario-header); }
.login-story .brand { letter-spacing: 0; }
.login-story .brand .rebario-wordmark small { color: #b4becb; }
.login-story .rebario-wordmark > span { color: #8baaf5; }
.login-story h1 { color: #fff; }
.login-story .story-copy em { color: #a7c3ef; }
.login-story .eyebrow { color: #aebccc; }
.login-form-wrap .eyebrow { color: #5e646b; }
.login-form-wrap button.primary { background: #2f5da0; }
.login-form-wrap button.primary:hover { background: #1d4682; }

body.nav-collapsed { --sidebar-width: 68px; }
body.nav-collapsed .sidebar { padding: 0; }
body.nav-collapsed .sidebar .brand { margin: 0; justify-content: center; padding: 10px; }
body.nav-collapsed .rebario-reference-badge { display: none; }
body.nav-collapsed .rebario-reference-link { justify-content: center; padding: 10px 7px; }
body.nav-collapsed .sidebar-bottom { padding: 10px 16px; }

@media (max-width: 1280px) {
  .topbar { padding: 0 18px; }
  #main-content { padding: 18px; }
}
@media (min-width: 601px) and (max-width: 850px) {
  :root { --sidebar-width: 64px; }
  .sidebar { padding: 0; }
  .sidebar .brand { justify-content: center; margin: 0; padding: 10px; }
  .nav-item, .rebario-reference-link { justify-content: center; padding: 10px 7px; }
  .rebario-reference-badge { display: none; }
  .sidebar-bottom { padding: 10px 16px; }
}
@media (max-width: 600px) {
  :root { --sidebar-width: 0px; }
  .sidebar, body.nav-collapsed .sidebar { width: min(280px, calc(100vw - 52px)); padding: 0; }
  body.nav-mobile-open .sidebar .brand { margin: 0; padding: 10px 16px; justify-content: flex-start; }
  body.nav-mobile-open .sidebar .brand-word,
  body.nav-mobile-open .sidebar .nav-text,
  body.nav-mobile-open .sidebar .sidebar-label,
  body.nav-mobile-open .sidebar .prototype-label,
  body.nav-mobile-open .sidebar .sidebar-bottom > small,
  body.nav-mobile-open .sidebar .nav-count,
  body.nav-mobile-open .rebario-reference-badge { display: block; }
  body.nav-mobile-open .sidebar .prototype-label { display: flex; }
  body.nav-mobile-open .nav-item, body.nav-mobile-open .rebario-reference-link {
    justify-content: flex-start;
    min-height: 42px;
    padding: 10px;
  }
  body.nav-mobile-open .sidebar-bottom { padding: 12px 16px; }
  body.nav-mobile-open .nav-collapse { justify-content: flex-start; }
  body.nav-mobile-open .nav-collapse .ui-icon { transform: none; }
  body.nav-mobile-open #rebario-nav-shade {
    display: block;
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    padding: 0;
    margin: 0;
    border: 0;
    border-radius: 0;
    background: #1a233170;
    z-index: 29;
    cursor: default;
  }
  .topbar { min-height: 58px; height: 58px; padding: 0 10px; }
  .topbar .project-selector select { max-width: calc(100vw - 142px); font-size: 12px; }
  .topbar-right { gap: 2px; }
  #main-content { padding: 16px 12px 10px; }
  .view-heading h1 { font-size: 22px; }
  .workspace-footer { padding: 8px 12px 12px; font-size: 9px; }
  .drawer-header h2 { font-size: 20px; }
  .data-table td { font-size: 13px; }
  .pagination { gap: 8px; }
}
@media (prefers-reduced-motion: reduce) {
  .sidebar, .nav-item, .rebario-reference-link { transition: none; }
}

/* Boiler distribution: system fonts, import provenance notice. */
body{font-family:system-ui,-apple-system,"Segoe UI",Arial,sans-serif}
.boiler-import-notice{font-size:12px;line-height:1.5;background:#fff7e6;color:#705013;border:1px solid #e6cf9b;border-radius:5px;padding:9px 12px;margin:0 0 12px;}
