:root {
  --tblr-primary: rgb(0,112,120);
  --tblr-primary-rgb: 0, 112, 120;
  --brand: rgb(0,112,120);
  --brand-dark: rgb(0,91,98);
  --secondary: rgb(85,85,89);
  --ink: rgb(85,85,89);
  --surface-soft: rgba(var(--tblr-primary-rgb), .07);
  --chart-accent: var(--brand);
  --green-accent: var(--brand);
  --orange-accent: #c76a10;
  --red-accent: #d63939;
  --page-soft: #f6f8f7;
}

.dashboard-body {
  background: var(--page-soft);
}

.dashboard-shell {
  min-height: 100vh;
  background: var(--page-soft);
}

.dashboard-container {
  max-width: 1780px;
}

.dashboard-topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  border-bottom: 1px solid var(--tblr-border-color);
  background: #fff;
}

.dashboard-topbar .dashboard-container,
.dashboard-titlebar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.dashboard-topbar .dashboard-container {
  min-height: 78px;
}

.dashboard-brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  color: var(--secondary);
  font-size: 25px;
  font-weight: 800;
}

.dashboard-tools {
  display: flex;
  align-items: center;
  gap: 12px;
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--secondary);
  font-size: 22px;
}

.icon-btn:hover {
  background: var(--surface-soft);
  color: var(--brand);
}

.user-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--secondary);
}

.user-name {
  font-weight: 700;
  line-height: 1.1;
}

.user-role {
  color: var(--tblr-secondary);
  font-size: 12px;
  line-height: 1.1;
}

.dashboard-nav {
  border-bottom: 1px solid var(--tblr-border-color);
  background: #fff;
}

.dashboard-nav .dashboard-container {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 62px;
  overflow-x: auto;
}

.dashboard-nav .nav-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 62px;
  padding: 0 14px;
  color: var(--secondary);
  white-space: nowrap;
}

.dashboard-nav .nav-link.active {
  color: var(--brand);
  font-weight: 700;
}

.dashboard-nav .nav-link.active:after {
  content: "";
  position: absolute;
  right: 10px;
  bottom: -1px;
  left: 10px;
  height: 3px;
  border-radius: 999px 999px 0 0;
  background: var(--brand);
}

.dashboard-main {
  padding: 32px 0 42px;
}

.dashboard-titlebar {
  margin-bottom: 28px;
}

.dashboard-titlebar .page-title {
  color: #18212f;
  font-size: 28px;
  font-weight: 760;
}

.dashboard-grid-main {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) repeat(2, minmax(0, 1fr));
  gap: 20px;
  margin-bottom: 20px;
}

.dashboard-grid-main .card,
.dashboard-stat-grid .card,
.quick-grid .card,
.dashboard-lower-grid .card {
  border-radius: 8px;
  box-shadow: 0 1px 2px rgba(22, 30, 46, .04);
}

.welcome-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  min-height: 330px;
  overflow: hidden;
  background: rgba(var(--tblr-primary-rgb), .05);
}

.welcome-copy {
  padding: 34px;
}

.welcome-copy h2 {
  margin: 0 0 12px;
  color: #18212f;
  font-size: 26px;
  font-weight: 780;
}

.welcome-copy p {
  max-width: 410px;
  color: var(--tblr-secondary);
  font-size: 17px;
}

.welcome-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 170px));
  gap: 28px;
  margin-top: 74px;
}

.stat-label {
  display: block;
  color: var(--tblr-secondary);
  font-size: 13px;
  font-weight: 740;
  letter-spacing: 0;
  text-transform: uppercase;
}

.welcome-stats strong,
.stat-card-value,
.kpi-head strong {
  color: #18212f;
  font-variant-numeric: tabular-nums;
}

.welcome-stats strong {
  margin-right: 8px;
  font-size: 23px;
}

.trend-up,
.trend-down {
  font-size: 14px;
  font-weight: 700;
}

.trend-up {
  color: var(--green-accent);
}

.trend-down {
  color: var(--red-accent);
}

.mini-progress {
  height: 5px;
  margin-top: 14px;
  overflow: hidden;
  border-radius: 999px;
  background: #e9edf2;
}

.mini-progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--green-accent);
}

.mini-progress.danger span {
  background: var(--red-accent);
}

.welcome-visual {
  position: relative;
  min-height: 100%;
}

.visual-badge {
  position: absolute;
  top: 84px;
  left: 104px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 62px;
  height: 62px;
  border-radius: 50%;
  background: var(--chart-accent);
  color: #fff;
  font-size: 40px;
  box-shadow: 0 16px 40px rgba(29, 126, 216, .25);
}

.visual-person,
.visual-machine,
.visual-orbit {
  position: absolute;
  display: block;
}

.visual-person:before {
  content: "";
  position: absolute;
  top: 0;
  left: 18px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #202b3d;
}

.visual-person:after {
  content: "";
  position: absolute;
  top: 26px;
  left: 8px;
  width: 44px;
  height: 92px;
  border-radius: 24px 24px 8px 8px;
  background: var(--chart-accent);
  box-shadow: 18px 74px 0 -12px #202b3d, -10px 74px 0 -12px #202b3d;
}

.visual-person.left {
  left: 42px;
  bottom: 70px;
  transform: rotate(-10deg);
}

.visual-person.right {
  right: 86px;
  bottom: 72px;
  transform: scale(.78) rotate(8deg);
}

.visual-person.left:after {
  background: #fff;
  border: 1px solid #dfe5ec;
}

.visual-machine {
  right: 34px;
  bottom: 68px;
  width: 70px;
  height: 92px;
  border-radius: 14px;
  background: #333b48;
  transform: rotate(-13deg);
}

.visual-machine:after {
  content: "";
  position: absolute;
  right: 14px;
  bottom: 16px;
  width: 26px;
  height: 26px;
  border: 5px solid #dfe5ec;
  border-radius: 50%;
  background: var(--chart-accent);
}

.visual-orbit {
  border: 3px solid var(--chart-accent);
  border-top-color: transparent;
  border-right-color: transparent;
  border-radius: 50%;
}

.visual-orbit.one {
  top: 78px;
  left: 44px;
  width: 44px;
  height: 44px;
}

.visual-orbit.two {
  right: 42px;
  top: 118px;
  width: 36px;
  height: 36px;
  transform: rotate(58deg);
}

.kpi-card {
  min-height: 330px;
  padding: 30px;
}

.kpi-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 14px;
}

.kpi-head strong {
  display: block;
  margin-top: 7px;
  font-size: 34px;
  line-height: 1;
}

.kpi-card p {
  margin: 16px 0 36px;
  color: var(--tblr-secondary);
  font-size: 16px;
}

.line-chart {
  margin: 0 -12px;
}

.line-chart svg,
.stat-card-chart svg {
  width: 100%;
  height: 90px;
}

.chart-line,
.chart-dash {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 4;
}

.chart-line {
  stroke: var(--chart-accent);
}

.chart-dash {
  stroke: #c6ccd4;
  stroke-dasharray: 8 8;
  transform: translateY(-10px);
}

.radial-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 26px;
}

.radial-progress {
  display: grid;
  place-items: center;
  width: 210px;
  height: 210px;
  border-radius: 50%;
  background: conic-gradient(var(--chart-accent) calc(var(--value) * 1%), #e7ebef 0);
}

.radial-progress:before {
  content: "";
  position: absolute;
}

.radial-progress > div {
  display: grid;
  place-items: center;
  width: 150px;
  height: 150px;
  border-radius: 50%;
  background: #fff;
}

.radial-progress span {
  color: #18212f;
  font-size: 44px;
  font-weight: 800;
  line-height: 1;
}

.radial-progress small {
  color: var(--tblr-secondary);
  font-size: 13px;
  font-weight: 740;
  letter-spacing: 0;
  text-transform: uppercase;
}

.dashboard-stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
  margin-bottom: 20px;
}

.stat-card {
  min-height: 190px;
  padding: 24px;
}

.stat-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.stat-card-head i {
  color: var(--tblr-secondary);
  font-size: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  line-height: 1;
  flex-shrink: 0;
}

.stat-card-value {
  margin-top: 10px;
  font-size: 31px;
  font-weight: 800;
  line-height: 1;
}

.stat-card-value span {
  margin-left: 8px;
}

.stat-card-chart {
  margin-top: 18px;
}

.stat-card-chart.bars {
  display: flex;
  align-items: end;
  height: 72px;
  gap: 6px;
}

.stat-card-chart.bars span {
  flex: 1;
  min-width: 5px;
  border-radius: 5px 5px 0 0;
  background: var(--chart-accent);
}

.quick-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
  margin-bottom: 20px;
}

.quick-card {
  display: flex;
  align-items: center;
  gap: 18px;
  min-height: 92px;
  padding: 20px 22px;
}

.quick-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 6px;
  color: #fff;
  font-size: 28px;
  line-height: 1;
}

.quick-icon i { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; line-height: 1; }
.quick-icon i::before { display: block; line-height: 1; }

.quick-icon.primary { background: var(--brand); }
.quick-icon.green { background: var(--green-accent); }
.quick-icon.dark { background: var(--brand); }
.quick-icon.blue { background: var(--chart-accent); }

.quick-card strong,
.quick-card div > span {
  display: block;
}

.quick-card strong {
  color: #18212f;
  font-size: 18px;
}

.quick-card div > span {
  color: var(--tblr-secondary);
  font-size: 14px;
}

.dashboard-lower-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.btn-primary {
  --tblr-btn-bg: var(--brand);
  --tblr-btn-border-color: var(--brand);
  --tblr-btn-hover-bg: var(--brand-dark);
  --tblr-btn-hover-border-color: var(--brand-dark);
}

.navbar-vertical .nav-link.active,
.navbar-vertical .nav-link.active .nav-link-icon {
  color: var(--brand);
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 8px;
  background: var(--brand);
  color: #fff;
  font-weight: 800;
  letter-spacing: 0;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-left: auto;
}

.header-actions #meta {
  white-space: nowrap;
}

.btn-outline-primary {
  --tblr-btn-color: var(--brand);
  --tblr-btn-border-color: rgba(var(--tblr-primary-rgb), .45);
  --tblr-btn-hover-bg: var(--brand);
  --tblr-btn-hover-border-color: var(--brand);
  --tblr-btn-active-bg: var(--brand-dark);
  --tblr-btn-active-border-color: var(--brand-dark);
}

.counter-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 16px;
}

.counter-card {
  position: relative;
  overflow: hidden;
  min-height: 142px;
  border: 1px solid var(--tblr-border-color);
  border-radius: 8px;
  background: #fff;
}

.counter-card:before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  background: var(--counter-color, var(--brand));
}

.counter-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.counter-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 8px;
  background: var(--surface-soft);
  color: var(--brand);
  font-size: 22px;
}

.counter-value {
  margin-top: 16px;
  color: var(--ink);
  font-size: 38px;
  font-weight: 760;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.counter-label {
  margin-top: 7px;
  color: var(--tblr-secondary);
  font-size: 13px;
}

.counter-trend {
  display: flex;
  align-items: end;
  height: 28px;
  gap: 3px;
}

.counter-bar {
  width: 6px;
  border-radius: 999px 999px 0 0;
  background: rgba(var(--tblr-primary-rgb), .22);
}

.dashboard-panel {
  min-height: 100%;
}

.activity-list {
  display: grid;
  gap: 0;
}

.activity-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 14px 16px;
  border-top: 1px solid var(--tblr-border-color);
}

.activity-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 8px;
  background: var(--surface-soft);
  color: var(--brand);
  font-size: 21px;
}

.activity-title,
.entity-title {
  color: var(--secondary);
  font-weight: 700;
}

.activity-meta,
.entity-meta {
  color: var(--tblr-secondary);
  font-size: 12px;
}

.page-intro {
  margin-bottom: 16px;
  color: var(--tblr-secondary);
  max-width: 760px;
}

.entity-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.entity-card {
  min-height: 150px;
  border: 1px solid var(--tblr-border-color);
  border-radius: 8px;
  background: #fff;
}

.entity-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background: var(--surface-soft);
  color: var(--brand);
  font-size: 22px;
}

.entity-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 18px;
}

.list-toolbar {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(170px, 240px);
  gap: 10px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--tblr-border-color);
}

.list-toolbar.single {
  grid-template-columns: minmax(220px, 1fr);
}

.list-toolbar.manuals {
  grid-template-columns: minmax(260px, 1fr) repeat(3, minmax(150px, 210px));
}

.data-table th {
  color: var(--secondary);
  font-size: 12px;
  text-transform: uppercase;
}

.data-table td {
  vertical-align: middle;
}

.table-primary-cell {
  color: var(--secondary);
  font-weight: 700;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 10px;
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--brand);
  font-size: 12px;
  font-weight: 700;
}

.manual-form-grid,
.content-form-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.manual-form-grid .wide,
.content-form-grid .wide {
  grid-column: span 2;
}

.form-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.table-actions {
  width: 1%;
  white-space: nowrap;
}

@media (max-width: 1100px) {
  .dashboard-grid-main,
  .dashboard-lower-grid { grid-template-columns: 1fr; }
  .dashboard-stat-grid,
  .quick-grid,
  .counter-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .entity-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 640px) {
  .dashboard-topbar .dashboard-container,
  .dashboard-titlebar {
    align-items: flex-start;
    flex-direction: column;
  }
  .dashboard-tools {
    width: 100%;
    flex-wrap: wrap;
  }
  .user-chip {
    margin-left: auto;
  }
  .dashboard-main {
    padding-top: 22px;
  }
  .welcome-card {
    grid-template-columns: 1fr;
  }
  .welcome-copy {
    padding: 24px;
  }
  .welcome-stats {
    grid-template-columns: 1fr;
    gap: 18px;
    margin-top: 32px;
  }
  .welcome-visual {
    min-height: 230px;
  }
  .kpi-card {
    min-height: auto;
    padding: 24px;
  }
  .dashboard-stat-grid,
  .quick-grid,
  .counter-grid,
  .entity-grid { grid-template-columns: 1fr; }
  .activity-item { grid-template-columns: minmax(0, 1fr); }
  .activity-item .badge { grid-column: 1; justify-self: start; }
  .list-toolbar { grid-template-columns: 1fr; }
  .list-toolbar.manuals { grid-template-columns: 1fr; }
  .manual-form-grid,
  .content-form-grid { grid-template-columns: 1fr; }
  .manual-form-grid .wide,
  .content-form-grid .wide { grid-column: auto; }
  .header-actions {
    width: 100%;
    justify-content: space-between;
    margin-left: 0;
  }
}
/* Sign-in uses the same POST colors without depending on external styles. */
.login-body { margin: 0; min-height: 100vh; background: #f5f7f9; color: #252b31; font-family: system-ui, sans-serif; }
.login-body * { box-sizing: border-box; }
.login-main { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 32px 20px; }
.login-brand { display: flex; align-items: center; gap: 12px; color: #252b31; text-decoration: none; font-size: 26px; font-weight: 700; margin-bottom: 28px; }
.login-panel { width: 100%; max-width: 400px; background: white; border: 1px solid #dfe4e8; border-radius: 8px; padding: 32px; box-shadow: 0 2px 6px #252b3108; }
.login-panel h1 { font-size: 24px; margin: 0 0 8px; }
.login-subtitle { color: rgb(85,85,89); margin: 0 0 28px; }
.login-panel label { display: block; font-size: 14px; font-weight: 600; margin: 18px 0 8px; }
.login-panel input { width: 100%; min-width: 0; height: 44px; border: 1px solid #ccd3d8; border-radius: 4px; padding: 10px 12px; font: inherit; color: inherit; background: white; }
.login-panel input:focus { outline: 2px solid rgb(0,112,120); outline-offset: 2px; }
.login-password { position: relative; }
.login-password input { padding-right: 48px; }
.login-password button { position: absolute; right: 2px; top: 2px; height: 40px; width: 40px; display: grid; place-items: center; border: 0; background: transparent; color: rgb(85,85,89); cursor: pointer; }
.login-message { min-height: 22px; font-size: 14px; color: #b42318; margin: 14px 0; overflow-wrap: anywhere; }
.login-submit { width: 100%; min-height: 44px; background: rgb(0,112,120); color: white; border: 1px solid rgb(0,112,120); border-radius: 4px; font: inherit; font-weight: 600; cursor: pointer; }
.login-submit:hover { background: #005e65; }
.login-submit:disabled { opacity: .65; cursor: wait; }
.login-footer { max-width: 400px; text-align: center; color: rgb(85,85,89); font-size: 13px; margin: 24px 0 0; }
.logout-button { margin-left: auto; flex-shrink: 0; }
@media (max-width: 420px) { .login-panel { padding: 24px; } }
.project-editor { padding: 8px 0 28px; margin-bottom: 28px; border-bottom: 1px solid #dfe4e8; }
/* Keep navigation on the left at every breakpoint, including content pages. */
.page { --post-sidebar-width: 232px; }
.page > .navbar-vertical {
  position: fixed;
  inset: 0 auto 0 0;
  width: var(--post-sidebar-width);
  height: 100dvh;
  overflow-y: auto;
  background: #fff;
  border-right: 1px solid #dfe4e2;
  z-index: 20;
  padding: 20px 12px;
  align-items: flex-start;
}
.page > .navbar-vertical > .container-fluid { display: flex; flex-direction: column; align-items: stretch; padding: 0; }
.page > .navbar-vertical .navbar-brand { padding: 0 12px 16px; justify-content: flex-start; }
.page > .navbar-vertical .brand-mark { width: 32px; height: 32px; flex: 0 0 32px; font-size: 18px; line-height: 1; }
.page > .navbar-vertical .navbar-collapse { display: block !important; width: 100%; }
.page > .navbar-vertical .navbar-nav { display: flex; flex-direction: column; width: 100%; gap: 6px; padding-top: 0 !important; }
.page > .navbar-vertical .nav-item { width: 100%; }
.page > .navbar-vertical .nav-link { display: flex; align-items: center; width: 100%; min-height: 44px; padding: 10px 12px; border-radius: 4px; gap: 10px; }
.page > .navbar-vertical .nav-link-icon { display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; flex: 0 0 24px; margin: 0; }
.page > .navbar-vertical .nav-link-icon i { display: block; font-size: 22px; line-height: 1; }
.page > .navbar-vertical .nav-link.active { background: var(--surface-soft); color: var(--brand); }
.page > .navbar-vertical .nav-item.active::after { display: none; }
.page > .navbar-vertical ~ .page-wrapper { margin-left: var(--post-sidebar-width) !important; min-width: 0; width: calc(100% - var(--post-sidebar-width)); }
.dashboard-shell { display: block; }
.dashboard-container { padding-left: 24px; padding-right: 24px; }
.dashboard-grid-main .card, .dashboard-stat-grid .card, .quick-grid .card, .dashboard-lower-grid .card { min-width: 0; }
.dashboard-body .stat-card-head i, .dashboard-body .stat-card-value, .dashboard-body .kpi-head strong { color: var(--brand); }
.dashboard-body .avatar { background: var(--surface-soft); color: var(--brand); }
.dashboard-body .quick-icon { display: inline-flex; flex-shrink: 0; background: var(--brand); }
.dashboard-body .chart-dash { stroke: rgba(var(--tblr-primary-rgb), .3); }
.dashboard-body .quick-card div { min-width: 0; }
.dashboard-body .quick-card strong, .dashboard-body .quick-card div > span, .dashboard-body .stat-label { overflow-wrap: anywhere; }
.bg-primary-lt, .bg-green-lt, .status-success { color: var(--brand) !important; background-color: var(--surface-soft) !important; }
.bg-yellow-lt, .status-warning { color: var(--orange-accent) !important; background-color: #fff1df !important; }
.bg-red-lt, .status-danger { color: var(--red-accent) !important; background-color: #fce8e8 !important; }
.dashboard-body .status-pill { border-radius: 4px; white-space: normal; }
.dashboard-body .header-actions { flex-wrap: wrap; }
@media (min-width: 1101px) and (max-width: 1350px) {
  .dashboard-grid-main { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dashboard-grid-main .welcome-card { grid-column: 1 / -1; min-height: auto; }
  .dashboard-stat-grid, .quick-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .page { --post-sidebar-width: 60px; }
  .page > .navbar-vertical { padding: 16px 8px; }
  .page > .navbar-vertical .navbar-brand { width: 100%; padding: 0 0 16px; justify-content: center; }
  .page > .navbar-vertical .navbar-brand a { justify-content: center; gap: 0 !important; }
  .page > .navbar-vertical .nav-link { height: 44px; justify-content: center !important; padding: 10px 0 !important; gap: 0; }
  .page > .navbar-vertical .nav-link-title,
  .page > .navbar-vertical .navbar-brand a > span:last-child:not(.brand-mark) { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .dashboard-container { padding-left: 14px; padding-right: 14px; }
  .dashboard-body .header-actions { gap: 10px; }
  .dashboard-body .header-actions #meta { white-space: normal; }
  .dashboard-body .dashboard-titlebar .page-title { font-size: 23px; }
  .dashboard-body .dashboard-topbar .dashboard-container { flex-direction: row; align-items: center; min-height: 66px; }
  .dashboard-body .dashboard-tools { width: auto; flex-wrap: nowrap; }
  .dashboard-body .user-chip { display: none; }
  .dashboard-body .welcome-copy, .dashboard-body .kpi-card, .dashboard-body .stat-card { padding: 20px; }
  .dashboard-body .welcome-copy h2 { font-size: 22px; }
  .dashboard-body .welcome-stats { margin-top: 24px; }
  .dashboard-body .radial-progress { width: 190px; height: 190px; }
}
.project-editor h3 { font-size: 18px; margin-bottom: 20px; }
.project-editor .content-form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.project-editor .content-form-grid .wide { grid-column: 1 / -1; }
.project-machine-fieldset { margin: 24px 0 0; border: 0; padding: 0; min-width: 0; }
.project-machine-fieldset legend { font-size: 15px; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.project-machine-toolbar { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.project-machine-toolbar .input-icon { flex: 1; min-width: 0; }
.project-machine-list { max-height: 320px; border: 1px solid #dfe4e8; border-radius: 4px; background: white; }
.project-machine-list table { margin: 0; min-width: 600px; }
.project-machine-list td:nth-child(3), .project-machine-list td:nth-child(4) { white-space: nowrap; }
#projectsTable { min-width: 1100px; }
#projectsTable td:first-child { white-space: nowrap; }
.project-machine-list th { position: sticky; top: 0; background: #f5f7f9; z-index: 1; }
.project-machine-list td:first-child { width: 60px; text-align: center; }
.project-machine-line { min-height: 24px; white-space: nowrap; }
#projectFormMessage { overflow-wrap: anywhere; }
.project-instructions-none { background: #fce8e8 !important; color: #b42318 !important; }
.project-instructions-ready { background: #e5f3ed !important; color: #176443 !important; }
.project-instructions-preparing { background: #fff5c2 !important; color: #756000 !important; }
.project-instructions-revising { background: #ffead6 !important; color: #994500 !important; }
[data-bs-theme="dark"] .project-instructions-none { background: #4a2425 !important; color: #ffb4ab !important; }
[data-bs-theme="dark"] .project-instructions-ready { background: #183e2e !important; color: #9ce2bc !important; }
[data-bs-theme="dark"] .project-instructions-preparing { background: #453b12 !important; color: #f4d968 !important; }
[data-bs-theme="dark"] .project-instructions-revising { background: #4a301c !important; color: #ffc18b !important; }
@media (max-width: 700px) { .project-editor .content-form-grid { grid-template-columns: minmax(0, 1fr); } }

:root { --post-surface: #fff; --post-text: #252b2a; --post-muted: #656d69; --post-border: #dfe4e2; --post-accent-ink: var(--brand); }
.btn, .icon-btn, .login-submit {
  min-height: 40px;
  border-radius: 4px;
  padding: 8px 14px;
  font-size: 14px;
  font-weight: 600;
  line-height: 22px;
  letter-spacing: 0;
  gap: 8px;
  box-shadow: none;
}
.btn > i { margin: 0 !important; }
.btn:focus-visible, .icon-btn:focus-visible, .login-submit:focus-visible { outline: 2px solid var(--post-accent-ink); outline-offset: 3px; }
.btn-icon { width: 40px; min-width: 40px; padding: 8px; }
.btn-icon i { font-size: 20px; }
.dashboard-tools { position: relative; margin-left: auto; flex-shrink: 0; gap: 10px; }
.dashboard-topbar .dashboard-container { max-width: none; }
header.navbar > .container-fluid { display: flex; align-items: center; flex-wrap: nowrap; gap: 12px; }
.dashboard-body .dashboard-tools .user-chip, .dashboard-tools .user-chip { display: inline-flex; align-items: center; gap: 8px; background: transparent; border: 1px solid var(--post-border); color: var(--post-text); min-height: 40px; padding: 4px 10px; }
.dashboard-tools .user-chip .avatar { width: 30px; height: 30px; background: var(--surface-soft); color: var(--post-accent-ink); font-size: 12px; box-shadow: none; flex-shrink: 0; }
.user-name { font-size: 13px; line-height: 18px; max-width: 160px; text-align: left; overflow-wrap: anywhere; }
.user-control, .notification-control { position: relative; }
.notification-control { position: static; }
.header-popover { position: absolute; top: calc(100% + 10px); right: 0; z-index: 40; width: 280px; max-width: calc(100vw - 92px); max-height: 60vh; overflow-y: auto; border: 1px solid var(--post-border); border-radius: 4px; background: var(--post-surface); color: var(--post-text); box-shadow: 0 8px 24px #0002; padding: 16px; }
.header-popover[hidden] { display: none; }
.header-popover h3 { font-size: 16px; margin: 0 0 12px; }
.user-popover { width: 190px; padding: 10px; }
.user-popover .logout-button { width: 100%; margin: 0; }
.notification-item { padding: 12px 0; border-top: 1px solid var(--post-border); }
.notification-item strong { font-size: 13px; }
.notification-item p { font-size: 12px; color: var(--post-muted); margin: 4px 0 0; }
@media (max-width: 760px) {
  .dashboard-tools { gap: 6px; }
  .dashboard-topbar .dashboard-container > span { display: none; }
  .dashboard-tools .user-name { max-width: 92px; font-size: 12px; }
  .dashboard-tools .user-chip { padding: 4px 6px; }
  header.navbar > .container-fluid { flex-wrap: wrap; }
  .dashboard-topbar .dashboard-container { justify-content: flex-end; }
  .notification-control .header-popover { right: 0; }
}

[data-bs-theme="dark"] {
  color-scheme: dark;
  --post-surface: #222826;
  --post-text: #e4e9e6;
  --post-muted: #a5afa9;
  --post-border: #3a4540;
  --post-accent-ink: #81cec9;
  --page-soft: #181e1b;
  --surface-soft: rgba(0,112,120,.22);
  --secondary: #bec7c1;
  --ink: #e4e9e6;
  --tblr-body-bg: #181e1b;
  --tblr-body-color: #e4e9e6;
  --tblr-bg-surface: #222826;
  --tblr-border-color: #3a4540;
  --tblr-secondary: #a5afa9;
}
[data-bs-theme="dark"] body, [data-bs-theme="dark"] .page-wrapper, [data-bs-theme="dark"] .login-body { background: var(--page-soft); color: var(--post-text); }
[data-bs-theme="dark"] .card, [data-bs-theme="dark"] .navbar, [data-bs-theme="dark"] .dashboard-topbar,
[data-bs-theme="dark"] .page > .navbar-vertical, [data-bs-theme="dark"] .login-panel,
[data-bs-theme="dark"] .project-machine-list { background: var(--post-surface); border-color: var(--post-border); color: var(--post-text); }
[data-bs-theme="dark"] .welcome-card { background: rgba(0,112,120,.12); }
[data-bs-theme="dark"] .welcome-copy h2, [data-bs-theme="dark"] .dashboard-titlebar .page-title,
[data-bs-theme="dark"] .welcome-stats strong, [data-bs-theme="dark"] .quick-card strong,
[data-bs-theme="dark"] .radial-progress span, [data-bs-theme="dark"] .login-brand { color: var(--post-text); }
[data-bs-theme="dark"] .dashboard-body .stat-card-value, [data-bs-theme="dark"] .dashboard-body .kpi-head strong,
[data-bs-theme="dark"] .dashboard-body .stat-card-head i, [data-bs-theme="dark"] .trend-up,
[data-bs-theme="dark"] .activity-icon, [data-bs-theme="dark"] .navbar-vertical .nav-link.active,
[data-bs-theme="dark"] .navbar-vertical .nav-link.active .nav-link-icon { color: var(--post-accent-ink); }
[data-bs-theme="dark"] .btn-outline-primary { --tblr-btn-color: var(--post-accent-ink); --tblr-btn-border-color: #537b75; }
[data-bs-theme="dark"] .bg-primary-lt, [data-bs-theme="dark"] .bg-green-lt,
[data-bs-theme="dark"] .status-success { color: var(--post-accent-ink) !important; }
[data-bs-theme="dark"] .bg-yellow-lt, [data-bs-theme="dark"] .status-warning { background-color: #3c2b18 !important; color: #ffbb6b !important; }
[data-bs-theme="dark"] .bg-red-lt, [data-bs-theme="dark"] .status-danger { background-color: #402323 !important; color: #ff9191 !important; }
[data-bs-theme="dark"] .trend-down, [data-bs-theme="dark"] .text-danger, [data-bs-theme="dark"] .login-message { color: #ff9191 !important; }
[data-bs-theme="dark"] .text-warning { color: #ffbb6b !important; }
[data-bs-theme="dark"] .radial-progress { background: conic-gradient(var(--brand) calc(var(--value) * 1%), #3a4540 0); }
[data-bs-theme="dark"] .radial-progress > div { background: var(--post-surface); }
[data-bs-theme="dark"] .mini-progress { background: #3a4540; }
[data-bs-theme="dark"] .project-editor, [data-bs-theme="dark"] .project-machine-list { border-color: var(--post-border); }
[data-bs-theme="dark"] .project-machine-list th, [data-bs-theme="dark"] .table thead { background: #29322d; }
[data-bs-theme="dark"] .table { --tblr-table-color: var(--post-text); color: var(--post-text); }
[data-bs-theme="dark"] .form-control, [data-bs-theme="dark"] .form-select, [data-bs-theme="dark"] .login-panel input { background-color: #181e1b; color: var(--post-text); border-color: var(--post-border); }
[data-bs-theme="dark"] .form-control::placeholder, [data-bs-theme="dark"] .login-subtitle, [data-bs-theme="dark"] .login-footer { color: var(--post-muted); }
.page-body .card:has(> form), .page-body .project-editor { display: none; }
.entity-list-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.entity-list-heading h3 { margin: 0; font-size: 18px; }
.table thead th { background: var(--page-soft); }
[data-bs-theme="dark"] .table thead th { background: #29322d; }
.entity-list-notice { color: var(--post-accent-ink); margin: 0 0 16px; }
.entity-list-notice:empty { display: none; }
.editor-modal-open { overflow: hidden; }
.entity-dialog { width: min(840px, calc(100vw - 32px)); max-height: calc(100dvh - 40px); margin: auto; border: 1px solid var(--post-border); border-radius: 8px; background: var(--post-surface); color: var(--post-text); padding: 0; box-shadow: 0 16px 60px #0004; }
.entity-dialog[open] { display: flex; flex-direction: column; }
.entity-dialog::backdrop { background: #0008; }
.editor-modal-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 24px; border-bottom: 1px solid var(--post-border); flex-shrink: 0; }
.editor-modal-header h3 { margin: 0; font-size: 18px; }
.entity-dialog form { padding: 24px; overflow-y: auto; min-height: 0; }
.entity-dialog .content-form-grid, .entity-dialog .manual-form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.entity-dialog .wide { grid-column: 1 / -1; }
.entity-dialog .form-actions { flex-wrap: wrap; }
.entity-dialog .project-machine-list { max-height: 250px; }
@media (max-width: 600px) {
  .entity-dialog { width: calc(100vw - 20px); max-height: calc(100dvh - 20px); }
  .editor-modal-header { padding: 12px 16px; }
  .entity-dialog form { padding: 16px; }
  .entity-dialog .content-form-grid, .entity-dialog .manual-form-grid { grid-template-columns: minmax(0, 1fr); }
  .entity-list-heading { align-items: flex-start; flex-wrap: wrap; }
}
.list-tools { padding: 16px; border-bottom: 1px solid var(--post-border); }
.list-filters { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; }
.list-field-filter { display: grid; grid-template-columns: minmax(150px, 1fr) minmax(180px, 2fr) auto; gap: 10px; margin-top: 10px; }
.list-bulk-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 16px; }
.list-selection { color: var(--post-muted); font-size: 13px; margin-right: auto; }
.list-export { display: flex; gap: 8px; }
.list-export select { width: 155px; }
.list-select-cell { width: 44px; min-width: 44px; text-align: center; }
.table-actions { white-space: nowrap; }
.table-actions .btn + .btn { margin-left: 8px; }
.delete-dialog { max-width: 480px; }
.delete-content { padding: 24px; overflow-y: auto; }
.delete-content ul { padding-left: 20px; overflow-wrap: anywhere; }
.btn-outline-danger { --tblr-btn-color: var(--red-accent); --tblr-btn-border-color: var(--red-accent); --tblr-btn-hover-bg: var(--red-accent); --tblr-btn-hover-border-color: var(--red-accent); }
[data-bs-theme="dark"] .btn-outline-danger { --tblr-btn-color: #ff9191; --tblr-btn-border-color: #b55a5a; }
.form-check-input:checked { background-color: var(--brand); border-color: var(--brand); }
[data-bs-theme="dark"] .form-check-input:not(:checked) { background-color: #181e1b; border-color: var(--post-border); }
@media (max-width: 600px) {
  .list-field-filter { grid-template-columns: minmax(0, 1fr); }
  .list-filters { grid-template-columns: minmax(0, 1fr); }
  .list-selection { width: 100%; }
  .list-export { width: 100%; }
  .list-export select { flex: 1; min-width: 0; }
}
.profile-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px; }
.profile-section { padding: 20px 0; border-top: 1px solid var(--tblr-border-color, #dce2e3); min-width: 0; }
.profile-section h3 { font-size: 18px; margin-bottom: 20px; }
.profile-log { margin-top: 24px; }
.profile-log td:last-child { max-width: 380px; overflow-wrap: anywhere; white-space: normal; }
.user-popover { display: grid; gap: 8px; }
.user-popover[hidden] { display: none; }
@media (max-width: 800px) { .profile-grid { grid-template-columns: minmax(0, 1fr); gap: 8px; } }
.activity-change { margin: 6px 0; font-size: 13px; overflow-wrap: anywhere; }
.profile-log details { min-width: 240px; margin: 4px 0 12px; }
.profile-log summary { cursor: pointer; font-weight: 600; overflow-wrap: anywhere; }

/* Navigation stays dark in both page themes. */
.page > .navbar-vertical,
[data-bs-theme="dark"] .page > .navbar-vertical {
  background: #073d3b;
  border-right-color: #12514d;
  color: #fff;
  --tblr-navbar-color: #fff;
  --tblr-navbar-active-color: #fff;
  --tblr-navbar-hover-color: #fff;
  scrollbar-color: #36736d #073d3b;
}
.page > .navbar-vertical .navbar-brand a,
.page > .navbar-vertical .nav-link,
.page > .navbar-vertical .nav-link-icon,
.page > .navbar-vertical .nav-link i,
[data-bs-theme="dark"] .page > .navbar-vertical .nav-link i,
[data-bs-theme="dark"] .page > .navbar-vertical .nav-link.active,
[data-bs-theme="dark"] .page > .navbar-vertical .nav-link.active .nav-link-icon { color: #fff; }
.page > .navbar-vertical .brand-mark { background: #007078; color: #fff; border: 1px solid #518d88; }
.page > .navbar-vertical .nav-link:hover { background: #16534e; color: #fff; }
.page > .navbar-vertical .nav-link.active { background: #007078; color: #fff; box-shadow: inset 3px 0 0 #a9e4d2; }
.page > .navbar-vertical .nav-link:focus-visible { outline: 2px solid #a9e4d2; outline-offset: 2px; }
.activity-copy { min-width: 0; overflow-wrap: anywhere; }
.activity-details { margin-top: 8px; font-size: 13px; }
.activity-details summary { cursor: pointer; color: inherit; }
.activity-details div { margin-top: 6px; }
.activity-empty { margin: 0; padding: 20px; }
