:root {
  --bg: #eef3f6;
  --panel: #ffffff;
  --ink: #071722;
  --muted: #4f6274;
  --line: #d8e1e8;
  --teal: #08716f;
  --teal-dark: #075457;
  --blue: #2367a9;
  --green: #2f8f5b;
  --amber: #b7791f;
  --red: #bf4342;
  --brand-blue: #2367a9;
  --brand-green: #2f8f5b;
  --brand-cyan: #08716f;
  --mustard: #b7791f;
  --danger: #bf4342;
  --violet: #6f5fa8;
  --shadow: 0 10px 28px rgba(16, 33, 43, .08);
}

body[data-theme="dark"] {
  --bg: #111820;
  --panel: #17232d;
  --ink: #eef6fb;
  --muted: #a9bac7;
  --line: #2b3b48;
  --teal: #23aaa4;
  --teal-dark: #137b78;
  --blue: #5da2e6;
  --green: #73c68f;
  --amber: #d7a23a;
  --red: #ea6f6b;
  --brand-blue: #5da2e6;
  --brand-green: #73c68f;
  --brand-cyan: #23aaa4;
  --mustard: #d7a23a;
  --danger: #ea6f6b;
  --violet: #a996f2;
  --shadow: 0 12px 30px rgba(0, 0, 0, .28);
}

* {
  box-sizing: border-box;
}

body {
  background:
    linear-gradient(180deg, #f6fafb 0, var(--bg) 260px);
  color: var(--ink);
  font-family: "Segoe UI", Arial, sans-serif;
  font-weight: 500;
  text-rendering: geometricPrecision;
  margin: 0;
}

body[data-theme="dark"] {
  background:
    linear-gradient(180deg, #0a1016 0, var(--bg) 280px);
}

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

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

.side-nav {
  background: #fbfcfd;
  border-right: 1px solid var(--line);
  height: 100vh;
  overflow: auto;
  padding: 20px 14px;
  position: sticky;
  top: 0;
}

body[data-theme="dark"] .side-nav {
  background: #101922;
}

.brand {
  align-items: center;
  display: flex;
  gap: 10px;
  margin-bottom: 24px;
}

.brand-mark {
  align-items: center;
  background: var(--teal);
  border-radius: 8px;
  color: #fff;
  display: flex;
  font-size: 22px;
  font-weight: 800;
  height: 42px;
  justify-content: center;
  width: 42px;
}

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

.brand span {
  color: var(--muted);
  font-size: 12px;
}

.nav-section {
  color: #8995a3;
  font-size: 11px;
  font-weight: 700;
  margin: 18px 10px 8px;
  text-transform: uppercase;
}

.nav-button {
  align-items: center;
  background: transparent;
  border: 0;
  border-radius: 7px;
  color: #243544;
  cursor: pointer;
  display: grid;
  gap: 9px;
  grid-template-columns: 22px minmax(0, 1fr);
  margin: 2px 0;
  padding: 10px;
  text-align: left;
  width: 100%;
}

body[data-theme="dark"] .nav-button {
  color: var(--ink);
}

.nav-button:hover {
  background: #edf4f6;
}

body[data-theme="dark"] .nav-button:hover {
  background: #1d2b36;
}

.nav-button.active {
  background: var(--teal);
  color: #fff;
  font-weight: 700;
}

.nav-icon {
  align-items: center;
  background: rgba(8, 113, 111, .08);
  border-radius: 6px;
  display: flex;
  font-size: 11px;
  font-weight: 800;
  height: 22px;
  justify-content: center;
  text-align: center;
}

.nav-icon::after {
  content: "";
  background: currentColor;
  border-radius: 999px;
  height: 7px;
  width: 7px;
}

.nav-button.active .nav-icon {
  background: rgba(255, 255, 255, .18);
}

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

.company-header {
  align-items: center;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  display: flex;
  gap: 14px;
  justify-content: space-between;
  margin-bottom: 14px;
  padding: 12px 16px;
}

body[data-theme="dark"] .company-header {
  background: var(--panel);
}

.watmov-logo {
  align-items: center;
  display: flex;
  gap: 10px;
}

.logo-w {
  align-items: center;
  background: linear-gradient(135deg, #075457, #12908d);
  border-radius: 8px;
  color: #fff;
  display: flex;
  font-size: 24px;
  font-weight: 900;
  height: 44px;
  justify-content: center;
  letter-spacing: 0;
  width: 44px;
}

.logo-text {
  color: #06202b;
  font-size: 25px;
  font-weight: 900;
  letter-spacing: .5px;
}

body[data-theme="dark"] .logo-text {
  color: var(--ink);
}

.company-subtitle {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

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

.eyebrow {
  color: var(--muted);
  font-size: 13px;
  margin: 0 0 4px;
}

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

h1 {
  color: #061722;
  font-size: 31px;
  font-weight: 850;
  letter-spacing: 0;
  margin-bottom: 0;
}

body[data-theme="dark"] h1,
body[data-theme="dark"] .panel h2,
body[data-theme="dark"] .setup-card h2 {
  color: var(--ink);
}

.subhead {
  font-size: 15px;
  margin: 16px 0 8px;
}

.user-chip {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  min-width: 210px;
  padding: 9px 12px;
  text-align: right;
}

.user-chip span,
.user-chip strong {
  display: block;
}

.user-chip span {
  color: var(--muted);
  font-size: 12px;
}

.role-preview-control {
  display: grid;
  gap: 4px;
  margin-top: 8px;
  text-align: left;
}

.role-preview-control span {
  font-size: 11px;
  text-transform: uppercase;
}

.role-preview-control select {
  min-width: 170px;
  padding: 7px 9px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--panel);
  color: var(--ink);
  font-weight: 800;
}

.role-preview-control + .role-preview-control {
  margin-top: 8px;
}

.panel,
.metric,
.table-panel,
.role-strip,
.setup-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

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

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

.compact-metrics .metric {
  min-height: 92px;
}

.metric {
  border: 1px solid var(--line);
  border-left: 4px solid var(--teal);
  cursor: default;
  padding: 14px;
  text-align: left;
}

.clickable-metrics .metric {
  cursor: pointer;
}

.metric.selected,
.metric:hover {
  outline: 1px solid rgba(8, 113, 111, .25);
}

.metric-blue { border-left-color: var(--blue); }
.metric-green { border-left-color: var(--green); }
.metric-amber { border-left-color: var(--amber); }
.metric-red { border-left-color: var(--red); }
.metric-teal { border-left-color: var(--teal); }

.metric span {
  color: var(--muted);
  display: block;
  font-size: 12px;
}

.metric strong {
  display: block;
  font-size: 28px;
  font-weight: 850;
  margin-top: 6px;
}

.metric small {
  color: var(--muted);
}

.dashboard-grid {
  grid-template-columns: 1fr 1fr;
  margin-top: 14px;
}

.dashboard-grid-balanced {
  grid-template-columns: .95fr 1.05fr;
}

.project-insight-grid {
  grid-template-columns: minmax(0, 1.25fr) minmax(360px, .75fr);
}

.panel,
.setup-card {
  padding: 16px;
}

.nested-panel,
.plain-table {
  box-shadow: none;
}

.panel-head,
.screen-toolbar,
.approval-command {
  align-items: start;
  display: flex;
  gap: 16px;
  justify-content: space-between;
  margin-bottom: 12px;
}

.screen-toolbar {
  align-items: end;
}

.panel h2,
.setup-card h2 {
  color: #071722;
  font-size: 18px;
  font-weight: 850;
  margin-bottom: 4px;
}

.muted,
.save-note {
  color: var(--muted);
  font-size: 13px;
}

.compact-field {
  max-width: 240px;
}

.connection-chip {
  align-self: end;
  background: #e9f2fb;
  border: 1px solid #c7dceb;
  border-radius: 999px;
  color: var(--blue);
  font-size: 12px;
  font-weight: 800;
  padding: 9px 12px;
}

.connection-chip.good {
  color: #146c43;
  background: #e6f6ed;
  border-color: #badbcc;
}

.connection-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.theme-toggle-button {
  align-self: end;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  cursor: pointer;
  font-size: 12px;
  font-weight: 850;
  min-height: 38px;
  padding: 9px 14px;
}

body[data-theme="dark"] .theme-toggle-button {
  background: var(--teal);
  color: #fff;
}

.history-link {
  margin-top: 14px;
}

.toast-note {
  margin-top: 14px;
  border: 1px solid #c7dceb;
  border-left: 4px solid var(--teal);
  border-radius: 8px;
  background: #f5fbff;
  color: var(--ink);
  font-weight: 800;
  padding: 12px 14px;
}

.signin-shell {
  align-items: center;
  display: flex;
  justify-content: center;
  min-height: calc(100vh - 215px);
  padding: 34px 12px;
}

.signin-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  max-width: 560px;
  padding: 28px;
  width: min(560px, 100%);
}

.signin-brand {
  align-items: center;
  display: flex;
  gap: 14px;
}

.signin-mark {
  align-items: center;
  background: linear-gradient(135deg, #075457, #12908d);
  border-radius: 10px;
  color: #fff;
  display: flex;
  font-size: 34px;
  font-weight: 900;
  height: 64px;
  justify-content: center;
  width: 64px;
}

.signin-brand h2 {
  color: var(--ink);
  font-size: 27px;
  margin-bottom: 6px;
}

.signin-brand p,
.signin-copy,
.signin-note {
  color: var(--muted);
  line-height: 1.45;
  margin-bottom: 0;
}

.signin-divider {
  border-top: 1px solid var(--line);
  margin: 22px 0;
}

.signin-card h3 {
  color: var(--ink);
  font-size: 22px;
  margin-bottom: 8px;
}

.signin-button {
  margin: 20px 0 12px;
  min-height: 44px;
  width: 100%;
}

.signin-note {
  font-size: 13px;
  margin-bottom: 16px;
}

.chart-row {
  align-items: center;
  display: grid;
  gap: 16px;
  grid-template-columns: 190px minmax(0, 1fr);
}

.compact-chart-row {
  grid-template-columns: 170px minmax(220px, 1fr);
  min-height: 220px;
}

.pie {
  aspect-ratio: 1;
  background: conic-gradient(var(--teal) 0 58%, var(--blue) 58% 78%, var(--green) 78% 91%, var(--amber) 91% 100%);
  border-radius: 50%;
  position: relative;
}

.pie::after {
  background: var(--panel);
  border-radius: 50%;
  content: "";
  inset: 34px;
  position: absolute;
}

.task-pie {
  background: conic-gradient(var(--teal) 0 32%, var(--blue) 32% 56%, var(--green) 56% 73%, var(--amber) 73% 85%, var(--red) 85% 94%, var(--muted) 94% 100%);
}

.admin-pie {
  background: conic-gradient(var(--green) 0 62%, var(--amber) 62% 82%, var(--blue) 82% 94%, var(--red) 94% 100%);
}

.legend,
.bars,
.status-list,
.quick-list,
.tree-list {
  display: grid;
  gap: 9px;
}

.legend-item {
  align-items: center;
  display: grid;
  gap: 8px;
  grid-template-columns: 12px minmax(0, 1fr) auto;
}

.swatch {
  border-radius: 3px;
  height: 12px;
  width: 12px;
}

.bar-row {
  align-items: center;
  color: #102433;
  display: grid;
  font-size: 13px;
  font-weight: 650;
  gap: 8px;
  grid-template-columns: minmax(230px, .9fr) minmax(180px, 1.1fr) 72px;
}

.bar-row span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

.bar-fill {
  background: linear-gradient(90deg, var(--teal), var(--blue));
  height: 100%;
}

.chart-card {
  background: #f6f9fb;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
}

.chart-meta {
  align-items: center;
  display: flex;
  justify-content: space-between;
  margin-bottom: 12px;
}

.chart-meta span,
.chart-meta strong {
  color: var(--muted);
  font-size: 12px;
}

.chart-meta strong {
  color: var(--teal);
}

.column-chart {
  align-items: end;
  display: grid;
  gap: 14px;
  grid-auto-columns: minmax(44px, 1fr);
  grid-auto-flow: column;
  min-height: 210px;
}

.column-item {
  align-items: center;
  display: grid;
  gap: 8px;
  grid-template-rows: auto 150px auto;
  justify-items: center;
  min-width: 44px;
}

.column-track {
  align-items: end;
  background: #e8eef2;
  border: 1px solid var(--line);
  border-radius: 999px;
  display: flex;
  height: 150px;
  justify-content: center;
  overflow: hidden;
  padding: 4px;
  width: 34px;
}

.column-fill {
  background: linear-gradient(180deg, var(--green), var(--blue));
  border-radius: 999px;
  width: 100%;
}

.column-item strong,
.column-item span {
  font-size: 11px;
}

.column-item span {
  color: var(--muted);
  font-weight: 750;
}

.focus-panel {
  align-items: center;
  display: grid;
  gap: 22px;
  grid-template-columns: 176px minmax(0, 1fr);
  min-height: 220px;
}

.focus-ring {
  --value: 0;
  align-items: center;
  aspect-ratio: 1;
  background:
    radial-gradient(circle at center, var(--panel) 0 57%, transparent 58%),
    conic-gradient(var(--brand-green) calc(var(--value) * 1%), #e7edf1 0);
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  text-align: center;
}

.leave-ring {
  background:
    radial-gradient(circle at center, var(--panel) 0 57%, transparent 58%),
    conic-gradient(var(--mustard) calc(var(--value) * 1%), #e7edf1 0);
}

.leave-bars .bar-row {
  grid-template-columns: 88px minmax(0, 1fr) 72px;
}

.compact-ring {
  transform: scale(.88);
  transform-origin: center;
}

.soft-empty {
  color: var(--muted);
  font-weight: 750;
  padding: 12px;
}

.focus-ring strong {
  font-size: 30px;
}

.focus-ring span {
  color: var(--muted);
  font-size: 12px;
  max-width: 92px;
}

.focus-copy h3 {
  font-size: 17px;
  line-height: 1.25;
  margin-bottom: 6px;
}

.burn-strip {
  background: #f6f9fb;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: flex;
  gap: 3px;
  margin-bottom: 12px;
  overflow: hidden;
  padding: 4px;
}

.burn-strip div {
  background: linear-gradient(90deg, var(--teal), var(--blue));
  border-radius: 6px;
  color: #fff;
  min-height: 44px;
  padding: 7px;
}

.burn-strip span,
.burn-strip strong {
  display: block;
  font-size: 11px;
}

.job-pipeline {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 4px 0 14px;
}

.job-step {
  background: #f7fafc;
  border: 1px solid var(--line);
  border-left: 4px solid var(--blue);
  border-radius: 8px;
  display: grid;
  gap: 2px;
  padding: 12px;
}

.job-step strong {
  color: #071722;
  font-size: 24px;
}

.job-step span {
  font-size: 13px;
  font-weight: 850;
}

.job-step em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.job-step.processing {
  border-left-color: var(--mustard);
}

.job-step.ready {
  border-left-color: var(--green);
}

.job-step.failed {
  border-left-color: #d14d4d;
}

.burn-week-list {
  display: grid;
  gap: 8px;
  max-height: 260px;
  overflow: auto;
  padding-right: 4px;
}

.burn-week-row {
  align-items: center;
  display: grid;
  gap: 8px;
  grid-template-columns: 52px minmax(120px, 1fr) 44px 74px;
  font-size: 12px;
  font-weight: 800;
}

.project-burn-panel,
.task-hours-panel {
  align-self: start;
}

.task-hours-panel .compact-task-bars {
  max-height: 300px;
  overflow: auto;
  padding-right: 4px;
}

.resource-share-list {
  max-height: 520px;
  overflow: auto;
  padding-right: 4px;
}

.burn-week-row span {
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.burn-track {
  background: #e1e9ef;
  border-radius: 999px;
  height: 12px;
  overflow: hidden;
}

.burn-fill {
  background: linear-gradient(90deg, var(--teal), var(--blue));
  height: 100%;
}

.burn-week-row em {
  color: var(--muted);
  font-style: normal;
  text-align: right;
}

.status-row,
.quick-person,
.tree-node {
  align-items: center;
  border-bottom: 1px solid #edf1f4;
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(0, 1fr) auto;
  padding-bottom: 9px;
}

.quick-person {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  grid-template-columns: minmax(0, 1fr) auto;
  padding: 10px;
  text-align: left;
}

.empty-state {
  align-items: center;
  color: var(--muted);
  display: flex;
  font-size: 14px;
  min-height: 72px;
  padding: 14px;
}

.app-credit {
  align-items: center;
  color: var(--muted);
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  font-size: 11px;
  margin-top: 18px;
  padding: 8px 2px 0;
  text-align: right;
}

.mini-logo {
  color: var(--teal);
  font-weight: 900;
  letter-spacing: .5px;
}

.modal-backdrop {
  align-items: center;
  background: rgba(7, 23, 34, .5);
  display: flex;
  inset: 0;
  justify-content: center;
  padding: 24px;
  position: fixed;
  z-index: 20;
}

.modal-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, .22);
  max-height: 86vh;
  overflow: auto;
  padding: 18px;
  width: min(900px, 96vw);
}

.quick-person span,
.quick-person em {
  color: var(--muted);
  display: block;
  font-size: 12px;
  font-style: normal;
}

.tree-node {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  grid-template-columns: 12px minmax(0, 1fr) 110px auto;
  padding: 9px;
}

.tree-node > span:first-child {
  background: var(--green);
  border-radius: 50%;
  height: 8px;
  width: 8px;
}

.depth-2 { margin-left: 28px; }
.depth-3 { margin-left: 56px; }

.pill {
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  padding: 5px 8px;
  white-space: nowrap;
}

.pill.good { background: #e8f6ee; color: var(--green); }
.pill.warn { background: #fff4df; color: var(--amber); }
.pill.bad { background: #fdecec; color: var(--red); }
.pill.info { background: #e9f2fb; color: var(--blue); }

.status-stack {
  align-items: end;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.validation,
.export-note {
  border-radius: 7px;
  font-size: 13px;
  margin-bottom: 12px;
  padding: 10px 12px;
}

.warn-note {
  background: #fff4df;
  border: 1px solid #f0cd86;
  color: #734b10;
}

.good-note {
  background: #e8f6ee;
  border: 1px solid #b9dec8;
  color: #1f643e;
}

.save-note {
  margin: -2px 0 10px;
}

.timesheet-tools,
.report-tools,
.project-filter,
.export-grid,
.setup-grid {
  display: grid;
  gap: 12px;
}

.timesheet-tools {
  align-items: end;
  grid-template-columns: repeat(4, minmax(0, 1fr)) auto;
  margin-bottom: 12px;
}

.report-tools-wide {
  grid-template-columns: repeat(5, minmax(170px, 1fr));
  margin-top: 14px;
}

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

.project-filter {
  align-items: end;
  grid-template-columns: minmax(280px, 2fr) 260px minmax(0, 1fr) auto auto;
  margin-bottom: 14px;
}

.ptl-card {
  background: #f7fafb;
  border: 1px solid var(--line);
  border-radius: 8px;
  min-height: 58px;
  padding: 10px 12px;
}

.ptl-card span {
  color: var(--muted);
  display: block;
  font-size: 12px;
  margin-bottom: 5px;
}

.ptl-card strong {
  color: var(--ink);
  display: block;
  font-size: 15px;
}

.field label {
  color: var(--muted);
  display: block;
  font-size: 12px;
  margin-bottom: 5px;
}

.field input,
.field select,
td input,
td select,
td textarea {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: #102433;
  outline: none;
}

.field input,
.field select {
  height: 38px;
  padding: 0 10px;
  width: 100%;
}

.search-combo {
  width: 100%;
}

.search-combo-wrap {
  position: relative;
  width: 100%;
}

.combo-menu {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  z-index: 40;
  max-height: 260px;
  overflow: auto;
  padding: 5px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 14px 30px rgba(15, 35, 45, .18);
}

.combo-option {
  display: block;
  width: 100%;
  padding: 8px 9px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.25;
  text-align: left;
  white-space: normal;
}

.combo-option:hover,
.combo-option:focus {
  background: rgba(7, 127, 124, .10);
  outline: none;
}

.combo-option mark {
  background: rgba(246, 185, 59, .35);
  color: inherit;
  padding: 0 1px;
}

.combo-empty {
  padding: 9px;
  color: var(--muted);
  font-size: 13px;
}

.project-search-field input {
  font-weight: 700;
}

.timesheet-table .search-combo {
  min-height: 32px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.primary,
.secondary,
.danger,
.text-button,
.export-card,
.quick-person {
  border: 0;
  border-radius: 7px;
  cursor: pointer;
  font-weight: 700;
}

.primary {
  background: var(--teal);
  color: #fff;
  min-height: 38px;
  padding: 9px 12px;
}

.secondary {
  background: #e8eef2;
  color: #263846;
  min-height: 38px;
  padding: 9px 12px;
}

.danger {
  background: #fdecec;
  color: var(--red);
  min-height: 38px;
  padding: 9px 12px;
}

.text-button {
  background: transparent;
  color: var(--teal);
  min-height: 0;
  padding: 0;
}

.table-panel {
  overflow: auto;
}

.legacy-preview,
.summary-panel {
  margin-top: 14px;
}

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

th {
  background: var(--teal);
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  text-align: left;
}

th,
td {
  border-bottom: 1px solid var(--line);
  padding: 8px;
  vertical-align: middle;
}

td {
  color: #102433;
  font-size: 12px;
  font-weight: 550;
}

td input,
td select,
td textarea {
  font-size: 12px;
  padding: 5px 6px;
  width: 100%;
}

td textarea {
  min-height: 34px;
  resize: vertical;
}

.timesheet-panel table {
  min-width: 1080px;
}

.timesheet-table th:nth-child(n+4):nth-child(-n+10),
.timesheet-table td:nth-child(n+4):nth-child(-n+10) {
  width: 56px;
}

.timesheet-table .project-col {
  width: 285px;
}

.timesheet-table .task-col {
  width: 265px;
}

.timesheet-table .comment-col {
  width: 280px;
}

.timesheet-table th:nth-child(3),
.timesheet-table td:nth-child(3) {
  width: 86px;
  max-width: 86px;
}

.timesheet-table th,
.timesheet-table td {
  font-size: 13px;
}

.timesheet-table td {
  font-weight: 650;
}

.timesheet-table td input,
.timesheet-table td select,
.timesheet-table td textarea {
  font-size: 13px;
  font-weight: 650;
}

.timesheet-table .pill {
  font-size: 11px;
  padding: 4px 7px;
}

.hours-input {
  text-align: right;
}

.day-total-row td {
  background: #f6f9fb;
  font-weight: 900;
}

.day-low {
  color: var(--red);
}

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

.table-footer > div,
.approval-actions {
  display: flex;
  gap: 8px;
}

.total-chip {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
}

.total-chip strong {
  color: var(--teal);
}

.approval-command {
  background: #f6f9fb;
  border: 1px solid var(--line);
  border-radius: 8px;
  gap: 14px;
  justify-content: flex-start;
  padding: 10px;
}

.approval-command span {
  align-self: center;
  color: var(--muted);
  font-size: 13px;
}

.approval-big {
  min-width: 160px;
}

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

.export-card {
  background: #fff;
  border: 1px solid var(--line);
  padding: 14px;
  text-align: left;
}

.export-card.active {
  border-color: var(--teal);
  box-shadow: inset 0 0 0 1px rgba(8, 113, 111, .12);
}

.export-card strong,
.export-card span {
  display: block;
}

.export-card span {
  color: var(--muted);
  font-size: 12px;
  margin-top: 4px;
}

.export-note {
  background: #e9f2fb;
  border: 1px solid #c7dceb;
  margin-top: 14px;
}

.setup-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 14px;
}

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

.setup-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.setup-tab {
  background: #edf4f7;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: #263846;
  cursor: pointer;
  font-weight: 800;
  min-height: 36px;
  padding: 8px 12px;
}

.setup-tab.active {
  background: var(--teal);
  border-color: var(--teal);
  color: #fff;
}

.setup-metrics {
  margin-bottom: 14px;
}

.setup-workbench {
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, .85fr);
  margin-bottom: 14px;
}

.selected-project-access {
  border-top: 1px solid var(--line);
  margin-top: 14px;
  padding-top: 14px;
}

.guest-invite-box {
  border-top: 1px solid var(--line);
  display: grid;
  gap: 10px;
  margin-top: 16px;
  padding-top: 14px;
}

.guest-invite-box strong {
  color: var(--ink);
  display: block;
  margin-bottom: 4px;
}

.compact-status {
  gap: 6px;
}

.selected-project-access .panel-head {
  margin-bottom: 10px;
}

.selected-project-access h3 {
  font-size: 15px;
  margin: 0;
}

.project-access-rows {
  display: grid;
  gap: 8px;
}

.project-access-row {
  align-items: center;
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(220px, 1fr) 160px 150px;
}

.project-access-row select,
.project-access-row input {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: #102433;
  height: 36px;
  padding: 0 10px;
}

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

.admin-form-grid.single {
  grid-template-columns: 1fr;
}

.admin-form-grid .wide {
  grid-column: span 2;
}

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

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

.admin-home-grid {
  grid-template-columns: minmax(280px, .9fr) minmax(280px, .9fr) minmax(320px, 1.2fr);
  margin-bottom: 14px;
}

.admin-action-card {
  cursor: pointer;
}

.admin-action-card.selected {
  border-color: var(--teal);
  box-shadow: inset 0 0 0 1px rgba(8, 113, 111, .15);
}

.admin-card-head {
  align-items: start;
  display: flex;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 12px;
}

.admin-card-head span,
.admin-card-head strong,
.admin-card-head em {
  display: block;
}

.admin-card-head span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.admin-card-head strong {
  color: var(--ink);
  font-size: 34px;
  line-height: 1;
  margin: 8px 0;
}

.admin-card-head em,
.admin-quote-card span {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.compact-name-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.compact-name-list span {
  background: #eef5f7;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink);
  font-size: 12px;
  font-weight: 750;
  padding: 5px 8px;
}

.admin-quote-card p {
  color: var(--muted);
  font-size: 16px;
  line-height: 1.45;
  max-width: 680px;
}

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

.filter-actions {
  align-items: end;
  display: flex;
  gap: 8px;
}

.admin-quick-list .quick-person {
  min-height: 62px;
  padding: 9px 10px;
}

.admin-compact-list {
  display: grid;
  gap: 6px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  max-height: 390px;
  overflow: auto;
  padding-right: 4px;
}

.admin-compact-person {
  align-items: center;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--ink);
  cursor: pointer;
  display: grid;
  gap: 6px;
  grid-template-columns: minmax(0, 1fr) auto;
  min-height: 46px;
  padding: 7px 9px;
  text-align: left;
}

.admin-compact-person strong {
  font-size: 12px;
  line-height: 1.15;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-compact-person span,
.admin-compact-person small {
  color: var(--muted);
  font-size: 11px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-compact-person .pill {
  font-size: 10px;
  justify-self: end;
  padding: 3px 7px;
}

.table-sort-button {
  background: transparent;
  border: 0;
  color: #fff;
  cursor: pointer;
  font: inherit;
  font-weight: 900;
  padding: 0;
  text-align: left;
}

.report-preview {
  border-top: 1px solid var(--line);
  margin-top: 14px;
  padding-top: 14px;
}

.report-preview-table {
  max-height: 320px;
  overflow: auto;
}

.report-preview-table table {
  min-width: 1040px;
}

.setup-card p {
  color: var(--muted);
  min-height: 50px;
}

.setup-card div {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

body[data-theme="dark"] h1,
body[data-theme="dark"] .panel h2,
body[data-theme="dark"] .setup-card h2,
body[data-theme="dark"] .metric,
body[data-theme="dark"] .metric strong,
body[data-theme="dark"] .bar-row,
body[data-theme="dark"] td {
  color: var(--ink);
}

body[data-theme="dark"] .chart-card,
body[data-theme="dark"] .burn-strip,
body[data-theme="dark"] .job-step,
body[data-theme="dark"] .ptl-card,
body[data-theme="dark"] .day-total-row td,
body[data-theme="dark"] .approval-command,
body[data-theme="dark"] .export-note,
body[data-theme="dark"] .toast-note {
  background: #121d27;
}

body[data-theme="dark"] .quick-person,
body[data-theme="dark"] .admin-compact-person,
body[data-theme="dark"] .tree-node,
body[data-theme="dark"] .export-card,
body[data-theme="dark"] .compact-name-list span,
body[data-theme="dark"] .total-chip,
body[data-theme="dark"] .field input,
body[data-theme="dark"] .field select,
body[data-theme="dark"] .combo-menu,
body[data-theme="dark"] .project-access-row select,
body[data-theme="dark"] .project-access-row input,
body[data-theme="dark"] td input,
body[data-theme="dark"] td select,
body[data-theme="dark"] td textarea {
  background: #101922;
  color: var(--ink);
}

body[data-theme="dark"] .combo-option:hover,
body[data-theme="dark"] .combo-option:focus {
  background: rgba(43, 188, 183, .14);
}

body[data-theme="dark"] .bar-track,
body[data-theme="dark"] .burn-track,
body[data-theme="dark"] .column-track {
  background: #253541;
}

body[data-theme="dark"] .secondary,
body[data-theme="dark"] .setup-tab {
  background: #253541;
  color: var(--ink);
}

body[data-theme="dark"] .connection-chip {
  background: #102b3e;
  border-color: #244d68;
}

body[data-theme="dark"] .connection-chip.good,
body[data-theme="dark"] .good-note,
body[data-theme="dark"] .pill.good {
  background: #123124;
  color: #8ce0aa;
}

body[data-theme="dark"] .warn-note,
body[data-theme="dark"] .pill.warn {
  background: #3a2a10;
  color: #f1c56a;
}

body[data-theme="dark"] .danger,
body[data-theme="dark"] .pill.bad {
  background: #3a181b;
  color: #ff9a9a;
}

body[data-theme="dark"] .pill.info {
  background: #102b3e;
  color: #91c9ff;
}

body[data-theme="dark"] .job-step strong {
  color: var(--ink);
}

@media (max-width: 1100px) {
  .metrics,
  .dashboard-grid,
  .project-insight-grid,
  .admin-home-grid,
  .report-tools-wide,
  .admin-filter-tools,
  .setup-workbench,
  .setup-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

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

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

  .side-nav {
    border-bottom: 1px solid var(--line);
    border-right: 0;
    height: auto;
    position: static;
  }

  #nav {
    display: flex;
    gap: 8px;
    overflow-x: auto;
  }

  .nav-section {
    display: none;
  }

  .nav-button {
    min-width: 150px;
  }

  .metrics,
  .dashboard-grid,
  .project-insight-grid,
  .admin-home-grid,
  .timesheet-tools,
  .report-tools,
  .report-tools-wide,
  .admin-filter-tools,
  .resource-grid,
  .project-filter,
  .export-grid,
  .setup-workbench,
  .setup-grid {
    grid-template-columns: 1fr;
  }

  .job-pipeline {
    grid-template-columns: 1fr;
  }

  .setup-hero {
    align-items: stretch;
    flex-direction: column;
  }

  .setup-tabs {
    justify-content: flex-start;
  }

  .admin-form-grid,
  .quick-list.dense,
  .admin-compact-list {
    grid-template-columns: 1fr;
  }

  .admin-form-grid .wide {
    grid-column: auto;
  }

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

  .topbar,
  .role-strip,
  .panel-head,
  .company-header,
  .screen-toolbar,
  .table-footer {
    align-items: stretch;
    flex-direction: column;
  }
}
