:root,
html[data-theme="light"],
html[data-theme="dark"] {
  color-scheme: light;
  --hooj-orange: #ff6500;
  --hooj-orange-strong: #dc4f00;
  --hooj-ink: #111214;
  --hooj-text: #292c31;
  --hooj-muted: #6d737d;
  --hooj-faint: #9298a1;
  --hooj-line: #dedfe2;
  --hooj-line-soft: #ececef;
  --hooj-surface: #f5f5f4;
  --hooj-white: #fff;
  --primary: #111214;
  --secondary: #ff6500;
  --accent: #ff6500;
  --primary-fg: #fff;
  --body-fg: #292c31;
  --body-bg: #f5f5f4;
  --body-quiet-color: #6d737d;
  --body-loud-color: #111214;
  --header-color: #111214;
  --header-branding-color: #111214;
  --header-bg: #fff;
  --header-link-color: #292c31;
  --breadcrumbs-fg: #6d737d;
  --breadcrumbs-link-fg: #292c31;
  --breadcrumbs-bg: #f5f5f4;
  --link-fg: #c44900;
  --link-hover-color: #8f3600;
  --link-selected-fg: #c44900;
  --hairline-color: #ececef;
  --border-color: #dedfe2;
  --error-fg: #a61b1b;
  --message-success-bg: #edf7f0;
  --message-warning-bg: #fff6df;
  --message-error-bg: #fff0ef;
  --darkened-bg: #f7f7f6;
  --selected-bg: #fff2e8;
  --selected-row: #fff8f2;
  --button-fg: #fff;
  --button-bg: #111214;
  --button-hover-bg: #292c31;
  --default-button-bg: #ff6500;
  --default-button-hover-bg: #dc4f00;
  --close-button-bg: #62666d;
  --close-button-hover-bg: #44474d;
  --delete-button-bg: #b42318;
  --delete-button-hover-bg: #8f1912;
  --object-tools-fg: #292c31;
  --object-tools-bg: #fff;
  --object-tools-hover-bg: #f5f5f4;
}

* { letter-spacing: 0; }
html { background: var(--hooj-surface); }
body {
  min-width: 0;
  background: var(--hooj-surface);
  color: var(--hooj-text);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 13px;
}
a:link, a:visited { text-decoration: none; }

/* Header */
#header {
  min-height: 64px;
  display: grid;
  grid-template-columns: minmax(190px, 1fr) auto minmax(240px, 1fr);
  align-items: center;
  gap: 24px;
  padding: 0 28px;
  background: var(--hooj-white);
  border-bottom: 1px solid var(--hooj-line);
  box-shadow: inset 0 3px 0 var(--hooj-orange);
}
#branding { min-width: 0; }
.hooj-admin-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--hooj-ink) !important;
}
.hooj-admin-brand img { display: block; width: 64px; height: 35px; object-fit: contain; }
.hooj-admin-brand span {
  padding-left: 12px;
  border-left: 1px solid var(--hooj-line);
  color: var(--hooj-muted);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}
.hooj-global-nav { grid-column: 2; grid-row: 1; display: flex; align-items: center; gap: 2px; }
.hooj-global-nav a {
  padding: 9px 11px;
  border-radius: 5px;
  color: #3b3e44 !important;
  font-size: 12px;
  font-weight: 650;
}
.hooj-global-nav a:hover { background: #f3f3f2; color: var(--hooj-ink) !important; }
#user-tools {
  grid-column: 3;
  grid-row: 1;
  justify-self: end;
  color: var(--hooj-muted);
  font-size: 11px;
  line-height: 1.5;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 10px;
}
.hooj-admin-user {
  max-width: 125px;
  display: inline-block;
  overflow: hidden;
  vertical-align: bottom;
  color: var(--hooj-ink);
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}
#user-tools a, #logout-form button { color: #464a51; font-weight: 600; }
#logout-form { display: inline-flex; }
#logout-form button { min-height: 0; padding: 0; }
.theme-toggle { display: none; }
.login #header {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: 0 20px;
}
.login #branding { width: auto; }
.login .hooj-admin-brand { width: auto; }
.login .hooj-admin-brand img { width: 58px; height: 32px; }
.login .hooj-admin-brand span { font-size: 10px; }
div.breadcrumbs {
  min-height: 18px;
  padding: 10px 28px;
  background: #f9f9f8;
  border-bottom: 1px solid var(--hooj-line);
  color: var(--hooj-muted);
  font-size: 11px;
}
div.breadcrumbs a { color: #464a51; font-weight: 600; }

/* Global admin chrome */
.main > .content { min-width: 0; }
#content { padding: 26px 28px 36px; }
#content h1 {
  color: var(--hooj-ink);
  font-size: 25px;
  font-weight: 720;
  line-height: 1.15;
}
#content h2 { color: var(--hooj-ink); }
#nav-sidebar {
  width: 230px;
  flex: 0 0 230px;
  background: #fafaf9;
  border-right: 1px solid var(--hooj-line);
}
#nav-sidebar .module { border: 0; border-radius: 0; }
#nav-sidebar th { padding: 8px 14px; font-size: 12px; }
#nav-sidebar td { padding: 6px 12px; }
#nav-sidebar a { color: #44484f; }
#nav-sidebar .current-app caption { background: #f0f0ee; }
#nav-sidebar .current-model { background: #ffede0; }
#nav-sidebar .current-model a { color: #9b3b00; font-weight: 700; }
#nav-filter {
  margin: 12px;
  width: calc(100% - 24px);
  box-sizing: border-box;
  border-radius: 5px;
}
.module, .inline-group {
  overflow: hidden;
  background: var(--hooj-white);
  border: 1px solid var(--hooj-line);
  border-radius: 6px;
  box-shadow: none;
}
.module h2, .module caption, .inline-group h2 {
  padding: 10px 13px;
  background: #f4f4f2;
  color: var(--hooj-ink);
  font-size: 12px;
  font-weight: 720;
}
table { border-color: var(--hooj-line-soft); }
thead th {
  padding-top: 9px;
  padding-bottom: 9px;
  background: #f8f8f7;
  color: #656a73;
  font-size: 10px;
  font-weight: 750;
  text-transform: uppercase;
}
tbody th, tbody td { vertical-align: middle; }
tbody tr { transition: background-color 90ms linear; }
tbody tr:hover { background: #fff8f2; }
.row1 { background: #fff; }
.row2 { background: #fbfbfa; }

/* Forms and controls */
input, textarea, select, .vTextField {
  box-sizing: border-box;
  border: 1px solid #cfd1d5;
  border-radius: 5px;
  background: #fff;
  color: var(--hooj-ink);
}
input:focus, textarea:focus, select:focus {
  border-color: var(--hooj-orange);
  outline: none;
  box-shadow: 0 0 0 3px rgba(255, 101, 0, .11);
}
.aligned label { color: #4c5057; font-weight: 600; }
.help, p.help, form p.help, div.help, form div.help { color: var(--hooj-muted); font-size: 11px; }
.submit-row {
  padding: 11px;
  background: #fafaf9;
  border: 1px solid var(--hooj-line);
  border-radius: 6px;
}
input[type="submit"], button, .button, .object-tools a {
  min-height: 34px;
  border-radius: 5px;
  box-shadow: none;
  font-weight: 700;
}
.object-tools a {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--hooj-line);
}
.paginator { border-color: var(--hooj-line); }
.messagelist li { margin: 0 28px 10px; border-radius: 5px; }

/* Operational labels and media */
.hooj-status {
  min-height: 20px;
  display: inline-flex;
  align-items: center;
  padding: 1px 7px;
  border: 1px solid transparent;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 750;
  white-space: nowrap;
}
.hooj-status--success { color: #176237; background: #edf8f1; border-color: #cbe8d5; }
.hooj-status--warning { color: #805100; background: #fff7df; border-color: #eedda8; }
.hooj-status--danger { color: #9f2520; background: #fff0ef; border-color: #efcac7; }
.hooj-status--info { color: #24558c; background: #eff6fc; border-color: #cbdff1; }
.hooj-status--neutral { color: #5d626a; background: #f3f3f2; border-color: #dedfe2; }
.hooj-thumb-link { display: inline-flex; }
.hooj-thumb {
  width: 42px;
  height: 42px;
  object-fit: cover;
  background: #f1f1ef;
  border: 1px solid var(--hooj-line);
  border-radius: 4px;
}
.hooj-no-media { color: var(--hooj-faint); font-size: 10px; }

/* Operations overview */
.hooj-dashboard #content { max-width: 1480px; margin: 0 auto; }
.hooj-dashboard-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  padding: 2px 0 18px;
}
.hooj-dashboard-head h1 { margin: 4px 0 5px; font-size: 29px !important; }
.hooj-dashboard-head p:not(.hooj-eyebrow) { margin: 0; color: var(--hooj-muted); font-size: 12px; }
.hooj-dashboard-head time, .hooj-section-heading > span { color: var(--hooj-faint); font-size: 10px; white-space: nowrap; }
.hooj-eyebrow {
  margin: 0;
  color: var(--hooj-orange-strong);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}
.hooj-metric-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  overflow: hidden;
  background: var(--hooj-white);
  border: 1px solid var(--hooj-line);
  border-radius: 6px;
}
.hooj-metric {
  min-width: 0;
  min-height: 88px;
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-rows: auto 1fr;
  gap: 4px 8px;
  padding: 13px 14px;
  border-right: 1px solid var(--hooj-line-soft);
  color: var(--hooj-ink) !important;
}
.hooj-metric:last-child { border-right: 0; }
.hooj-metric:hover { background: #fff9f4; }
.hooj-metric span { align-self: center; color: #5e636b; font-size: 10px; font-weight: 700; }
.hooj-metric strong { grid-column: 2; grid-row: 1 / 3; align-self: center; font-size: 25px; line-height: 1; }
.hooj-metric small { align-self: end; color: var(--hooj-faint); font-size: 9px; line-height: 1.25; }
.hooj-metric--danger strong { color: #b42318; }
.hooj-metric--warning strong { color: #9a6100; }
.hooj-metric--success strong { color: #247244; }
.hooj-metric--info strong { color: #315f92; }
.hooj-quick-links {
  display: flex;
  align-items: center;
  gap: 4px;
  overflow-x: auto;
  margin: 10px 0 18px;
}
.hooj-quick-links span { margin-right: 5px; color: var(--hooj-faint); font-size: 9px; font-weight: 800; text-transform: uppercase; }
.hooj-quick-links a {
  padding: 6px 9px;
  border-bottom: 1px solid transparent;
  color: #41454b;
  font-size: 11px;
  font-weight: 650;
  white-space: nowrap;
}
.hooj-quick-links a:hover { color: var(--hooj-orange-strong); border-bottom-color: var(--hooj-orange); }
.hooj-ops-grid { display: grid; grid-template-columns: 1.35fr .65fr; gap: 10px; }
.hooj-ops-panel {
  min-width: 0;
  overflow: hidden;
  background: var(--hooj-white);
  border: 1px solid var(--hooj-line);
  border-radius: 6px;
}
.hooj-ops-panel > header {
  min-height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 9px 13px;
  background: #fafaf9;
  border-bottom: 1px solid var(--hooj-line-soft);
}
.hooj-ops-panel header span { color: var(--hooj-orange-strong); font-size: 9px; font-weight: 800; text-transform: uppercase; }
.hooj-ops-panel h2 { margin: 2px 0 0; font-size: 13px; }
.hooj-ops-panel header > a { color: #555a62; font-size: 10px; font-weight: 700; white-space: nowrap; }
.hooj-table-wrap { overflow-x: auto; }
.hooj-ops-panel table { width: 100%; border-collapse: collapse; }
.hooj-ops-panel th, .hooj-ops-panel td { padding: 9px 12px; border-bottom: 1px solid var(--hooj-line-soft); text-align: left; font-size: 11px; }
.hooj-health-list, .hooj-compact-list { padding: 2px 12px; }
.hooj-health-list > div, .hooj-compact-list > a {
  min-height: 39px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid var(--hooj-line-soft);
  color: var(--hooj-ink);
}
.hooj-health-dot { width: 6px; height: 6px; border-radius: 50%; background: #2d8b51; }
.hooj-health-list strong, .hooj-compact-list strong { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; }
.hooj-health-list time, .hooj-compact-list time { color: var(--hooj-faint); font-size: 9px; white-space: nowrap; }
.hooj-empty { padding: 16px !important; color: var(--hooj-muted); text-align: center; }
.hooj-models-section { margin-top: 22px; }
.hooj-section-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 9px; }
.hooj-section-heading h2 { margin: 2px 0 0; font-size: 17px; }
.hooj-models-section .module { margin-bottom: 8px; }
.hooj-models-section .module table th { width: 68%; }
.hooj-dashboard-notice { padding: 12px; border: 1px solid #eedda8; border-radius: 5px; background: #fff7df; color: #805100; }
#content-related .module { border-radius: 6px; }

@media (max-width: 1180px) {
  #header { grid-template-columns: 1fr auto; }
  .hooj-global-nav { display: none; }
  #user-tools { grid-column: 2; }
  .hooj-metric-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .hooj-metric:nth-child(3) { border-right: 0; }
  .hooj-metric:nth-child(-n+3) { border-bottom: 1px solid var(--hooj-line-soft); }
}
@media (max-width: 820px) {
  #header { min-height: 58px; padding: 0 14px; }
  .hooj-admin-brand img { width: 55px; height: 31px; }
  .hooj-admin-brand span { display: none; }
  #user-tools { max-width: 66vw; text-align: right; }
  #content { padding: 18px 14px 28px; }
  div.breadcrumbs { padding: 9px 14px; }
  .hooj-dashboard-head { align-items: flex-start; flex-direction: column; gap: 7px; }
  .hooj-dashboard-head h1 { font-size: 25px !important; }
  .hooj-ops-grid { grid-template-columns: 1fr; }
  .hooj-section-heading > span { display: none; }
  .messagelist li { margin-right: 14px; margin-left: 14px; }
}
@media (max-width: 540px) {
  #user-tools { font-size: 0; }
  #user-tools a, #logout-form button { font-size: 10px; }
  .hooj-metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hooj-metric { min-height: 76px; border-bottom: 1px solid var(--hooj-line-soft); }
  .hooj-metric:nth-child(2n) { border-right: 0; }
  .hooj-metric:nth-last-child(-n+2) { border-bottom: 0; }
}
