:root {
  --stone: #00a868;
  --stone-dark: #006b45;
  --stone-soft: #e7f8f1;
  --ink: #101514;
  --muted: #66736f;
  --line: #dce5e1;
  --panel: #ffffff;
  --canvas: #f4f7f5;
  --charcoal: #1f2523;
  --warning: #b87503;
  --danger: #b23b3b;
  --info: #2867a8;
  --radius: 8px;
  --shadow: 0 16px 38px rgba(17, 24, 39, 0.065);
  --shadow-soft: 0 8px 20px rgba(16, 21, 20, 0.045);
  --shadow-strong: 0 22px 58px rgba(16, 21, 20, 0.13);
  --sidebar: #0b1210;
  --surface: rgba(255, 255, 255, 0.9);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  color: var(--ink);
  background:
    linear-gradient(180deg, #f8fbf9 0%, #eff5f2 48%, #f7faf8 100%);
  -webkit-font-smoothing: antialiased;
  text-rendering: geometricPrecision;
}

button,
input,
textarea,
select {
  font: inherit;
}

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  transition: grid-template-columns 180ms ease;
}

.app-shell.locked,
.login-screen.hidden {
  display: none;
}

.login-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    linear-gradient(135deg, rgba(0, 168, 104, 0.16), rgba(255, 255, 255, 0) 42%),
    linear-gradient(180deg, #f8fbf9, #eef5f1);
}

.login-card {
  width: min(440px, 100%);
  display: grid;
  gap: 22px;
  padding: 28px;
  border: 1px solid rgba(199, 213, 207, 0.86);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(248, 251, 249, 0.92));
  box-shadow: var(--shadow-strong);
}

.login-brand {
  padding: 12px;
  border: 1px solid rgba(0, 168, 104, 0.16);
  border-radius: var(--radius);
  color: #fff;
  background: #0b1210;
  justify-content: center;
}

.login-brand div span {
  color: var(--muted);
}

.login-brand .brand-logo {
  height: 46px;
  max-width: 250px;
}

.login-form {
  display: grid;
  gap: 14px;
}

.login-form label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 800;
}

.login-form input {
  min-height: 44px;
  border: 1px solid rgba(199, 213, 207, 0.9);
  border-radius: 7px;
  padding: 9px 11px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.88);
}

.login-form input:focus {
  outline: 2px solid rgba(0, 168, 104, 0.24);
  border-color: var(--stone);
}

.login-error {
  min-height: 18px;
  margin: 0;
  color: var(--danger);
  font-size: 0.86rem;
  font-weight: 800;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 24px 18px;
  background: #101514;
  color: #fff;
  display: flex;
  flex-direction: column;
  gap: 24px;
  z-index: 10;
  transition:
    width 180ms ease,
    padding 180ms ease;
}

.brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 52px;
}

.brand-logo {
  display: block;
  width: 100%;
  max-width: 232px;
  height: 42px;
  object-fit: contain;
  object-position: center;
}

.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: var(--radius);
  display: grid;
  place-items: center;
  background: var(--stone);
  color: #052117;
  font-weight: 900;
  font-size: 1.25rem;
}

.brand strong,
.brand span {
  display: block;
}

.brand div span {
  color: #aab7b2;
  font-size: 0.85rem;
}

.nav-list {
  display: grid;
  gap: 8px;
}

.sidebar-toggle {
  min-height: 34px;
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius);
  display: grid;
  place-items: center;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.06);
  color: #dce5e1;
}

.sidebar-toggle span {
  width: 10px;
  height: 10px;
  border-left: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  transition: transform 160ms ease;
}

.app-shell.sidebar-collapsed {
  grid-template-columns: 86px minmax(0, 1fr);
}

.app-shell.sidebar-collapsed .sidebar {
  padding-inline: 14px;
}

.app-shell.sidebar-collapsed .brand,
.app-shell.sidebar-collapsed .nav-button {
  justify-content: center;
}

.app-shell.sidebar-collapsed .brand-logo {
  width: 42px;
  height: 42px;
  object-fit: cover;
  object-position: left center;
}

.app-shell.sidebar-collapsed .brand div,
.app-shell.sidebar-collapsed .nav-button > span:nth-child(2),
.app-shell.sidebar-collapsed .nav-expand-icon,
.app-shell.sidebar-collapsed .nav-sublist,
.app-shell.sidebar-collapsed .sidebar-panel {
  display: none;
}

.app-shell.sidebar-collapsed .sidebar-toggle span {
  transform: rotate(225deg);
}

.nav-group {
  display: grid;
  gap: 6px;
}

.nav-button {
  width: 100%;
  border: 0;
  border-radius: var(--radius);
  background: transparent;
  color: #c9d6d1;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  cursor: pointer;
  text-align: left;
}

.nav-button > span:nth-child(2) {
  flex: 1;
}

.nav-button:hover,
.nav-button.active {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

.nav-button.active {
  box-shadow: inset 3px 0 0 var(--stone);
}

.nav-icon {
  width: 32px;
  height: 32px;
  border-radius: 7px;
  display: grid;
  place-items: center;
  background: rgba(0, 168, 104, 0.16);
  color: #7ff0bd;
  font-weight: 800;
}

.nav-expand-icon {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  display: grid;
  place-items: center;
  color: #dce5e1;
  background: rgba(255, 255, 255, 0.06);
}

.nav-expand-icon::before {
  content: "";
  width: 8px;
  height: 8px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  transition: transform 160ms ease;
}

.nav-expand-icon.open::before {
  transform: rotate(225deg);
}

.nav-sublist {
  display: grid;
  gap: 4px;
  padding-left: 44px;
}

.nav-subbutton {
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: #aab7b2;
  cursor: pointer;
  padding: 8px 10px;
  text-align: left;
}

.nav-subbutton:hover,
.nav-subbutton.active {
  color: #fff;
  background: rgba(255, 255, 255, 0.07);
}

.sidebar-panel {
  margin-top: auto;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.05);
}

.sidebar-panel strong {
  display: block;
  font-size: 2rem;
  line-height: 1;
  margin: 8px 0;
}

.sidebar-panel p,
.panel-label {
  color: #b4c0bc;
  font-size: 0.88rem;
}

.workspace {
  min-width: 0;
  padding: 24px;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  margin-bottom: 18px;
}

.eyebrow {
  display: block;
  color: var(--stone-dark);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-size: clamp(1.65rem, 3vw, 2.35rem);
}

h2 {
  max-width: 760px;
  margin-bottom: 0;
  font-size: clamp(1.5rem, 3vw, 2.4rem);
  line-height: 1.08;
}

h3 {
  margin-bottom: 14px;
  font-size: 1rem;
}

.topbar-actions,
.profile,
.week-pill,
.hero-metrics {
  display: flex;
  align-items: center;
  gap: 12px;
}

.week-pill,
.profile {
  min-height: 48px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
}

.week-pill {
  flex-direction: column;
  align-items: flex-start;
  gap: 0;
}

.week-pill span,
.profile small {
  color: var(--muted);
  font-size: 0.78rem;
}

.profile > span {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #fff;
  background: var(--charcoal);
  font-size: 0.78rem;
  font-weight: 800;
}

.mobile-menu {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  padding: 9px;
}

.mobile-menu span {
  display: block;
  height: 2px;
  margin: 5px 0;
  background: var(--ink);
}

.hero-summary {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding: 24px;
  margin-bottom: 18px;
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(0, 168, 104, 0.12), rgba(255, 255, 255, 0)),
    var(--panel);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.hero-metrics {
  align-self: stretch;
  flex-wrap: wrap;
}

.hero-metrics div {
  min-width: 118px;
  padding: 14px;
  border-radius: var(--radius);
  background: #f7faf8;
  border: 1px solid var(--line);
}

.hero-metrics span {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
}

.hero-metrics strong {
  font-size: 1.55rem;
}

.content-area {
  display: grid;
  gap: 18px;
}

.page-hero {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 18px;
  padding: 22px;
  border: 1px solid rgba(199, 213, 207, 0.86);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(0, 168, 104, 0.1), rgba(255, 255, 255, 0.9) 42%),
    var(--panel);
  box-shadow: 0 14px 36px rgba(16, 21, 20, 0.07);
}

.page-hero h2 {
  margin: 6px 0 8px;
  color: var(--ink);
  font-size: clamp(1.45rem, 2.4vw, 2.1rem);
  line-height: 1.05;
  letter-spacing: 0;
}

.page-hero p {
  max-width: 760px;
  margin: 0;
  color: var(--muted);
  font-weight: 700;
  line-height: 1.5;
}

.breadcrumbs {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 900;
  text-transform: uppercase;
}

.breadcrumbs span,
.breadcrumbs strong {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.breadcrumbs span::after {
  content: "/";
  color: rgba(102, 115, 111, 0.52);
}

.breadcrumbs span:last-child::after {
  content: "";
}

.breadcrumbs strong {
  color: var(--stone-dark);
}

.page-hero-meta {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  min-width: 220px;
}

.subnav {
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  scrollbar-width: thin;
}

.subnav-button,
.primary-button,
.secondary-button,
.icon-button {
  min-height: 36px;
  border-radius: 7px;
  border: 1px solid var(--line);
  cursor: pointer;
  font-weight: 800;
}

.subnav-button {
  flex: 0 0 auto;
  padding: 8px 12px;
  color: var(--muted);
  background: transparent;
}

.subnav-button.active {
  color: #fff;
  border-color: var(--stone-dark);
  background: var(--stone-dark);
}

.filter-panel {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 16px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(135deg, #ffffff, #f5faf7);
  box-shadow: 0 10px 26px rgba(17, 24, 39, 0.04);
}

.filter-panel strong {
  display: block;
  margin-bottom: 4px;
}

.filter-panel span,
.filter-panel label {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.filter-controls {
  display: flex;
  align-items: end;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.filter-controls label {
  display: grid;
  gap: 6px;
}

.filter-controls input,
.filter-controls select {
  min-width: 150px;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 8px 10px;
  color: var(--ink);
  background: #fbfdfc;
  font-weight: 800;
}

.filter-controls input:focus,
.filter-controls select:focus {
  outline: 2px solid rgba(0, 168, 104, 0.24);
  border-color: var(--stone);
}

.table-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 14px;
  margin: 12px 0 10px;
}

.table-search {
  display: grid;
  gap: 6px;
  min-width: min(320px, 100%);
}

.table-search span,
.table-count {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
}

.table-search input {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 8px 11px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.86);
  font-weight: 800;
}

.table-search input:focus {
  outline: 2px solid rgba(0, 168, 104, 0.24);
  border-color: var(--stone);
}

.primary-button,
.secondary-button {
  padding: 9px 13px;
}

.primary-button {
  color: #fff;
  border-color: var(--stone-dark);
  background: var(--stone-dark);
}

.primary-button:hover {
  background: var(--stone);
}

.primary-button.compact {
  min-height: 34px;
  white-space: nowrap;
}

.secondary-button.compact {
  min-height: 34px;
  padding: 7px 11px;
  white-space: nowrap;
}

.secondary-button {
  color: var(--ink);
  background: #f7faf8;
}

.icon-button {
  min-height: 32px;
  padding: 6px 9px;
  color: var(--stone-dark);
  background: var(--stone-soft);
  border-color: transparent;
}

.icon-button.danger {
  color: var(--danger);
  background: #ffe8e8;
}

.grid {
  display: grid;
  gap: 18px;
}

.grid.cols-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.grid.cols-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.grid.cols-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.card,
.metric-card,
.table-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: 0 10px 30px rgba(17, 24, 39, 0.05);
}

.card,
.table-card {
  padding: 18px;
}

.metric-card {
  padding: 16px;
  min-height: 138px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.metric-head,
.section-head,
.row-between {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
}

.metric-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius);
  display: grid;
  place-items: center;
  background: var(--stone-soft);
  color: var(--stone-dark);
  font-weight: 900;
}

.metric-card span,
.muted {
  color: var(--muted);
  font-size: 0.88rem;
}

.metric-card strong {
  display: block;
  margin-top: 8px;
  font-size: 1.75rem;
}

.trend {
  color: var(--stone-dark);
  font-weight: 800;
  font-size: 0.82rem;
}

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

.progress {
  overflow: hidden;
  height: 8px;
  border-radius: 999px;
  background: #e8eeeb;
}

.progress > span {
  display: block;
  height: 100%;
  width: var(--value);
  border-radius: inherit;
  background: var(--stone);
}

.list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.list li {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
}

.list li:last-child {
  border-bottom: 0;
}

.empty-state {
  min-height: 154px;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px;
  border: 1px dashed #bdd4ca;
  border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(0, 168, 104, 0.08), rgba(255, 255, 255, 0.92));
}

.empty-state-icon {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  display: grid;
  place-items: center;
  border-radius: var(--radius);
  color: var(--stone-dark);
  background: var(--stone-soft);
  font-weight: 900;
}

.empty-state strong {
  display: block;
  margin-bottom: 6px;
}

.empty-state p {
  margin: 0 0 12px;
  color: var(--muted);
  line-height: 1.45;
}

.empty-state-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.empty-state-note {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.tag,
.status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 24px;
  padding: 3px 8px;
  border: 1px solid rgba(0, 168, 104, 0.16);
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 800;
  color: var(--stone-dark);
  background: var(--stone-soft);
  white-space: nowrap;
}

.status::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: currentColor;
  opacity: 0.72;
}

.status.success {
  color: var(--stone-dark);
  background: #e7f8f1;
  border-color: rgba(0, 168, 104, 0.2);
}

.status.warning {
  color: var(--warning);
  background: #fff4dd;
  border-color: rgba(184, 117, 3, 0.18);
}

.status.danger {
  color: var(--danger);
  background: #ffe8e8;
  border-color: rgba(178, 59, 59, 0.18);
}

.status.info {
  color: var(--info);
  background: #e8f2ff;
  border-color: rgba(40, 103, 168, 0.18);
}

.status.neutral {
  color: #68736f;
  background: #f1f5f3;
  border-color: rgba(104, 115, 111, 0.16);
}

.bar-chart {
  display: grid;
  gap: 12px;
}

.bar-row {
  display: grid;
  grid-template-columns: 105px minmax(0, 1fr) 52px;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 0.86rem;
}

.bar-track {
  height: 10px;
  border-radius: 999px;
  background: #e7edea;
  overflow: hidden;
}

.bar-fill {
  width: var(--value);
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--stone-dark), var(--stone));
}

.donut-wrap {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}

.donut {
  width: 132px;
  aspect-ratio: 1;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: conic-gradient(var(--stone) 0 64%, #232927 64% 79%, #dfe7e3 79%);
}

.donut::after {
  content: attr(data-label);
  width: 82px;
  aspect-ratio: 1;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--ink);
  background: var(--panel);
  font-weight: 900;
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  min-width: 620px;
  border-collapse: collapse;
}

th,
td {
  padding: 12px 10px;
  text-align: left;
  border-bottom: 1px solid var(--line);
  font-size: 0.9rem;
}

th {
  color: var(--muted);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0;
}

tr:last-child td {
  border-bottom: 0;
}

.people-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
}

.people-table {
  min-width: 760px;
}

.payroll-card {
  overflow: hidden;
}

.payroll-visual {
  display: grid;
  grid-template-columns: minmax(220px, 0.55fr) minmax(0, 1fr);
  gap: 18px;
  align-items: center;
}

.payroll-visual-spaced {
  margin-top: 14px;
}

.payroll-stack {
  display: flex;
  min-height: 58px;
  overflow: hidden;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: #eef4f1;
}

.payroll-stack span {
  width: var(--value);
  min-width: 6px;
  background: var(--color);
}

.payroll-bars {
  display: grid;
  gap: 12px;
}

.payroll-row {
  display: grid;
  grid-template-columns: minmax(130px, 0.5fr) minmax(0, 1fr) 46px;
  gap: 12px;
  align-items: center;
}

.payroll-row div:first-child {
  display: grid;
  gap: 2px;
}

.payroll-row span {
  color: var(--muted);
  font-size: 0.82rem;
}

.payroll-table {
  min-width: 1060px;
}

.goals-table {
  min-width: 1120px;
}

.commercial-goals-form {
  display: grid;
  gap: 16px;
}

.finance-table {
  min-width: 820px;
}

.payable-summary-card {
  display: grid;
  gap: 16px;
}

.payable-board {
  display: grid;
  grid-template-columns: repeat(5, minmax(220px, 1fr));
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.payable-column {
  min-width: 220px;
  display: grid;
  align-content: start;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #f8fbf9;
}

.payable-column.danger {
  background: #fff7f7;
  border-color: #f0c7c7;
}

.payable-column.warning {
  background: #fffaf0;
  border-color: #efd9a5;
}

.payable-column.info {
  background: #f2f8ff;
  border-color: #c5dcf4;
}

.payable-column.success {
  background: #f2fbf7;
  border-color: #bfe4d3;
}

.payable-column-head {
  display: flex;
  align-items: center;
  gap: 10px;
}

.payable-column-head > span {
  width: 32px;
  height: 32px;
  border-radius: 7px;
  display: grid;
  place-items: center;
  color: var(--stone-dark);
  background: var(--stone-soft);
  font-weight: 900;
}

.payable-column-head small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-weight: 800;
}

.payable-list {
  display: grid;
  gap: 8px;
}

.payable-item {
  display: grid;
  gap: 10px;
  padding: 10px;
  border: 1px solid rgba(199, 213, 207, 0.82);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.82);
}

.payable-item > div {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: flex-start;
}

.payable-item span:not(.status) {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.8rem;
}

.config-finance-card {
  display: grid;
  gap: 16px;
}

.config-list {
  display: grid;
  gap: 12px;
  min-height: 100%;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #f8fbf9;
}

.config-chip-list {
  display: grid;
  gap: 8px;
}

.config-chip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px;
  border: 1px solid rgba(199, 213, 207, 0.82);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.86);
}

.config-chip > div:first-child {
  display: grid;
  gap: 6px;
}

.supplier-report-card {
  display: grid;
  gap: 16px;
}

.supplier-report-list {
  display: grid;
  gap: 10px;
}

.supplier-report-item {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) minmax(140px, 0.35fr) minmax(130px, 0.25fr);
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid rgba(199, 213, 207, 0.82);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.86);
}

.supplier-report-item.contract-report-item {
  grid-template-columns: 42px minmax(0, 1fr) minmax(150px, 0.32fr) minmax(130px, 0.22fr) auto;
}

.supplier-rank {
  width: 34px;
  height: 34px;
  border-radius: 7px;
  display: grid;
  place-items: center;
  color: var(--stone-dark);
  background: var(--stone-soft);
  font-weight: 900;
}

.supplier-values {
  display: grid;
  gap: 3px;
}

.supplier-values span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.forecast-card {
  display: grid;
  gap: 16px;
}

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

.scenario-button {
  min-height: 68px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  display: grid;
  gap: 4px;
  cursor: pointer;
  text-align: left;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.82);
}

.scenario-button span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.scenario-button.active {
  color: #fff;
  border-color: var(--stone-dark);
  background: var(--stone-dark);
}

.scenario-button.active span {
  color: #dce5e1;
}

.forecast-timeline {
  display: grid;
  grid-template-columns: repeat(6, minmax(220px, 1fr));
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.forecast-month {
  min-width: 220px;
  display: grid;
  gap: 12px;
  padding: 12px;
  border: 1px solid rgba(199, 213, 207, 0.82);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.86);
}

.forecast-month.negative {
  border-color: #f0c7c7;
  background: #fff7f7;
}

.forecast-bar {
  display: grid;
  gap: 6px;
}

.forecast-bar span {
  display: block;
  width: var(--value);
  min-width: 6px;
  height: 8px;
  border-radius: 999px;
  background: var(--color);
}

.forecast-lines {
  display: grid;
  gap: 7px;
}

.forecast-lines div {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 0.82rem;
}

.forecast-lines strong {
  color: var(--ink);
}

.budget-card {
  display: grid;
  gap: 16px;
}

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

.budget-item {
  display: grid;
  gap: 12px;
  padding: 12px;
  border: 1px solid rgba(199, 213, 207, 0.82);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.86);
}

.plan-bars {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.plan-bar-item {
  display: grid;
  gap: 12px;
  padding: 12px;
  border: 1px solid rgba(199, 213, 207, 0.82);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.88);
}

.plan-bar-item.over-budget {
  border-color: #f0c7c7;
  background: #fff7f7;
}

.finance-form {
  align-self: start;
}

.wide-label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.wide-label input {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 9px 10px;
  color: var(--ink);
  background: #fbfdfc;
}

.wide-label input:focus {
  outline: 2px solid rgba(0, 168, 104, 0.24);
  border-color: var(--stone);
}

.payroll-note-row td {
  padding-top: 0;
  background: #fbfdfc;
}

.payroll-note-row label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.table-input {
  width: 118px;
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 7px 9px;
  color: var(--ink);
  background: #fff;
}

.table-input.wide {
  width: 100%;
}

.table-input:focus {
  outline: 2px solid rgba(0, 168, 104, 0.24);
  border-color: var(--stone);
}

.table-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.collaborator-form {
  display: grid;
  gap: 18px;
}

.form-section {
  display: grid;
  gap: 12px;
  padding-top: 2px;
}

.form-section + .form-section {
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.form-section h3 {
  margin-bottom: 0;
}

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

.form-grid label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.form-grid input,
.form-grid select,
.benefit-row input,
.benefit-row select {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 9px 10px;
  color: var(--ink);
  background: #fbfdfc;
}

.form-grid input:focus,
.form-grid select:focus,
.benefit-row input:focus,
.benefit-row select:focus,
.note-box:focus {
  outline: 2px solid rgba(0, 168, 104, 0.24);
  border-color: var(--stone);
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding-top: 4px;
}

.benefits-list {
  display: grid;
  gap: 10px;
}

.benefit-row {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(140px, 0.6fr) auto;
  gap: 10px;
  align-items: end;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #f7faf8;
}

.benefit-row label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  padding: 22px;
  background: rgba(16, 21, 20, 0.52);
}

.modal-card {
  width: min(1040px, 100%);
  max-height: min(90vh, 900px);
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.28);
  padding: 18px;
}

.modal-card.wide-modal {
  width: min(1220px, 100%);
}

.modal-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  padding-bottom: 16px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.modal-head h3 {
  margin-bottom: 4px;
}

.feedback-region {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 70;
  display: grid;
  gap: 10px;
  width: min(360px, calc(100vw - 36px));
}

.feedback-toast {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  padding: 13px 14px;
  border: 1px solid rgba(199, 213, 207, 0.92);
  border-left: 4px solid var(--stone);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(248, 251, 249, 0.94));
  box-shadow: 0 18px 44px rgba(17, 24, 39, 0.16);
}

.feedback-icon {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: var(--stone-dark);
  background: var(--stone-soft);
  font-weight: 900;
}

.feedback-toast.warning {
  border-left-color: var(--warning);
}

.feedback-toast.warning .feedback-icon {
  color: var(--warning);
  background: #fff4dd;
}

.feedback-toast.error {
  border-left-color: var(--danger);
}

.feedback-toast.error .feedback-icon {
  color: var(--danger);
  background: #ffe8e8;
}

.feedback-toast.info {
  border-left-color: var(--info);
}

.feedback-toast.info .feedback-icon {
  color: var(--info);
  background: #e8f2ff;
}

.feedback-toast strong {
  display: block;
  margin-bottom: 3px;
  color: var(--ink);
}

.feedback-toast span {
  display: block;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.35;
}

.confirmation-layer {
  position: fixed;
  inset: 0;
  z-index: 65;
  display: grid;
  place-items: center;
  padding: 22px;
  background: rgba(16, 21, 20, 0.52);
}

.confirmation-card {
  width: min(460px, 100%);
  display: grid;
  gap: 14px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.28);
}

.confirmation-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: var(--radius);
  color: var(--warning);
  background: #fff4dd;
  font-weight: 900;
}

.confirmation-card h3 {
  margin-bottom: 4px;
}

.confirmation-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.confirmation-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.danger-action {
  background: var(--danger);
}

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

.kanban-column {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #f7faf8;
}

.kanban-card {
  padding: 12px;
  margin-top: 10px;
  border-radius: var(--radius);
  background: var(--panel);
  border: 1px solid var(--line);
}

.note-box {
  width: 100%;
  min-height: 118px;
  resize: vertical;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px;
  color: var(--ink);
  background: #fbfdfc;
}

.split-stat {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.split-stat:last-child {
  border-bottom: 0;
}

.rank {
  display: grid;
  gap: 12px;
}

.rank-item {
  display: grid;
  grid-template-columns: 34px 1fr auto;
  align-items: center;
  gap: 10px;
}

.rank-number {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--charcoal);
  color: #fff;
  font-weight: 800;
}

/* Premium visual layer */
.app-shell {
  grid-template-columns: 292px minmax(0, 1fr);
}

.sidebar {
  padding: 26px 18px;
  background:
    linear-gradient(180deg, rgba(0, 168, 104, 0.13), rgba(0, 0, 0, 0) 34%),
    var(--sidebar);
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 18px 0 50px rgba(16, 21, 20, 0.08);
}

.brand {
  padding: 8px 8px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.brand-mark {
  box-shadow:
    inset 0 -10px 18px rgba(0, 0, 0, 0.12),
    0 12px 26px rgba(0, 168, 104, 0.22);
}

.brand strong {
  font-size: 1.02rem;
}

.nav-list {
  gap: 10px;
}

.nav-button {
  min-height: 48px;
  padding: 10px 11px;
  border: 1px solid transparent;
  font-weight: 780;
  transition:
    background 160ms ease,
    color 160ms ease,
    border-color 160ms ease,
    transform 160ms ease;
}

.nav-button:hover {
  border-color: rgba(255, 255, 255, 0.08);
  transform: translateX(2px);
}

.nav-button.active {
  background: rgba(255, 255, 255, 0.11);
  border-color: rgba(127, 240, 189, 0.2);
  box-shadow:
    inset 3px 0 0 var(--stone),
    0 10px 26px rgba(0, 0, 0, 0.16);
}

.nav-icon {
  background: rgba(0, 168, 104, 0.18);
  border: 1px solid rgba(127, 240, 189, 0.14);
}

.nav-sublist {
  margin: -2px 0 2px;
  padding-left: 52px;
}

.nav-subbutton {
  position: relative;
  min-height: 34px;
  font-size: 0.9rem;
  transition:
    background 160ms ease,
    color 160ms ease;
}

.nav-subbutton.active::before {
  content: "";
  position: absolute;
  left: -12px;
  top: 50%;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--stone);
  transform: translateY(-50%);
}

.sidebar-panel {
  background:
    linear-gradient(135deg, rgba(0, 168, 104, 0.18), rgba(255, 255, 255, 0.04)),
    rgba(255, 255, 255, 0.05);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.workspace {
  padding: 28px;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 8;
  margin: -28px -28px 20px;
  padding: 22px 28px 16px;
  background: rgba(248, 251, 249, 0.86);
  border-bottom: 1px solid rgba(220, 229, 225, 0.72);
  backdrop-filter: blur(18px);
}

.eyebrow {
  color: var(--stone-dark);
}

h1 {
  letter-spacing: 0;
}

.week-pill,
.profile,
.hero-summary,
.subnav,
.card,
.metric-card,
.table-card {
  border-color: rgba(199, 213, 207, 0.86);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(12px);
}

.week-pill,
.profile {
  box-shadow: 0 8px 20px rgba(16, 21, 20, 0.05);
}

.profile > span {
  background:
    linear-gradient(135deg, var(--stone-dark), var(--charcoal));
}

.hero-summary {
  padding: 26px;
  background:
    linear-gradient(135deg, rgba(0, 168, 104, 0.13), rgba(255, 255, 255, 0.76) 42%),
    rgba(255, 255, 255, 0.82);
}

.hero-metrics div {
  background: rgba(255, 255, 255, 0.72);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.74);
}

.subnav {
  padding: 5px;
  box-shadow: var(--shadow-soft);
  overflow-x: auto;
  flex-wrap: nowrap;
  width: 100%;
}

.subnav-button {
  flex: 0 0 auto;
  min-height: 38px;
  padding: 8px 14px;
  border-color: transparent;
}

.subnav-button:hover {
  color: var(--ink);
  background: rgba(0, 168, 104, 0.08);
}

.subnav-button.active {
  background:
    linear-gradient(180deg, var(--stone), var(--stone-dark));
  box-shadow: 0 8px 18px rgba(0, 107, 69, 0.18);
}

.card,
.table-card {
  padding: 20px;
}

.metric-card {
  position: relative;
  overflow: hidden;
  padding: 18px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(250, 253, 252, 0.82));
  transition:
    transform 160ms ease,
    box-shadow 160ms ease,
    border-color 160ms ease;
}

.metric-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  background: linear-gradient(90deg, var(--stone), rgba(0, 168, 104, 0.08));
}

.grid.cols-4 > .metric-card:first-child,
.grid.cols-3 > .metric-card:first-child {
  border-color: rgba(0, 107, 69, 0.24);
  background:
    linear-gradient(135deg, rgba(0, 168, 104, 0.13), rgba(255, 255, 255, 0.92) 46%),
    var(--surface);
}

.grid.cols-4 > .metric-card:first-child::before,
.grid.cols-3 > .metric-card:first-child::before {
  height: 4px;
  background: linear-gradient(90deg, var(--stone-dark), var(--stone));
}

.metric-card:hover {
  border-color: rgba(0, 168, 104, 0.34);
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}

.metric-icon {
  background: linear-gradient(180deg, #e8faf3, #d8f4ea);
  border: 1px solid rgba(0, 168, 104, 0.14);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.metric-card strong {
  letter-spacing: 0;
}

.primary-button,
.secondary-button,
.icon-button {
  transition:
    transform 140ms ease,
    box-shadow 140ms ease,
    background 140ms ease,
    border-color 140ms ease;
}

.primary-button {
  background: linear-gradient(180deg, var(--stone), var(--stone-dark));
  box-shadow: 0 10px 22px rgba(0, 107, 69, 0.18);
}

.primary-button:hover,
.secondary-button:hover,
.icon-button:hover {
  transform: translateY(-1px);
}

.secondary-button {
  border-color: rgba(199, 213, 207, 0.9);
  background: rgba(255, 255, 255, 0.78);
}

.icon-button {
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.74);
}

.tag,
.status {
  border: 1px solid rgba(0, 168, 104, 0.16);
}

.progress,
.bar-track {
  background: #e4ece8;
  box-shadow: inset 0 1px 2px rgba(16, 21, 20, 0.05);
}

.progress > span,
.bar-fill {
  background: linear-gradient(90deg, var(--stone-dark), var(--stone));
}

table {
  border-spacing: 0;
}

th {
  background: rgba(247, 250, 248, 0.9);
  color: #5a6864;
}

td {
  background: rgba(255, 255, 255, 0.42);
}

tbody tr:hover td {
  background: rgba(231, 248, 241, 0.36);
}

.table-wrap {
  border: 1px solid rgba(220, 229, 225, 0.82);
  border-radius: var(--radius);
}

.table-wrap table {
  min-width: 100%;
}

.list li {
  border-color: rgba(220, 229, 225, 0.74);
}

.kanban-column,
.kanban-card,
.benefit-row,
.payroll-stack {
  border-color: rgba(199, 213, 207, 0.86);
  background: rgba(247, 250, 248, 0.78);
}

.rank-number {
  background: linear-gradient(135deg, var(--stone-dark), var(--charcoal));
}

.form-grid input,
.form-grid select,
.benefit-row input,
.benefit-row select,
.wide-label input,
.table-input,
.note-box {
  border-color: rgba(199, 213, 207, 0.9);
  background: rgba(255, 255, 255, 0.82);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.82);
}

.modal-backdrop {
  background: rgba(10, 18, 15, 0.62);
  backdrop-filter: blur(8px);
}

.modal-card {
  border-color: rgba(255, 255, 255, 0.52);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(248, 251, 249, 0.94));
  box-shadow: var(--shadow-strong);
}

.modal-head {
  border-color: rgba(220, 229, 225, 0.82);
}

/* Final premium polish */
body {
  background:
    radial-gradient(circle at top left, rgba(0, 168, 104, 0.055), transparent 30%),
    linear-gradient(180deg, #fbfcfb 0%, #f4f7f5 46%, #fafbf9 100%);
}

.workspace {
  padding: 26px 30px;
}

.topbar {
  margin: -26px -30px 20px;
  padding: 16px 30px 13px;
  background: rgba(251, 252, 251, 0.9);
}

.topbar h1 {
  font-size: clamp(1.48rem, 2.45vw, 2.05rem);
}

.week-pill,
.profile {
  min-height: 42px;
  padding: 7px 10px;
}

.profile > span {
  width: 30px;
  height: 30px;
}

.secondary-button.compact,
.primary-button.compact {
  min-height: 32px;
  padding: 7px 10px;
}

.sidebar {
  background:
    linear-gradient(180deg, rgba(0, 168, 104, 0.08), rgba(0, 0, 0, 0) 30%),
    #0d1412;
  box-shadow: 14px 0 34px rgba(16, 21, 20, 0.055);
}

.brand {
  min-height: 48px;
  padding: 6px 6px 16px;
}

.nav-list {
  gap: 7px;
}

.nav-button {
  min-height: 44px;
  padding: 9px 10px;
  color: #bdcbc6;
}

.nav-button.active {
  background: rgba(255, 255, 255, 0.085);
  box-shadow: inset 2px 0 0 var(--stone);
}

.nav-icon {
  width: 30px;
  height: 30px;
  background: rgba(255, 255, 255, 0.055);
  color: #8df0c4;
}

.nav-subbutton {
  min-height: 31px;
  color: #9fb0aa;
  font-size: 0.85rem;
}

.sidebar-panel {
  padding: 14px;
  background: rgba(255, 255, 255, 0.045);
}

.page-hero,
.hero-summary {
  background:
    linear-gradient(135deg, rgba(0, 168, 104, 0.055), rgba(255, 255, 255, 0.94) 40%),
    rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow-soft);
}

.page-hero {
  padding: 20px;
}

.page-hero h2 {
  font-size: clamp(1.34rem, 2.15vw, 1.85rem);
}

.page-hero p {
  max-width: 700px;
  font-size: 0.94rem;
  font-weight: 650;
}

.subnav {
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 6px 16px rgba(16, 21, 20, 0.035);
}

.subnav-button {
  min-height: 34px;
  padding: 7px 12px;
}

.subnav-button.active {
  background: var(--stone-dark);
  box-shadow: 0 7px 14px rgba(0, 107, 69, 0.14);
}

.card,
.table-card,
.metric-card {
  border-color: rgba(207, 219, 214, 0.86);
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 8px 22px rgba(16, 21, 20, 0.04);
}

.card,
.table-card {
  padding: 18px;
}

.metric-card {
  min-height: 126px;
  padding: 16px;
}

.metric-card::before {
  background: linear-gradient(90deg, rgba(0, 168, 104, 0.58), rgba(0, 168, 104, 0.04));
}

.grid.cols-4 > .metric-card:first-child,
.grid.cols-3 > .metric-card:first-child {
  background:
    linear-gradient(135deg, rgba(0, 168, 104, 0.075), rgba(255, 255, 255, 0.94) 50%),
    rgba(255, 255, 255, 0.9);
}

.metric-card:hover {
  box-shadow: 0 12px 30px rgba(16, 21, 20, 0.07);
}

.metric-card strong {
  font-size: 1.58rem;
}

.metric-icon {
  width: 34px;
  height: 34px;
  background: #f0faf6;
}

h3 {
  margin-bottom: 12px;
  font-size: 0.96rem;
}

th,
td {
  padding: 10px 10px;
  font-size: 0.86rem;
}

th {
  background: #f8faf9;
  color: #64716d;
  font-size: 0.72rem;
}

td {
  background: rgba(255, 255, 255, 0.54);
}

.table-toolbar {
  margin: 8px 0 9px;
}

.table-search input {
  min-height: 34px;
  background: rgba(255, 255, 255, 0.92);
}

.empty-state {
  min-height: 132px;
  background: linear-gradient(135deg, rgba(0, 168, 104, 0.045), rgba(255, 255, 255, 0.94));
}

.kanban-card,
.kanban-column,
.benefit-row,
.payroll-stack {
  background: rgba(250, 252, 251, 0.84);
}

@media (max-width: 1120px) {
  .grid.cols-4,
  .grid.cols-3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hero-summary {
    flex-direction: column;
  }
}

@media (max-width: 760px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .app-shell.sidebar-collapsed {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: min(84vw, 320px);
    transform: translateX(-105%);
    transition: transform 180ms ease;
  }

  .app-shell.sidebar-collapsed .sidebar {
    padding: 26px 18px;
  }

  .app-shell.sidebar-collapsed .brand,
  .app-shell.sidebar-collapsed .nav-button {
    justify-content: flex-start;
  }

  .app-shell.sidebar-collapsed .brand div,
  .app-shell.sidebar-collapsed .nav-button > span:nth-child(2),
  .app-shell.sidebar-collapsed .nav-expand-icon,
  .app-shell.sidebar-collapsed .nav-sublist,
  .app-shell.sidebar-collapsed .sidebar-panel {
    display: initial;
  }

  .app-shell.sidebar-collapsed .nav-sublist,
  .app-shell.sidebar-collapsed .sidebar-panel {
    display: grid;
  }

  .app-shell.sidebar-collapsed .nav-expand-icon {
    display: grid;
  }

  body.menu-open .sidebar {
    transform: translateX(0);
  }

  .workspace {
    padding: 16px;
  }

  .mobile-menu {
    display: block;
    flex: 0 0 auto;
  }

  .topbar {
    align-items: flex-start;
    margin: -16px -16px 18px;
    padding: 16px;
  }

  .topbar-actions {
    display: none;
  }

  .grid.cols-4,
  .grid.cols-3,
  .grid.cols-2,
  .people-layout,
  .payroll-visual,
  .benefit-row,
  .supplier-report-item,
  .scenario-switcher,
  .budget-grid,
  .plan-bars,
  .kanban {
    grid-template-columns: 1fr;
  }

  .filter-panel {
    align-items: stretch;
    flex-direction: column;
  }

  .table-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .filter-controls {
    justify-content: stretch;
  }

  .filter-controls label {
    flex: 1 1 180px;
  }

  .hero-summary {
    padding: 18px;
  }

  .page-hero {
    flex-direction: column;
    padding: 18px;
  }

  .page-hero-meta {
    justify-content: flex-start;
    min-width: 0;
    width: 100%;
  }

  .hero-metrics {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .hero-metrics div {
    min-width: 0;
    padding: 10px;
  }

  .hero-metrics strong {
    font-size: 1.2rem;
  }

  .bar-row {
    grid-template-columns: 82px minmax(0, 1fr) 42px;
  }

  .payroll-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .hero-metrics {
    grid-template-columns: 1fr;
  }

  .metric-head,
  .section-head,
  .row-between {
    align-items: flex-start;
    flex-direction: column;
  }

  .subnav {
    width: 100%;
  }

  .primary-button,
  .secondary-button,
  .filter-controls label,
  .filter-controls input,
  .filter-controls select {
    width: 100%;
  }

  .subnav-button {
    width: auto;
  }

  .form-grid,
  .form-actions,
  .benefit-row {
    grid-template-columns: 1fr;
  }

  .form-actions {
    display: grid;
  }

  .modal-backdrop {
    padding: 10px;
  }

  .modal-card {
    max-height: 94vh;
    padding: 14px;
  }

  .modal-head {
    flex-direction: column;
  }
}

/* Codex/macOS inspired light interface */
:root {
  --stone: #111111;
  --stone-dark: #111111;
  --stone-soft: #f3f4f6;
  --ink: #111111;
  --muted: #6b7280;
  --line: #e5e7eb;
  --panel: #ffffff;
  --canvas: #fafafa;
  --charcoal: #111111;
  --warning: #9a6700;
  --danger: #b42318;
  --info: #2563eb;
  --radius: 8px;
  --shadow: none;
  --shadow-soft: none;
  --shadow-strong: 0 18px 44px rgba(0, 0, 0, 0.12);
  --sidebar: #ffffff;
  --surface: #ffffff;
}

body {
  font-family:
    -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display",
    "Inter", "Segoe UI", system-ui, sans-serif;
  font-size: 14px;
  color: #111111;
  background: #ffffff;
  text-rendering: optimizeLegibility;
}

.app-shell {
  grid-template-columns: 236px minmax(0, 1fr);
  background: #ffffff;
}

.app-shell.sidebar-collapsed {
  grid-template-columns: 68px minmax(0, 1fr);
}

.sidebar {
  padding: 18px 12px;
  color: #111111;
  background: #ffffff;
  border-right: 1px solid #e5e7eb;
  box-shadow: none;
}

.brand {
  min-height: 42px;
  padding: 4px 4px 14px;
  border-bottom: 1px solid #eeeeee;
  justify-content: center;
}

.brand-logo {
  max-width: 190px;
  height: 34px;
  filter: none;
  opacity: 0.92;
  object-position: center;
}

.app-shell.sidebar-collapsed .brand-logo {
  width: 34px;
  height: 34px;
}

.sidebar-toggle {
  min-height: 30px;
  color: #6b7280;
  background: #ffffff;
  border-color: #e5e7eb;
}

.nav-list {
  gap: 3px;
}

.nav-button {
  min-height: 36px;
  padding: 7px 8px;
  color: #374151;
  border: 0;
  border-radius: 7px;
  background: transparent;
  font-size: 0.9rem;
  font-weight: 500;
  transform: none;
}

.nav-button:hover,
.nav-button.active {
  color: #111111;
  background: #f4f4f5;
  box-shadow: none;
  transform: none;
}

.nav-button.active {
  font-weight: 650;
}

.nav-icon {
  width: 24px;
  height: 24px;
  color: #111111;
  background: transparent;
  border: 0;
  font-size: 0.72rem;
  font-weight: 700;
}

.nav-expand-icon {
  width: 24px;
  height: 24px;
  color: #6b7280;
  background: transparent;
}

.nav-sublist {
  gap: 1px;
  margin: 0;
  padding-left: 34px;
}

.nav-subbutton {
  min-height: 28px;
  padding: 5px 8px;
  color: #6b7280;
  border-radius: 6px;
  font-size: 0.82rem;
  font-weight: 500;
}

.nav-subbutton:hover,
.nav-subbutton.active {
  color: #111111;
  background: #f4f4f5;
}

.nav-subbutton.active::before {
  display: none;
}

.sidebar-panel {
  padding: 12px;
  color: #111111;
  background: #fafafa;
  border-color: #eeeeee;
  box-shadow: none;
}

.sidebar-panel strong {
  font-size: 1.45rem;
}

.sidebar-panel p,
.panel-label {
  color: #6b7280;
  font-size: 0.8rem;
}

.workspace {
  padding: 20px 24px 28px;
  background: #ffffff;
}

.topbar {
  position: sticky;
  top: 0;
  margin: -20px -24px 16px;
  padding: 12px 24px;
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid #eeeeee;
  box-shadow: none;
  backdrop-filter: blur(14px);
}

.topbar h1,
h1 {
  color: #111111;
  font-size: clamp(1.25rem, 2vw, 1.65rem);
  font-weight: 650;
}

h2 {
  color: #111111;
  font-size: clamp(1.18rem, 2vw, 1.55rem);
  font-weight: 650;
}

h3 {
  margin-bottom: 10px;
  color: #111111;
  font-size: 0.9rem;
  font-weight: 650;
}

.eyebrow,
.breadcrumbs,
.week-pill span,
.profile small,
.muted {
  color: #6b7280;
}

.eyebrow,
.breadcrumbs {
  font-size: 0.68rem;
  font-weight: 650;
}

.breadcrumbs strong {
  color: #111111;
}

.week-pill,
.profile {
  min-height: 36px;
  padding: 6px 9px;
  border-color: #e5e7eb;
  background: #ffffff;
  box-shadow: none;
}

.profile > span {
  width: 26px;
  height: 26px;
  color: #ffffff;
  background: #111111;
  font-size: 0.7rem;
}

.primary-button,
.secondary-button,
.icon-button,
.subnav-button {
  border-radius: 7px;
  font-size: 0.84rem;
  font-weight: 550;
  box-shadow: none;
}

.primary-button {
  color: #ffffff;
  background: #111111;
  border-color: #111111;
}

.primary-button:hover {
  background: #000000;
}

.secondary-button,
.icon-button {
  color: #111111;
  background: #ffffff;
  border-color: #d1d5db;
}

.primary-button:hover,
.secondary-button:hover,
.icon-button:hover {
  transform: none;
}

.primary-button.compact,
.secondary-button.compact {
  min-height: 30px;
  padding: 6px 10px;
}

.content-area {
  gap: 14px;
}

.page-hero,
.hero-summary,
.card,
.table-card,
.metric-card,
.subnav,
.filter-panel,
.kanban-card,
.kanban-column,
.benefit-row,
.payroll-stack,
.empty-state {
  border: 1px solid #e5e7eb;
  background: #ffffff;
  box-shadow: none;
  backdrop-filter: none;
}

.page-hero {
  padding: 16px;
}

.page-hero h2 {
  margin: 5px 0 6px;
}

.page-hero p {
  max-width: 680px;
  color: #4b5563;
  font-size: 0.88rem;
  font-weight: 400;
}

.page-hero-meta {
  min-width: 180px;
}

.subnav {
  gap: 4px;
  padding: 4px;
  background: #f9fafb;
}

.subnav-button {
  min-height: 30px;
  padding: 6px 10px;
  color: #4b5563;
  background: transparent;
  border-color: transparent;
}

.subnav-button:hover,
.subnav-button.active {
  color: #111111;
  background: #ffffff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.subnav-button.active {
  border-color: #e5e7eb;
}

.grid {
  gap: 14px;
}

.card,
.table-card {
  padding: 14px;
}

.metric-card {
  min-height: 108px;
  padding: 13px;
  background: #ffffff;
}

.metric-card::before,
.grid.cols-4 > .metric-card:first-child::before,
.grid.cols-3 > .metric-card:first-child::before {
  height: 0;
  background: transparent;
}

.grid.cols-4 > .metric-card:first-child,
.grid.cols-3 > .metric-card:first-child {
  border-color: #d1d5db;
  background: #ffffff;
}

.metric-card:hover {
  border-color: #d1d5db;
  box-shadow: none;
  transform: none;
}

.metric-card span {
  color: #6b7280;
  font-size: 0.76rem;
}

.metric-card strong {
  margin-top: 6px;
  color: #111111;
  font-size: 1.28rem;
  font-weight: 650;
}

.metric-icon {
  width: 26px;
  height: 26px;
  color: #4b5563;
  background: #f4f4f5;
  border: 0;
  box-shadow: none;
  font-size: 0.72rem;
}

.trend {
  color: #4b5563;
  font-size: 0.74rem;
  font-weight: 550;
}

.progress,
.bar-track {
  height: 6px;
  background: #f3f4f6;
  box-shadow: none;
}

.progress > span,
.bar-fill {
  background: #111111;
}

.tag,
.status {
  min-height: 21px;
  padding: 2px 7px;
  color: #374151;
  background: #f9fafb;
  border-color: #e5e7eb;
  font-size: 0.7rem;
  font-weight: 550;
}

.status.success {
  color: #166534;
  background: #f0fdf4;
  border-color: #dcfce7;
}

.status.warning {
  color: #92400e;
  background: #fffbeb;
  border-color: #fef3c7;
}

.status.danger {
  color: #991b1b;
  background: #fef2f2;
  border-color: #fee2e2;
}

.status.info {
  color: #1d4ed8;
  background: #eff6ff;
  border-color: #dbeafe;
}

.status.neutral {
  color: #4b5563;
  background: #f9fafb;
  border-color: #e5e7eb;
}

th,
td {
  padding: 8px 9px;
  font-size: 0.82rem;
}

th {
  color: #6b7280;
  background: #fafafa;
  font-size: 0.68rem;
  font-weight: 650;
}

td {
  background: #ffffff;
}

tbody tr:hover td {
  background: #fafafa;
}

.table-wrap {
  border-color: #e5e7eb;
}

.table-toolbar {
  margin: 6px 0 8px;
}

.table-search input,
.filter-controls input,
.filter-controls select,
.form-grid input,
.form-grid select,
.benefit-row input,
.benefit-row select,
.wide-label input,
.table-input,
.note-box,
.login-form input {
  min-height: 34px;
  color: #111111;
  background: #ffffff;
  border-color: #d1d5db;
  border-radius: 7px;
  box-shadow: none;
  font-size: 0.86rem;
}

.table-search input:focus,
.filter-controls input:focus,
.filter-controls select:focus,
.form-grid input:focus,
.form-grid select:focus,
.benefit-row input:focus,
.benefit-row select:focus,
.wide-label input:focus,
.table-input:focus,
.note-box:focus,
.login-form input:focus {
  outline: 2px solid #d1d5db;
  border-color: #111111;
}

.empty-state {
  min-height: 112px;
  padding: 14px;
  background: #ffffff;
}

.empty-state-icon {
  width: 34px;
  height: 34px;
  flex-basis: 34px;
  color: #4b5563;
  background: #f4f4f5;
}

.rank-number {
  width: 26px;
  height: 26px;
  background: #111111;
  font-size: 0.76rem;
}

.modal-backdrop {
  background: rgba(17, 17, 17, 0.28);
  backdrop-filter: blur(8px);
}

.modal-card,
.confirmation-card,
.login-card {
  background: #ffffff;
  border-color: #e5e7eb;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.12);
}

.login-screen {
  background: #ffffff;
}

.login-brand {
  color: #111111;
  background: #ffffff;
  border-color: #e5e7eb;
  justify-content: center;
}

.feedback-toast {
  background: #ffffff;
  border-color: #e5e7eb;
  box-shadow: 0 14px 44px rgba(0, 0, 0, 0.12);
}

.feedback-icon {
  color: #ffffff;
  background: #111111;
}

@media (max-width: 760px) {
  .workspace {
    padding: 14px;
  }

  .topbar {
    margin: -14px -14px 14px;
    padding: 12px 14px;
  }

  .sidebar {
    background: #ffffff;
  }
}

/* Scrollable fixed left menu */
.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  max-height: 100vh;
  overflow: hidden;
}

.nav-list {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 4px;
  scrollbar-width: thin;
  scrollbar-color: #d1d5db transparent;
}

.nav-list::-webkit-scrollbar {
  width: 8px;
}

.nav-list::-webkit-scrollbar-track {
  background: transparent;
}

.nav-list::-webkit-scrollbar-thumb {
  background: #d1d5db;
  border: 2px solid #ffffff;
  border-radius: 999px;
}

.nav-list::-webkit-scrollbar-thumb:hover {
  background: #9ca3af;
}

.sidebar-panel {
  flex: 0 0 auto;
}

.topbar {
  justify-content: flex-start;
}

.topbar-mark {
  width: 26px;
  height: 26px;
  flex: 0 0 26px;
  object-fit: contain;
  object-position: center;
}

.topbar-actions {
  margin-left: auto;
}

@media (max-width: 760px) {
  .sidebar {
    position: fixed;
    height: 100vh;
    max-height: 100vh;
  }

  .topbar-mark {
    width: 22px;
    height: 22px;
    flex-basis: 22px;
  }
}

/* Color only operational indicators and charts */
:root {
  --success: #16a34a;
  --success-soft: #ecfdf3;
  --warning-soft: #fffbeb;
  --danger-soft: #fef2f2;
  --info-soft: #eff6ff;
  --chart-green: #10b981;
  --chart-blue: #3b82f6;
  --chart-amber: #f59e0b;
  --chart-red: #ef4444;
}

.metric-icon {
  color: var(--chart-green);
  background: var(--success-soft);
}

.metric-card:nth-child(2) .metric-icon {
  color: var(--chart-blue);
  background: var(--info-soft);
}

.metric-card:nth-child(3) .metric-icon {
  color: var(--chart-amber);
  background: var(--warning-soft);
}

.metric-card:nth-child(4) .metric-icon {
  color: var(--chart-red);
  background: var(--danger-soft);
}

.metric-card::before,
.grid.cols-4 > .metric-card:first-child::before,
.grid.cols-3 > .metric-card:first-child::before {
  height: 3px;
  background: var(--chart-green);
}

.metric-card:nth-child(2)::before {
  background: var(--chart-blue);
}

.metric-card:nth-child(3)::before {
  background: var(--chart-amber);
}

.metric-card:nth-child(4)::before {
  background: var(--chart-red);
}

.progress,
.bar-track {
  background: #eef2f7;
}

.progress > span,
.bar-fill {
  background: linear-gradient(90deg, var(--chart-blue), var(--chart-green));
}

.bar-row:nth-child(2) .bar-fill,
.payroll-row:nth-child(2) .bar-fill {
  background: linear-gradient(90deg, #60a5fa, var(--chart-blue));
}

.bar-row:nth-child(3) .bar-fill,
.payroll-row:nth-child(3) .bar-fill {
  background: linear-gradient(90deg, #fbbf24, var(--chart-amber));
}

.bar-row:nth-child(4) .bar-fill,
.payroll-row:nth-child(4) .bar-fill {
  background: linear-gradient(90deg, #fb7185, var(--chart-red));
}

.donut {
  background:
    conic-gradient(var(--chart-green) var(--value, 76%), #eef2f7 0);
}

.status.success,
.tag.success {
  color: #166534;
  background: var(--success-soft);
  border-color: #bbf7d0;
}

.status.warning,
.tag.warning {
  color: #92400e;
  background: var(--warning-soft);
  border-color: #fde68a;
}

.status.danger,
.tag.danger {
  color: #991b1b;
  background: var(--danger-soft);
  border-color: #fecaca;
}

.status.info,
.tag.info {
  color: #1d4ed8;
  background: var(--info-soft);
  border-color: #bfdbfe;
}

.status.neutral,
.tag.neutral {
  color: #4b5563;
  background: #f9fafb;
  border-color: #e5e7eb;
}

.status::before {
  opacity: 1;
}

.trend:not(.down) {
  color: var(--success);
}

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

.rank-number {
  background: linear-gradient(135deg, var(--chart-blue), var(--chart-green));
}

.supplier-rank {
  color: #ffffff;
  background: linear-gradient(135deg, var(--chart-amber), var(--chart-green));
}

.empty-state-icon {
  color: var(--chart-blue);
  background: var(--info-soft);
}

.feedback-icon {
  background: var(--success-soft);
  color: var(--success);
}
