:root {
  --ctr-blue: #5c78a6;
  --ctr-red: #BC3726;
  --ctr-yellow: #E1A521;
}
body { background: #f7f7f7; }
.app-navbar { background: var(--ctr-blue); }
.card-header { font-weight: 600; }
.status-active { background: #198754; }
.status-disabled, .status-inactive { background: #ffc107; color: #000; }
.status-deleted, .status-archived { background: #dc3545; }
pre { background: #f1f1f1; padding: 12px; border-radius: 6px; white-space: pre-wrap; font-size: 13px; }
.field-row { border: 1px solid #ddd; border-radius: 8px; padding: 12px; margin-bottom: 10px; background: #fff; }
.tree-row-child { padding-left: 24px; border-left: 3px solid #ddd; }
.small-muted { font-size: 0.875rem; color: #6c757d; }

/* WorkMesh usability/theme foundation */
:root {
  --workmesh-font-scale: 1;
  --workmesh-primary: #5c78a6;
  --workmesh-secondary: #BC3726;
  --workmesh-accent: #E1A521;
  --workmesh-nav-bg: #212529;
  --workmesh-nav-text: #ffffff;
  --workmesh-radius: .375rem;
}
body { font-size: calc(1rem * var(--workmesh-font-scale)); }
.navbar.bg-dark { background-color: var(--workmesh-nav-bg) !important; }
.navbar-dark .navbar-nav .nav-link, .navbar-dark .navbar-brand { color: var(--workmesh-nav-text) !important; }
.btn-primary { background-color: var(--workmesh-primary); border-color: var(--workmesh-primary); border-radius: var(--workmesh-radius); }
.btn-outline-primary { color: var(--workmesh-primary); border-color: var(--workmesh-primary); border-radius: var(--workmesh-radius); }
.btn-outline-primary:hover { background-color: var(--workmesh-primary); border-color: var(--workmesh-primary); }
.workmesh-dark-mode { background:#121416; color:#e9ecef; }
.workmesh-dark-mode .card, .workmesh-dark-mode .modal-content, .workmesh-dark-mode .dropdown-menu, .workmesh-dark-mode .bg-white { background-color:#1c2126 !important; color:#e9ecef; }
.workmesh-dark-mode .table { color:#e9ecef; }
.workmesh-dark-mode .text-muted { color:#adb5bd !important; }
.workmesh-dark-mode .form-control, .workmesh-dark-mode .form-select { background-color:#15191d; color:#e9ecef; border-color:#495057; }
.workmesh-high-contrast .card, .workmesh-high-contrast .modal-content, .workmesh-high-contrast .form-control, .workmesh-high-contrast .form-select { border:2px solid #000; }
.workmesh-compact-tables .table > :not(caption) > * > * { padding:.25rem .35rem; }
.workmesh-reduce-motion *, .workmesh-reduce-motion *::before, .workmesh-reduce-motion *::after { transition:none !important; animation:none !important; scroll-behavior:auto !important; }
.heatmap-matrix-table .form-control-color { width:2.5rem; height:2rem; padding:.15rem; }
.heatmap-matrix-table .hm-cell-value, .heatmap-matrix-table .cell-value { max-width:5.5rem; }

/* WorkMesh bottom drawer form foundation */
.workmesh-drawer-open { overflow: hidden; }
.workmesh-drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.35);
  z-index: 2540;
}
.workmesh-bottom-drawer {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  max-height: 82vh;
  background: #fff;
  border-radius: 18px 18px 0 0;
  box-shadow: 0 -18px 55px rgba(15, 23, 42, 0.28);
  z-index: 2541;
  display: flex;
  flex-direction: column;
  animation: workmeshDrawerIn 160ms ease-out;
}
.workmesh-drawer-header,
.workmesh-drawer-footer {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid #e5e7eb;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.workmesh-drawer-footer {
  border-bottom: 0;
  border-top: 1px solid #e5e7eb;
  justify-content: flex-end;
}
.workmesh-drawer-body {
  padding: 1rem 1.25rem;
  overflow: auto;
}
@keyframes workmeshDrawerIn {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}
.view-as-banner {
  background: #fff3cd;
  color: #664d03;
  border-bottom: 1px solid #ffecb5;
  padding: 0.45rem 1rem;
  font-size: 0.9rem;
  display: flex;
  justify-content: center;
  gap: 1rem;
  align-items: center;
}

/* WorkMesh public landing page */
.workmesh-landing-page {
  min-height: 100vh;
  margin: 0;
  color: #172033;
  background:
    radial-gradient(circle at top left, rgba(225, 165, 33, 0.22), transparent 30rem),
    radial-gradient(circle at bottom right, rgba(92, 120, 166, 0.26), transparent 34rem),
    linear-gradient(135deg, #f8fafc 0%, #eef3f8 48%, #fff8e8 100%);
}
.workmesh-landing-header {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: min(1120px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 1.25rem 0;
}
.workmesh-landing-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  color: #172033;
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  text-decoration: none;
}
.workmesh-landing-logo {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  box-shadow: 0 10px 28px rgba(23, 32, 51, 0.14);
}
.workmesh-landing-login {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0.55rem 1.05rem;
  color: #fff;
  background: var(--workmesh-primary, #5c78a6);
  border: 1px solid rgba(92, 120, 166, 0.45);
  border-radius: 999px;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 12px 30px rgba(92, 120, 166, 0.28);
}
.workmesh-landing-login:hover,
.workmesh-landing-login:focus {
  color: #fff;
  background: #4d688f;
  text-decoration: none;
}
.workmesh-landing-main {
  min-height: calc(100vh - 6rem);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem 5rem;
}
.workmesh-landing-hero {
  width: min(780px, 100%);
  padding: clamp(2rem, 6vw, 4.5rem);
  text-align: center;
  background: rgba(255, 255, 255, 0.76);
  border: 1px solid rgba(92, 120, 166, 0.16);
  border-radius: 32px;
  box-shadow: 0 30px 90px rgba(23, 32, 51, 0.14);
  backdrop-filter: blur(14px);
}
.workmesh-landing-hero-logo {
  width: 118px;
  height: 118px;
  margin-bottom: 1.4rem;
  border-radius: 28px;
  box-shadow: 0 18px 44px rgba(23, 32, 51, 0.16);
}
.workmesh-landing-eyebrow {
  margin: 0 0 0.45rem;
  color: var(--workmesh-secondary, #BC3726);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.workmesh-landing-hero h1 {
  margin: 0;
  color: #111827;
  font-size: clamp(3rem, 10vw, 5.7rem);
  font-weight: 800;
  letter-spacing: -0.06em;
  line-height: 0.96;
}
.workmesh-landing-copy {
  max-width: 620px;
  margin: 1.15rem auto 0;
  color: #475569;
  font-size: clamp(1.05rem, 2.2vw, 1.35rem);
  line-height: 1.55;
}
@media (max-width: 575.98px) {
  .workmesh-landing-header { width: min(100% - 1.25rem, 1120px); }
  .workmesh-landing-logo { width: 36px; height: 36px; border-radius: 10px; }
  .workmesh-landing-brand { font-size: 1rem; }
  .workmesh-landing-login { min-height: 38px; padding: 0.45rem 0.9rem; }
  .workmesh-landing-hero { border-radius: 24px; }
  .workmesh-landing-hero-logo { width: 92px; height: 92px; border-radius: 22px; }
}
