* { margin: 0; padding: 0; box-sizing: border-box; }
body {
  font-family: 'Space Grotesk', -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #EDF2F8;
  color: #14213D;
  -webkit-font-smoothing: antialiased;
}
a { color: #12447F; text-decoration: none; }
a:hover { color: #2F9E44; }

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #0E2A4F;
  color: #fff;
  padding: 12px 24px;
  flex-wrap: wrap;
  gap: 12px;
}
.brand-title { font-size: 16.5px; font-weight: 700; margin-right: 8px; }
.brand-sub { font-size: 9.5px; letter-spacing: 2.2px; color: #9FB4CF; font-weight: 600; }
.topnav { display: flex; gap: 18px; flex-wrap: wrap; }
.topnav a { color: #CFE0F5; font-size: 14px; font-weight: 600; }
.topnav a:hover { color: #fff; }
.who { display: flex; align-items: center; gap: 12px; font-size: 13px; color: #CFE0F5; }
.link-btn {
  background: none; border: 1px solid #3E5C82; color: #CFE0F5; border-radius: 6px;
  padding: 6px 12px; cursor: pointer; font-size: 13px;
}
.link-btn:hover { background: #16345C; }

.page { padding: 24px; max-width: 1280px; margin: 0 auto; }
.page:has(.ru-layout) { max-width: none; padding: 0 22px 34px; }

/* ============ Advanced UI for the non-dashboard tabs (Allocations, Employees,
   Projects, Users, Login). The dashboard tab uses its own .ru-* design system
   above/below and never references any of these class names — verified by
   grep before writing this — so redesigning them here is fully isolated. ============ */

@keyframes fadeUp { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes scaleFadeIn { from { opacity: 0; transform: scale(.96); } to { opacity: 1; transform: none; } }
@keyframes shimmer { 0% { background-position: -300px 0; } 100% { background-position: 300px 0; } }
@keyframes floatBlob { 0%, 100% { transform: translate(0,0) scale(1); } 50% { transform: translate(20px,-16px) scale(1.06); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes toastIn { from { opacity: 0; transform: translateY(-10px) scale(.98); } to { opacity: 1; transform: none; } }

.page:not(:has(.ru-layout)) { animation: fadeUp .45s cubic-bezier(.22,1,.36,1) both; }

.card {
  background: #fff; border-radius: 16px; padding: 20px 22px; margin-bottom: 20px;
  border: 1px solid #E6ECF5;
  box-shadow: 0 1px 2px rgba(14,42,79,.04), 0 10px 28px rgba(14,42,79,.06);
  animation: scaleFadeIn .4s cubic-bezier(.22,1,.36,1) both;
  transition: box-shadow .25s ease, transform .25s ease;
}
.card:hover { box-shadow: 0 4px 10px rgba(14,42,79,.06), 0 18px 36px rgba(14,42,79,.10); }
.card:nth-of-type(1) { animation-delay: .02s; }
.card:nth-of-type(2) { animation-delay: .08s; }
.card:nth-of-type(3) { animation-delay: .14s; }
.card:nth-of-type(4) { animation-delay: .2s; }
.card h3 {
  color: #0E2A4F; font-size: 15.5px; font-weight: 700; margin-bottom: 14px;
  letter-spacing: -.1px; display: flex; align-items: center; gap: 8px;
}
.card h3::before {
  content: ''; width: 7px; height: 7px; border-radius: 3px; flex: none;
  background: linear-gradient(135deg,#12447F,#2F9E44);
}

.grid-2 { display: grid; grid-template-columns: 1.4fr 1fr; gap: 20px; }
@media (max-width: 860px) { .grid-2 { grid-template-columns: 1fr; } }

.filters {
  display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 18px;
  background: #fff; border-radius: 14px; padding: 14px 16px; border: 1px solid #E6ECF5;
  box-shadow: 0 1px 2px rgba(14,42,79,.04), 0 8px 20px rgba(14,42,79,.05);
}
.filters select {
  padding: 6px 10px; border: 1px solid #C3D2E4; border-radius: 8px; background: #fff;
  font-size: 13px; color: #0E2A4F; min-width: 130px;
}

.kpi-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 20px; }
@media (max-width: 860px) { .kpi-row { grid-template-columns: repeat(2, 1fr); } }
.kpi-card {
  background: #fff; border-radius: 14px; padding: 16px 18px; border: 1px solid #E6ECF5;
  box-shadow: 0 1px 2px rgba(14,42,79,.04), 0 10px 24px rgba(14,42,79,.06);
  transition: transform .25s ease, box-shadow .25s ease;
}
.kpi-card:hover { transform: translateY(-3px); box-shadow: 0 4px 10px rgba(14,42,79,.06), 0 16px 30px rgba(14,42,79,.10); }
.kpi-label { font-size: 11px; letter-spacing: 1px; color: #6A7E9B; font-weight: 600; text-transform: uppercase; }
.kpi-value { font-size: 28px; font-weight: 700; color: #0E2A4F; margin-top: 4px; font-family: 'JetBrains Mono', monospace; }

.legend-list { list-style: none; }
.legend-list li { display: flex; align-items: center; gap: 10px; padding: 6px 0; font-size: 13px; }
.legend-dot { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }

.table-wrap { overflow-x: auto; border-radius: 12px; }
table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
th {
  text-align: left; color: #5B7091; font-size: 10.5px; letter-spacing: .6px; text-transform: uppercase;
  font-weight: 700; padding: 10px 12px; border-bottom: 2px solid #EEF3FA; background: #F8FAFD;
}
td { padding: 10px 12px; border-bottom: 1px solid #EEF3FA; color: #1F2937; transition: background .15s ease; }
tbody tr { animation: fadeUp .35s cubic-bezier(.22,1,.36,1) both; }
tbody tr:nth-child(1) { animation-delay: .02s; } tbody tr:nth-child(2) { animation-delay: .05s; }
tbody tr:nth-child(3) { animation-delay: .08s; } tbody tr:nth-child(4) { animation-delay: .11s; }
tbody tr:nth-child(5) { animation-delay: .14s; } tbody tr:nth-child(6) { animation-delay: .17s; }
tbody tr:nth-child(7) { animation-delay: .2s; } tbody tr:nth-child(8) { animation-delay: .23s; }
tbody tr:nth-child(9) { animation-delay: .26s; } tbody tr:nth-child(10) { animation-delay: .29s; }
tbody tr:nth-child(n+11) { animation-delay: .32s; }
tr:hover td { background: #F4F8FE; }

.btn-primary.is-loading, .btn-small.is-loading { pointer-events: none; opacity: .85; }
.btn-primary.is-loading::after, .btn-small.is-loading::after {
  content: ''; display: inline-block; width: 13px; height: 13px; margin-left: 8px; vertical-align: -2px;
  border: 2px solid rgba(255,255,255,.4); border-top-color: #fff; border-radius: 50%; animation: spin .6s linear infinite;
}

.login-wrap {
  display: flex; align-items: center; justify-content: center; min-height: 92vh; position: relative; overflow: hidden;
}
.login-wrap::before, .login-wrap::after {
  content: ''; position: absolute; border-radius: 50%; filter: blur(2px); z-index: 0;
  animation: floatBlob 9s ease-in-out infinite;
}
.login-wrap::before {
  width: 420px; height: 420px; top: -140px; left: -120px;
  background: radial-gradient(circle, rgba(18,68,127,.14), transparent 70%);
}
.login-wrap::after {
  width: 380px; height: 380px; bottom: -140px; right: -100px;
  background: radial-gradient(circle, rgba(47,158,68,.14), transparent 70%);
  animation-delay: 1.5s;
}
.login-card {
  position: relative; z-index: 1; background: #fff; border-radius: 20px; padding: 36px 32px; width: 360px;
  border: 1px solid #E6ECF5; box-shadow: 0 1px 2px rgba(14,42,79,.05), 0 24px 60px rgba(14,42,79,.16);
  animation: scaleFadeIn .5s cubic-bezier(.22,1,.36,1) both;
}
.login-badge {
  width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; margin-bottom: 16px;
  background: linear-gradient(140deg,#0E3566,#12447F 45%,#2F9E44); color: #fff; font-weight: 700;
  font-size: 15px; font-family: 'JetBrains Mono', monospace; box-shadow: 0 8px 20px rgba(18,68,127,.3);
}
.login-title { font-size: 19px; font-weight: 700; color: #0E2A4F; letter-spacing: -.2px; }
.login-sub { font-size: 13px; color: #6A7E9B; margin-bottom: 20px; }
.login-card label { display: block; font-size: 11.5px; font-weight: 600; color: #5B7091; text-transform: uppercase; letter-spacing: .5px; margin: 14px 0 5px; }
.login-card input {
  width: 100%; padding: 11px 12px; border: 1.5px solid #DCE6F1; border-radius: 10px; font-size: 14px;
  font-family: inherit; transition: border-color .2s ease, box-shadow .2s ease; background: #FBFDFF;
}
.login-card input:focus { outline: none; border-color: #2F9E44; box-shadow: 0 0 0 4px rgba(47,158,68,.12); background: #fff; }
.btn-primary {
  margin-top: 22px; width: 100%; padding: 12px; border: none; border-radius: 10px;
  background: linear-gradient(135deg,#12447F,#2F9E44); color: #fff; font-weight: 700; font-size: 14.5px;
  cursor: pointer; box-shadow: 0 8px 20px rgba(18,68,127,.25); transition: transform .18s ease, box-shadow .18s ease, filter .18s ease;
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 12px 26px rgba(18,68,127,.32); filter: brightness(1.04); }
.btn-primary:active { transform: translateY(0); }
.alert {
  background: #FDECEC; color: #9B2C2C; padding: 10px 14px; border-radius: 10px; font-size: 13px; margin-bottom: 8px;
  border: 1px solid #F5C9C9; animation: toastIn .3s cubic-bezier(.22,1,.36,1) both;
}

.form-row { display: flex; gap: 12px; flex-wrap: wrap; align-items: flex-end; margin-bottom: 16px; }
.form-row > div { display: flex; flex-direction: column; gap: 5px; }
.form-row label { font-size: 10.5px; font-weight: 700; color: #5B7091; text-transform: uppercase; letter-spacing: .6px; }
.form-row input, .form-row select {
  padding: 8px 11px; border: 1.5px solid #DCE6F1; border-radius: 9px; font-size: 13px; min-width: 140px;
  font-family: inherit; background: #FBFDFF; transition: border-color .18s ease, box-shadow .18s ease;
}
.form-row input:focus, .form-row select:focus {
  outline: none; border-color: #2F9E44; box-shadow: 0 0 0 3px rgba(47,158,68,.12); background: #fff;
}
.btn-small {
  padding: 8px 16px; border: none; border-radius: 9px; background: linear-gradient(135deg,#12447F,#2F9E44);
  color: #fff; font-size: 13px; font-weight: 700; cursor: pointer; font-family: inherit;
  box-shadow: 0 4px 12px rgba(18,68,127,.18); transition: transform .16s ease, box-shadow .16s ease, filter .16s ease;
}
.btn-small:hover { transform: translateY(-1px); box-shadow: 0 8px 18px rgba(18,68,127,.24); filter: brightness(1.05); }
.btn-small:active { transform: translateY(0); }
.btn-small.danger { background: linear-gradient(135deg,#B84A42,#9B2C2C); box-shadow: 0 4px 12px rgba(155,44,44,.2); }
.btn-small.danger:hover { box-shadow: 0 8px 18px rgba(155,44,44,.28); }
.pill {
  display: inline-block; padding: 3px 11px; border-radius: 999px; font-size: 12px; font-weight: 700; color: #fff;
  box-shadow: 0 2px 6px rgba(14,42,79,.15); transition: transform .15s ease;
}

/* Allocations grid: scoped to #allocGrid specifically (never present on the
   dashboard) so these input/select/card styles can't leak there. */
#allocGrid { animation: fadeUp .3s ease both; }
#allocGrid .emp-card {
  background: #fff; border-radius: 14px; padding: 16px 18px; margin-bottom: 14px;
  border: 1px solid #E6ECF5; box-shadow: 0 1px 2px rgba(14,42,79,.03), 0 8px 20px rgba(14,42,79,.05);
  animation: fadeUp .35s cubic-bezier(.22,1,.36,1) both; transition: box-shadow .2s ease;
}
#allocGrid .emp-card:hover { box-shadow: 0 4px 10px rgba(14,42,79,.05), 0 14px 28px rgba(14,42,79,.09); }
#allocGrid .emp-card:nth-of-type(1) { animation-delay: .02s; } #allocGrid .emp-card:nth-of-type(2) { animation-delay: .05s; }
#allocGrid .emp-card:nth-of-type(3) { animation-delay: .08s; } #allocGrid .emp-card:nth-of-type(4) { animation-delay: .11s; }
#allocGrid .emp-card:nth-of-type(5) { animation-delay: .14s; } #allocGrid .emp-card:nth-of-type(n+6) { animation-delay: .17s; }
#allocGrid select, #allocGrid input[type="text"], #allocGrid input[type="number"] {
  padding: 6px 9px; border: 1.5px solid #DCE6F1; border-radius: 8px; font-size: 12.5px;
  font-family: inherit; background: #FBFDFF; transition: border-color .18s ease, box-shadow .18s ease;
}
#allocGrid select:focus, #allocGrid input:focus {
  outline: none; border-color: #2F9E44; box-shadow: 0 0 0 3px rgba(47,158,68,.12); background: #fff;
}
#allocGrid select:disabled { background: #F3F6FA; color: #A6B4C6; cursor: not-allowed; }
#allocGrid .pill { font-family: 'JetBrains Mono', monospace; }
#allocGrid .alloc-meta { display: flex; flex-wrap: wrap; gap: 5px 16px; font-size: 12.5px; color: #3D5677; line-height: 1.5; }
#allocGrid .alloc-meta-item b { display: inline-block; color: #12447F; font-weight: 700; margin-right: 5px; }
#allocGrid .alloc-meta-empty { color: #A6B4C6; font-size: 12.5px; }
.skeleton-row {
  height: 64px; border-radius: 14px; margin-bottom: 14px; background: #fff;
  border: 1px solid #E6ECF5;
  background-image: linear-gradient(90deg, #F3F6FA 0px, #FBFDFF 120px, #F3F6FA 240px);
  background-size: 600px 100%; animation: shimmer 1.4s linear infinite;
}

/* Allocation-upload "needs review" table — a real <table> (not a CSS grid
   crammed into one cell) so columns actually line up at any row count. */
.review-card { border-left: 4px solid #D99518; }
.review-table-wrap {
  max-height: 560px; overflow: auto; border: 1px solid #E6ECF5; border-radius: 12px;
}
.review-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.review-table th {
  position: sticky; top: 0; z-index: 1; text-align: left; padding: 8px 10px; background: #F8FAFD;
  color: #5B7091; font-size: 10px; font-weight: 700; letter-spacing: .5px; text-transform: uppercase;
  border-bottom: 2px solid #EEF3FA; white-space: nowrap;
}
.review-table td { padding: 8px 10px; border-bottom: 1px solid #EEF3FA; vertical-align: middle; }
.review-table tbody tr:hover { background: #F7FAFD; }
.review-row--hard { background: #FFFBF0; }
.review-row--hard:hover { background: #FDF3DD; }
.review-loc { font-size: 10.5px; color: #8FA0B8; white-space: nowrap; }
.review-mono { font-family: 'JetBrains Mono', monospace; font-size: 11.5px; color: #5B7091; white-space: nowrap; }
.resolved-chip {
  display: block; max-width: 190px; color: #0E9F6E; font-weight: 600; font-size: 12.5px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.typed-text {
  font-size: 10px; color: #9B2C2C; margin-bottom: 3px; max-width: 210px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.review-table select {
  width: 100%; max-width: 220px; font-size: 12px; padding: 5px 7px; border: 1.5px solid #DCE6F1;
  border-radius: 7px; font-family: inherit; background: #FBFDFF;
}
.review-table select:focus { outline: none; border-color: #2F9E44; box-shadow: 0 0 0 3px rgba(47,158,68,.12); }
.review-actions { white-space: nowrap; }
.review-actions .btn-small { padding: 6px 11px; font-size: 12px; }

/* ============ Resource Utilization dashboard (matches original design) ============ */

@keyframes riseIn { from { transform: scaleY(0); opacity: .25 } to { transform: scaleY(1); opacity: 1 } }
@keyframes popIn { from { opacity: 0; transform: translateY(10px) scale(.985) } to { opacity: 1; transform: none } }
@keyframes growX { from { transform: scaleX(0) } to { transform: scaleX(1) } }
@keyframes pulseDot { 0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(47,158,68,.45) } 50% { opacity: .7; box-shadow: 0 0 0 6px rgba(47,158,68,0) } }

.ru-header {
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  padding: 14px 4px 0;
}
.ru-header-left { display: flex; align-items: center; gap: 13px; }
.ru-badge {
  width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center;
  background: linear-gradient(140deg,#0E3566,#12447F 45%,#2F9E44); color: #fff;
  font-weight: 700; font-size: 13px; font-family: 'JetBrains Mono', monospace;
  box-shadow: 0 6px 16px rgba(18,68,127,.28);
}
.ru-title { font-size: 16.5px; font-weight: 700; letter-spacing: .1px; color: #0E2A4F; }
.ru-subtitle { font-size: 9.5px; letter-spacing: 2.2px; color: #6A7E9B; font-weight: 600; }
.ru-header-right { display: flex; align-items: center; gap: 14px; }
.ru-upload-btn {
  display: inline-flex; align-items: center; gap: 8px; background: linear-gradient(135deg,#12447F,#2F9E44);
  color: #fff; font-size: 12.5px; font-weight: 700; padding: 10px 16px; border-radius: 9px;
  box-shadow: 0 8px 18px rgba(18,68,127,.22);
}
.ru-upload-btn:hover { filter: brightness(1.06) saturate(1.15); color: #fff; }
.ru-dataon { padding: 0 4px; text-align: right; }
.ru-dataon-label { font-size: 9px; color: #7C8DA8; letter-spacing: 1.6px; font-weight: 700; }
.ru-dataon-value { font-size: 13.5px; color: #12447F; font-weight: 700; font-family: 'JetBrains Mono', monospace; }

.ru-livebar {
  padding: 12px 4px 0; font-size: 11.5px; color: #5B7091; display: flex; align-items: center; gap: 9px;
}
.ru-live-dot {
  display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #2F9E44;
  animation: pulseDot 2.4s ease-in-out infinite;
}
.ru-dot-sep { color: #A9B9CE; }

.ru-layout { display: grid; grid-template-columns: 224px 1fr; gap: 14px; padding: 12px 0 0; align-items: start; }
.ru-sidebar { position: sticky; top: 10px; display: flex; flex-direction: column; gap: 12px; }
.ru-content { display: flex; flex-direction: column; gap: 14px; min-width: 0; }

.ru-card {
  background: #fff; border: 1px solid #DEE8F4; border-radius: 16px; overflow: hidden;
  box-shadow: 0 14px 34px rgba(14,42,79,.10), 0 2px 6px rgba(14,42,79,.05);
  animation: popIn .5s cubic-bezier(.22,1,.36,1) both;
  transition: box-shadow .25s ease, transform .25s ease, border-color .25s ease;
}
.ru-card:hover {
  box-shadow: 0 4px 10px rgba(14,42,79,.07), 0 22px 44px rgba(14,42,79,.14);
  border-color: #C9D9EC;
}
.ru-card-head {
  display: flex; align-items: center; justify-content: space-between; padding: 13px 14px;
  background: #fff; border-top: 3px solid #12447F; border-bottom: 1px solid #EAF0F7;
  font-size: 11.5px; font-weight: 700; letter-spacing: 1.6px; color: #0E2A4F;
}
.ru-card-head--plain { padding: 13px 16px 12px; font-size: 12.5px; letter-spacing: 1.3px; }
.ru-card-title { font-size: 11.5px; font-weight: 700; letter-spacing: 1.6px; color: #0E2A4F; }
.ru-clear-btn { border: none; background: none; font-size: 10px; font-weight: 700; letter-spacing: .8px; color: #2F9E44; cursor: pointer; padding: 0; }
.ru-clear-btn:hover { color: #12447F; }

.ru-filters-body { padding: 12px 14px 15px; display: flex; flex-direction: column; gap: 11px; max-height: calc(100vh - 200px); overflow: auto; }
.ru-filter-group-label { font-size: 10px; font-weight: 700; letter-spacing: .9px; color: #334E70; margin-bottom: 5px; }
.ru-filters-body select {
  width: 100%; font-family: inherit; font-size: 11.5px; font-weight: 500; color: #14213D;
  padding: 8px 9px; border: 1px solid #D7E1EE; border-radius: 9px; background: #FBFDFF; cursor: pointer;
}
.ru-filters-body select:hover { border-color: #2F9E44; }

.ru-bands-body { padding: 11px 12px 13px; display: flex; flex-direction: column; gap: 6px; }
.ru-band-row {
  display: flex; align-items: center; gap: 9px; cursor: pointer; padding: 5px 7px; border-radius: 8px;
  border: 1px solid transparent;
}
.ru-band-row:hover { background: #F2F8FD; border-color: #D7E6F5; }
.ru-band-row.active { background: #F2F8FD; border-color: #B9D6F2; }
.ru-band-dot { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.ru-band-range { font-size: 10.5px; font-weight: 700; color: #14213D; width: 58px; font-family: 'JetBrains Mono', monospace; }
.ru-band-label { font-size: 10.5px; color: #5B7091; }

.ru-kpi-row { display: grid; grid-template-columns: repeat(7, 1fr); gap: 12px; }
@media (max-width: 1200px) { .ru-kpi-row { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 700px) { .ru-kpi-row { grid-template-columns: repeat(2, 1fr); } }
.ru-kpi {
  position: relative; overflow: hidden; background: linear-gradient(165deg,#fff 55%,#F4F8FD);
  border: 1px solid #DEE8F4; border-radius: 16px; padding: 15px 15px 16px;
  box-shadow: 0 14px 34px rgba(14,42,79,.10), 0 2px 6px rgba(14,42,79,.05);
  animation: popIn .5s cubic-bezier(.22,1,.36,1) both;
  transition: transform .25s cubic-bezier(.22,1,.36,1), box-shadow .25s ease, border-color .25s ease;
}
.ru-kpi:hover {
  transform: translateY(-3px);
  box-shadow: 0 4px 10px rgba(14,42,79,.08), 0 20px 40px rgba(14,42,79,.16);
  border-color: #C9D9EC;
}
.ru-kpi:nth-of-type(1) { animation-delay: .02s; } .ru-kpi:nth-of-type(2) { animation-delay: .06s; }
.ru-kpi:nth-of-type(3) { animation-delay: .10s; } .ru-kpi:nth-of-type(4) { animation-delay: .14s; }
.ru-kpi:nth-of-type(5) { animation-delay: .18s; } .ru-kpi:nth-of-type(6) { animation-delay: .22s; }
.ru-kpi:nth-of-type(7) { animation-delay: .26s; }
.ru-kpi-bar { position: absolute; inset: 0 0 auto 0; height: 3px; }
.ru-kpi-dot { position: absolute; right: -30px; top: -30px; width: 96px; height: 96px; border-radius: 50%; opacity: .07; }
.ru-kpi-label { position: relative; font-size: 10px; font-weight: 700; letter-spacing: 1.1px; color: #41597B; line-height: 1.4; min-height: 26px; }
.ru-kpi-valuewrap { position: relative; display: flex; align-items: baseline; gap: 7px; margin-top: 8px; }
.ru-kpi-value { font-size: 24px; font-weight: 700; letter-spacing: -.5px; font-family: 'JetBrains Mono', monospace; line-height: 1; }
.ru-kpi-sub { font-size: 11px; color: #8FA0B8; font-weight: 500; }

.ru-grid3-a { display: grid; grid-template-columns: 1.35fr 1fr 1fr; gap: 14px; }
.ru-grid3-b { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 14px; }
.ru-grid3-c { display: grid; grid-template-columns: 1.2fr 1fr 1fr; gap: 14px; }
.ru-grid2-a { display: grid; grid-template-columns: 1.15fr 1fr; gap: 14px; }
.ru-grid-emp { display: grid; grid-template-columns: 340px 1fr; gap: 14px; }
@media (max-width: 1100px) {
  .ru-grid3-a, .ru-grid3-b, .ru-grid3-c, .ru-grid2-a, .ru-grid-emp { grid-template-columns: 1fr; }
}

.ru-chart-body { padding: 14px 16px 12px; display: flex; gap: 10px; height: 236px; box-sizing: border-box; }
.ru-chart-axis { display: flex; flex-direction: column; justify-content: space-between; font-size: 9px; color: #93A5BE; font-family: 'JetBrains Mono', monospace; padding-bottom: 45px; text-align: right; width: 26px; }
.ru-chart-plot { flex: 1; min-width: 0; overflow-x: auto; display: flex; flex-direction: column; }
.ru-bars-row {
  flex: 1; display: flex; align-items: flex-end; gap: 6px; padding: 0 4px; min-height: 0; border-bottom: 1px solid #D5DFEC;
  background: repeating-linear-gradient(to top, transparent 0, transparent 0, #DFE7F1 0, #DFE7F1 1px, transparent 1px, transparent 39px);
}
.ru-bar-col { flex: 1; min-width: 46px; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; cursor: pointer; }
.ru-bar-pct { font-size: 9.5px; font-weight: 700; text-align: center; font-family: 'JetBrains Mono', monospace; margin-bottom: 5px; }
.ru-bar-fill { border-radius: 5px 5px 2px 2px; box-shadow: 0 2px 5px rgba(14,42,79,.16); transform-origin: bottom; animation: riseIn .7s cubic-bezier(.22,1,.36,1) both; }
.ru-bar-labels { display: flex; gap: 6px; padding: 7px 4px 0; height: 45px; box-sizing: border-box; }
.ru-bar-label { flex: 1; min-width: 46px; font-size: 8.5px; color: #5B7091; text-align: center; line-height: 1.2; overflow: hidden; }

.ru-donut-body { padding: 12px 16px 14px; display: flex; align-items: center; gap: 16px; height: 236px; box-sizing: border-box; }
.ru-donut { position: relative; width: 152px; height: 152px; flex: none; border-radius: 50%; box-shadow: 0 10px 26px rgba(14,42,79,.16); }
.ru-donut-hole { position: absolute; inset: 32px; border-radius: 50%; background: #fff; display: grid; place-items: center; box-shadow: inset 0 0 0 1px #EDF2F8; text-align: center; }
.ru-donut-num { font-size: 27px; font-weight: 700; color: #0E2A4F; font-family: 'JetBrains Mono', monospace; line-height: 1; }
.ru-donut-label { font-size: 9px; color: #7C8DA8; letter-spacing: 1.4px; margin-top: 3px; }
.ru-legend-col { flex: 1; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.ru-legend-row { display: flex; align-items: center; gap: 8px; cursor: pointer; padding: 4px 6px; border-radius: 8px; border: 1px solid transparent; }
.ru-legend-row:hover { background: #F2F8FD; border-color: #D7E6F5; }
.ru-legend-dot { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.ru-legend-text { font-size: 10.5px; color: #3D5677; flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ru-legend-count { font-size: 11.5px; font-weight: 700; color: #0E2A4F; font-family: 'JetBrains Mono', monospace; }
.ru-legend-pct { font-size: 10px; color: #8FA0B8; width: 36px; text-align: right; font-family: 'JetBrains Mono', monospace; }

.ru-hbar-body { padding: 12px 16px 14px; height: 236px; box-sizing: border-box; display: flex; flex-direction: column; justify-content: space-between; gap: 4px; overflow-y: auto; }
.ru-hbar-row { display: flex; align-items: center; gap: 9px; cursor: pointer; }
.ru-hbar-name { width: 92px; flex: none; font-size: 9.5px; color: #5B7091; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-align: right; }
.ru-hbar-track { flex: 1; height: 13px; background: #E4EBF4; border-radius: 20px; min-width: 0; overflow: hidden; box-shadow: inset 0 1px 2px rgba(14,42,79,.07); }
.ru-hbar-fill { height: 100%; background: linear-gradient(90deg,#0B3D91,#1668B3 45%,#12897E 78%,#22A24A); border-radius: 20px; transform-origin: left; animation: growX .8s cubic-bezier(.22,1,.36,1) both; }
.ru-hbar-count { width: 26px; font-size: 10.5px; font-weight: 700; color: #0E2A4F; font-family: 'JetBrains Mono', monospace; }

.ru-card--over .ru-card-head { color: #8E2B22; border-top-color: #9B2C2C; }
.ru-card--under .ru-card-head { color: #8A6210; border-top-color: #D99518; }
.ru-list-cols {
  display: grid; grid-template-columns: 22px 1fr 84px 50px; gap: 6px; padding: 8px 14px; background: #F5F9FD;
  border-top: 1px solid #E3EBF5; border-bottom: 1px solid #E3EBF5; font-size: 10px; font-weight: 700; color: #334E70; letter-spacing: .9px;
}
.ru-right { text-align: right; }
.ru-center { text-align: center; }
.ru-list-body { max-height: 250px; overflow: auto; }
.ru-list-row {
  display: grid; grid-template-columns: 22px 1fr 84px 50px; gap: 6px; padding: 8px 14px; border-bottom: 1px solid #F3F7FB;
  font-size: 10.5px; align-items: center; cursor: pointer;
}
.ru-list-row:hover { background: #F8EFEE; }
.ru-list-rank { color: #A9B9CE; font-family: 'JetBrains Mono', monospace; }
.ru-list-name { color: #14213D; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ru-list-dept { color: #5B7091; font-size: 9.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ru-empty-row { padding: 28px 12px; text-align: center; font-size: 11px; color: #8FA0B8; }

.ru-avail-body { padding: 11px 16px 10px; }
.ru-avail-legend { display: flex; gap: 16px; font-size: 9.5px; color: #7C8DA8; margin-bottom: 10px; align-items: center; }
.ru-avail-legend span { display: flex; align-items: center; gap: 6px; }
.ru-avail-chart { position: relative; height: 176px; }
.ru-avail-bars { display: flex; align-items: flex-end; height: 140px; gap: 12px; border-bottom: 1px solid #D5DFEC; position: relative; z-index: 1; }
.ru-avail-col { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; height: 100%; }
.ru-avail-count { font-size: 10.5px; font-weight: 700; color: #0E2A4F; font-family: 'JetBrains Mono', monospace; margin-bottom: 4px; }
.ru-avail-fill { width: 58%; border-radius: 5px 5px 2px 2px; box-shadow: 0 2px 5px rgba(14,42,79,.16); transform-origin: bottom; animation: riseIn .7s cubic-bezier(.22,1,.36,1) both; }
.ru-avail-labels { display: flex; gap: 12px; padding-top: 7px; }
.ru-avail-label { flex: 1; text-align: center; font-size: 9px; color: #7C8DA8; line-height: 1.3; }
.ru-avail-avail { color: #0E9F6E; font-weight: 700; font-family: 'JetBrains Mono', monospace; font-size: 10px; }

.ru-matrix-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px 12px; border-top: 3px solid #12447F; border-bottom: 1px solid #EAF0F7; }
.ru-matrix-right { display: flex; align-items: center; gap: 12px; }
.ru-muted { font-size: 10px; color: #8FA0B8; }
.ru-export-btn {
  background: #F0F7F2; border: 1px solid #BFE0C8; color: #227A35; font-size: 10.5px; font-weight: 700;
  padding: 6px 12px; border-radius: 8px; cursor: pointer; font-family: inherit;
}
.ru-export-btn:hover { background: #227A35; border-color: #227A35; color: #fff; }
.ru-table-scroll { overflow: auto; max-height: 420px; }
.ru-table-scroll--tall { max-height: 300px; }
.ru-matrix-table { border-collapse: collapse; width: 100%; font-size: 10.5px; }
.ru-matrix-table th {
  position: sticky; top: 0; z-index: 2; background: #EDF3FA; border-bottom: 1px solid #D3E0EF;
  padding: 9px 5px; font-size: 9.5px; color: #334E70; font-weight: 700; min-width: 64px; text-align: center;
}
.ru-matrix-table th.ru-matrix-first { position: sticky; left: 0; z-index: 3; text-align: left; padding: 9px 12px; min-width: 190px; }
.ru-matrix-table th.ru-matrix-owner { min-width: 120px; text-align: left; }
.ru-matrix-table th.ru-matrix-total { background: #E9F1F9; border-bottom: 1px solid #DCE6F1; color: #0B3D91; min-width: 74px; text-align: right; padding-right: 10px; }
.ru-matrix-table td { border-bottom: 1px solid #F1F5FA; padding: 8px 5px; text-align: center; font-family: 'JetBrains Mono', monospace; font-weight: 600; }
.ru-matrix-table td.ru-matrix-first { position: sticky; left: 0; background: #fff; text-align: left; padding: 8px 12px; font-weight: 600; color: #14213D; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 220px; font-family: inherit; }
.ru-matrix-table td.ru-matrix-owner { color: #5B7091; font-size: 10px; white-space: nowrap; text-align: left; font-family: inherit; }
.ru-matrix-table td.ru-matrix-total { text-align: right; padding-right: 10px; font-weight: 700; color: #12447F; background: #F7FAFD; }
.ru-matrix-table tr.ru-matrix-footer td { background: #E9F1F9; font-weight: 700; }
.ru-matrix-table tr.ru-matrix-footer td.ru-matrix-first { color: #0E2A4F; letter-spacing: .5px; }
.ru-matrix-table tr.ru-matrix-footer td.ru-matrix-total { background: #DCE9F6; color: #0E2A4F; }

.ru-trend-body { padding: 14px 18px 12px; display: flex; align-items: stretch; gap: 10px; height: 186px; box-sizing: border-box; }
.ru-trend-row { flex: 1; display: flex; align-items: flex-end; gap: 16px; border-bottom: 1px solid #D5DFEC; padding: 0 8px; }
.ru-trend-col { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; height: 100%; cursor: pointer; }
.ru-trend-pct { font-size: 11px; font-weight: 700; font-family: 'JetBrains Mono', monospace; margin-bottom: 5px; }
.ru-trend-fill { width: 64%; border-radius: 6px 6px 2px 2px; box-shadow: 0 2px 6px rgba(14,42,79,.18); transform-origin: bottom; animation: riseIn .7s cubic-bezier(.22,1,.36,1) both; }
.ru-trend-label { height: 26px; padding-top: 7px; font-size: 9.5px; color: #5B7091; }

.ru-bars-body { padding: 15px 18px 14px; display: flex; flex-direction: column; gap: 12px; height: 186px; box-sizing: border-box; overflow: auto; }
.ru-progress-row-head { display: flex; justify-content: space-between; font-size: 11px; margin-bottom: 5px; }
.ru-progress-track { height: 11px; background: #E4EBF4; border-radius: 20px; overflow: hidden; box-shadow: inset 0 1px 2px rgba(14,42,79,.07); }
.ru-progress-fill { height: 100%; border-radius: 20px; transform-origin: left; animation: growX .8s cubic-bezier(.22,1,.36,1) both; }

.ru-spread-body { padding: 14px 16px; }
.ru-spread-bars { display: flex; align-items: flex-end; gap: 10px; height: 104px; }
.ru-spread-col { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; height: 100%; }
.ru-spread-count { font-size: 11px; font-weight: 700; color: #0E2A4F; font-family: 'JetBrains Mono', monospace; margin-bottom: 4px; }
.ru-spread-fill { width: 60%; border-radius: 5px 5px 2px 2px; box-shadow: 0 2px 5px rgba(14,42,79,.16); transform-origin: bottom; animation: riseIn .7s cubic-bezier(.22,1,.36,1) both; }
.ru-spread-label { padding-top: 6px; font-size: 9px; color: #5B7091; }
.ru-model-split { margin-top: 14px; padding-top: 12px; border-top: 1px solid #F1F5FA; display: flex; flex-direction: column; gap: 9px; }

.ru-portfolio-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px; border-top: 3px solid #12447F; border-bottom: 1px solid #EAF0F7; }
.ru-eyebrow { font-size: 10px; font-weight: 700; letter-spacing: 1.6px; color: #41597B; }
.ru-panel-title { font-size: 17px; font-weight: 600; color: #0E2A4F; margin-top: 3px; letter-spacing: -.2px; }
.ru-count-pill { font-size: 10.5px; color: #5B7091; border: 1px solid #DCE6F1; border-radius: 20px; padding: 5px 13px; }
.ru-portfolio-cols {
  display: grid; grid-template-columns: 1.7fr 1fr 1fr 84px 112px 100px 74px 118px; padding: 9px 18px; background: #F5F9FD;
  border-bottom: 1px solid #E3EBF5; font-size: 10px; font-weight: 700; letter-spacing: .9px; color: #334E70;
}
.ru-portfolio-row {
  display: grid; grid-template-columns: 1.7fr 1fr 1fr 84px 112px 100px 74px 118px; padding: 11px 18px; border-bottom: 1px solid #F3F7FB;
  font-size: 11px; align-items: center; cursor: pointer;
}
.ru-portfolio-row:hover { background: #F4F9FE; }
.ru-ellipsis { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding-right: 12px; }
.ru-mono { font-family: 'JetBrains Mono', monospace; }
.ru-signal { font-size: 9.5px; font-weight: 700; padding: 4px 11px; border-radius: 20px; border: 1px solid; white-space: nowrap; }

.ru-records-cols {
  display: grid; grid-template-columns: 82px 1.4fr 1fr 90px 1.8fr 1.1fr 90px 90px; padding: 9px 18px; background: #F5F9FD;
  border-bottom: 1px solid #E3EBF5; font-size: 10px; font-weight: 700; letter-spacing: .9px; color: #334E70;
}
.ru-record-row {
  display: grid; grid-template-columns: 82px 1.4fr 1fr 90px 1.8fr 1.1fr 90px 90px; padding: 9px 18px; border-bottom: 1px solid #F3F7FB;
  font-size: 11px; align-items: center;
}
.ru-record-row:hover { background: #F7FBFF; }
.ru-cat-badge { font-size: 9.5px; font-weight: 600; padding: 3px 9px; border-radius: 20px; border: 1px solid; }

.ru-section-divider { display: flex; align-items: center; gap: 12px; padding: 6px 2px 0; }
.ru-section-divider span { font-size: 9px; font-weight: 700; letter-spacing: 2.2px; color: #12447F; }
.ru-section-divider div { flex: 1; height: 1px; background: linear-gradient(90deg,#CFDEEF,rgba(207,222,239,0)); }

.ru-emp-detail-body { padding: 4px 16px 15px; }
.ru-emp-detail-row { display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: center; padding: 9px 0; border-bottom: 1px solid #F1F5FA; }
.ru-emp-detail-label { font-size: 11px; font-weight: 500; color: #5B7091; }
.ru-emp-detail-value { font-size: 11.5px; font-weight: 700; text-align: right; font-family: 'JetBrains Mono', monospace; }
.ru-hint { padding-top: 11px; font-size: 10px; color: #8FA0B8; line-height: 1.5; }

.ru-emp-proj-cols {
  display: grid; grid-template-columns: 1.6fr 1fr 1fr 110px; background: #F5F9FD; border-top: 1px solid #E3EBF5;
  border-bottom: 1px solid #E3EBF5; font-size: 10px; font-weight: 700; letter-spacing: .9px; color: #334E70;
}
.ru-emp-proj-cols > div, .ru-emp-proj-row > div { padding: 9px 14px; }
.ru-emp-proj-row { display: grid; grid-template-columns: 1.6fr 1fr 1fr 110px; border-bottom: 1px solid #F3F7FB; font-size: 11px; align-items: center; }
.ru-emp-proj-badge { font-weight: 700; font-family: 'JetBrains Mono', monospace; font-size: 10.5px; padding: 4px 10px; border-radius: 20px; }

/* ============ Dashboard polish pass: advanced filter comboboxes, active-filter
   chips, subtle page-level ambience, count-up KPIs, staggered chart entrances.
   Everything here only ever renders inside .ru-layout (dashboard-only), and
   touches nothing about what data/charts/KPIs are shown — purely how the
   filter controls work and how the page feels. ============ */

body:has(.ru-layout) {
  background:
    radial-gradient(1100px 520px at 6% -6%, rgba(18,68,127,.07), transparent 62%),
    radial-gradient(900px 480px at 96% 2%, rgba(47,158,68,.07), transparent 60%),
    linear-gradient(180deg, #F3F7FC 0%, #EDF2F8 220px, #EDF2F8 100%);
}

/* Thin, brand-colored scrollbars everywhere inside the dashboard shell. */
.ru-layout ::-webkit-scrollbar { width: 8px; height: 8px; }
.ru-layout ::-webkit-scrollbar-track { background: transparent; }
.ru-layout ::-webkit-scrollbar-thumb { background: #C7D6E8; border-radius: 6px; }
.ru-layout ::-webkit-scrollbar-thumb:hover { background: #9FB4CF; }

/* ---- Active filter chips ---- */
.ru-chip-row { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 14px 11px; }
.ru-chip-row:empty { display: none; }
.ru-chip {
  display: inline-flex; align-items: center; gap: 6px; background: #EAF1FC; border: 1px solid #C7DBF5;
  color: #12447F; font-size: 10.5px; font-weight: 600; padding: 4px 6px 4px 10px; border-radius: 20px;
  animation: scaleFadeIn .25s cubic-bezier(.22,1,.36,1) both; max-width: 100%;
}
.ru-chip-label { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 150px; }
.ru-chip-remove {
  display: grid; place-items: center; width: 15px; height: 15px; border-radius: 50%; border: none; flex: none;
  background: rgba(18,68,127,.12); color: #12447F; font-size: 10px; line-height: 1; cursor: pointer;
  transition: background .15s ease, color .15s ease;
}
.ru-chip-remove:hover { background: #9B2C2C; color: #fff; }

/* ---- Custom combobox filter control (replaces bare <select>) ---- */
.ru-filter-group { position: relative; }
.ru-filter-group-label { display: flex; align-items: center; gap: 5px; }
.ru-filter-icon { flex: none; opacity: .75; }
.ru-combo-trigger {
  width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 6px;
  font-family: inherit; font-size: 11.5px; font-weight: 500; color: #14213D; text-align: left;
  padding: 8px 9px; border: 1px solid #D7E1EE; border-radius: 9px; background: #FBFDFF; cursor: pointer;
  transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}
.ru-combo-trigger:hover { border-color: #2F9E44; }
.ru-combo-trigger.is-open { border-color: #12447F; box-shadow: 0 0 0 3px rgba(18,68,127,.12); background: #fff; }
.ru-combo-trigger.has-value { color: #0E2A4F; font-weight: 700; }
.ru-combo-value { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ru-combo-chevron { flex: none; color: #8FA0B8; transition: transform .18s ease; }
.ru-combo-trigger.is-open .ru-combo-chevron { transform: rotate(180deg); color: #12447F; }

.ru-combo-panel {
  position: absolute; top: calc(100% + 6px); left: 0; right: 0; z-index: 60;
  background: #fff; border: 1px solid #DEE8F4; border-radius: 12px;
  box-shadow: 0 1px 2px rgba(14,42,79,.06), 0 20px 44px rgba(14,42,79,.20);
  overflow: hidden; animation: scaleFadeIn .16s cubic-bezier(.22,1,.36,1) both;
  transform-origin: top center;
}
.ru-combo-search-wrap { padding: 8px; border-bottom: 1px solid #EEF3FA; }
.ru-combo-search {
  width: 100%; padding: 7px 9px; border: 1.5px solid #DCE6F1; border-radius: 8px; font-size: 12px;
  font-family: inherit; background: #F8FAFD;
}
.ru-combo-search:focus { outline: none; border-color: #2F9E44; background: #fff; }
.ru-combo-options { max-height: 230px; overflow-y: auto; padding: 4px; }
.ru-combo-option {
  display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 7px 9px;
  font-size: 12px; color: #3D5677; border-radius: 7px; cursor: pointer; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis;
}
.ru-combo-option:hover { background: #F2F8FD; }
.ru-combo-option.is-selected { background: #EAF1FC; color: #12447F; font-weight: 700; }
.ru-combo-option-check { flex: none; color: #2F9E44; opacity: 0; }
.ru-combo-option.is-selected .ru-combo-option-check { opacity: 1; }
.ru-combo-empty { padding: 14px 10px; text-align: center; font-size: 11.5px; color: #8FA0B8; }

/* ---- KPI count-up target (JS toggles the digits, this just keeps layout stable) ---- */
.ru-kpi-value { transition: color .2s ease; }

/* ---- Click-to-filter affordances on every remaining static panel: band KPI
   cards, donut legend, load-bands sidebar list, monthly trend bars, matrix
   month headers + owner cells, model split rows, portfolio/records
   owner-customer-employee cells, employee project breakdown rows. Every one
   of these calls the exact same setFilter() the chart bars already use. ---- */
.ru-kpi--clickable { cursor: pointer; }
.ru-kpi--clickable:hover .ru-kpi-value { text-decoration-color: currentColor; }
.ru-kpi.is-active, .ru-legend-row.is-active { border-color: currentColor; box-shadow: 0 0 0 2px rgba(18,68,127,.10); }
.ru-trend-col:hover .ru-trend-fill, .ru-spread-col:hover .ru-spread-fill { filter: brightness(1.08); }
.ru-matrix-table th.ru-matrix-month { cursor: pointer; border-radius: 4px; transition: background .15s ease, color .15s ease; }
.ru-matrix-table th.ru-matrix-month:hover { background: #EAF1FC; color: #12447F; }
.ru-matrix-table td.ru-matrix-owner[data-owner], .ru-portfolio-row [data-owner], .ru-portfolio-row [data-customer], .ru-record-row [data-owner] {
  cursor: pointer; transition: color .15s ease;
}
.ru-matrix-table td.ru-matrix-owner[data-owner]:hover, .ru-portfolio-row [data-owner]:hover, .ru-portfolio-row [data-customer]:hover, .ru-record-row [data-owner]:hover {
  color: #12447F; text-decoration: underline; text-decoration-color: #B9D6F2;
}
.ru-record-row [data-employee]:hover > div:first-child, .ru-record-row [data-project]:hover {
  color: #12447F !important; text-decoration: underline; text-decoration-color: #B9D6F2;
}
.ru-emp-proj-row:hover { background: #F4F9FE; }
.ru-model-split [data-val]:hover .ru-progress-row-head span:first-child { color: #12447F; text-decoration: underline; text-decoration-color: #B9D6F2; }
