:root {
  --ink: #233c34;
  --dark: #163c32;
  --green: #216c54;
  --green-dark: #174f3e;
  --mint: #e8f2e9;
  --paper: #f6f7f3;
  --white: #fff;
  --line: #e1e6df;
  --muted: #697770;
  --orange: #b5662c;
  --orange-bg: #fff3e7;
  --red: #a73535;
  --red-bg: #fcefee;
  --blue: #3a668a;
  --blue-bg: #eef4fa;
  --shadow: 0 8px 32px #183f2c08;
  --radius: 14px;
  font-family:
    Inter,
    ui-sans-serif,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  font-size: 14px;
  color: var(--ink);
  background: var(--paper);
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
a {
  color: var(--green);
  text-decoration: none;
}
button,
input,
select,
textarea {
  font: inherit;
}
button {
  cursor: pointer;
}
button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible {
  outline: 3px solid #83b9a1;
  outline-offset: 3px;
}
h1,
h2,
h3,
h4,
p {
  margin-top: 0;
}
h1 {
  font-size: 32px;
  letter-spacing: -1.2px;
  line-height: 1.2;
  margin-bottom: 12px;
  font-weight: 650;
}
h2 {
  font-size: 21px;
  letter-spacing: -0.5px;
  font-weight: 650;
}
h3 {
  font-size: 16px;
  font-weight: 650;
  letter-spacing: -0.2px;
}
p {
  line-height: 1.65;
}
.muted {
  color: var(--muted);
}
.small {
  font-size: 12px;
}
.hidden,
[hidden] {
  display: none !important;
}
.full {
  width: 100%;
}
.eyebrow {
  font-size: 11px;
  font-weight: 750;
  letter-spacing: 1.7px;
  color: var(--green);
  margin-bottom: 14px;
}
.wordmark {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.5px;
  color: var(--ink);
  white-space: nowrap;
}
.brand-mark {
  background: var(--dark);
  color: white;
  display: grid;
  place-content: center;
  flex-shrink: 0;
  width: 39px;
  height: 39px;
  border-radius: 12px;
  font-size: 22px;
  letter-spacing: -2px;
  padding-right: 2px;
}
.brand-sub {
  display: block;
  font-size: 7px;
  letter-spacing: 1.7px;
  margin-top: 4px;
  font-weight: 650;
  color: var(--muted);
}
.button {
  border: 1px solid var(--line);
  background: white;
  border-radius: 8px;
  padding: 11px 15px;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 9px;
  font-size: 13px;
  font-weight: 650;
  color: var(--ink);
  min-height: 41px;
  transition:
    background 0.15s,
    transform 0.15s;
}
.button:hover {
  background: #f1f5ef;
}
.button.primary {
  color: white;
  background: var(--green);
  border-color: var(--green);
}
.button.primary:hover {
  background: var(--green-dark);
}
.button.secondary {
  background: var(--mint);
  border-color: transparent;
  color: var(--green);
}
.button.danger {
  color: var(--red);
  background: var(--red-bg);
  border-color: #efcaca;
}
.button.small {
  padding: 7px 11px;
  min-height: 32px;
  font-size: 12px;
}
.text-button {
  background: none;
  border: none;
  padding: 5px 0;
  color: var(--green);
  font-weight: 600;
  font-size: 13px;
}
.text-button:hover {
  text-decoration: underline;
}
.icon-button {
  background: none;
  border: 0;
  color: var(--muted);
  font-size: 23px;
  padding: 5px 8px;
  border-radius: 5px;
}
.button-row {
  display: flex;
  align-items: center;
  gap: 9px;
  flex-wrap: wrap;
}
.skip-link {
  position: fixed;
  top: -100px;
  left: 20px;
  padding: 12px;
  background: white;
  z-index: 100;
}
.skip-link:focus {
  top: 10px;
}
.app-shell {
  display: flex;
  min-height: 100vh;
}
.sidebar {
  width: 238px;
  background: white;
  border-right: 1px solid var(--line);
  position: fixed;
  inset: 0 auto 0 0;
  display: flex;
  flex-direction: column;
  padding: 30px 22px 20px;
  z-index: 20;
  overflow-y: auto;
}
.nav-caption {
  font-size: 9px;
  letter-spacing: 1.5px;
  color: #8b968f;
  font-weight: 750;
  margin: 41px 12px 12px;
}
.nav-link {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 11px 13px;
  margin: 3px 0;
  color: var(--muted);
  border-radius: 8px;
  font-size: 13px;
  font-weight: 550;
}
.nav-link:hover {
  background: var(--paper);
  color: var(--green);
}
.nav-link.active {
  background: var(--mint);
  color: var(--green);
  font-weight: 700;
}
.nav-icon {
  width: 20px;
  display: inline-grid;
  place-content: center;
  font-size: 17px;
}
.nav-group-label {
  display: block;
  margin: 25px 13px 12px;
  color: #8b968f;
  font-size: 9px;
  font-weight: 750;
  letter-spacing: 1.5px;
}
.sidebar-bottom {
  margin-top: auto;
  padding-top: 28px;
}
.company-payday {
  display: flex;
  align-items: center;
  gap: 9px;
  border: 1px solid var(--line);
  padding: 13px 11px;
  border-radius: 9px;
  margin-bottom: 22px;
}
.tiny-icon {
  font-size: 24px;
  color: #8fa598;
}
.company-payday strong {
  font-size: 11px;
  display: block;
}
.company-payday small {
  display: block;
  color: var(--muted);
  font-size: 10px;
  margin-top: 4px;
}
.account-chip {
  padding: 0;
  border: 0;
  background: none;
  text-align: left;
  display: flex;
  gap: 10px;
  align-items: center;
  width: 100%;
  color: var(--ink);
}
.account-chip strong {
  display: block;
  font-size: 12px;
  max-width: 116px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.account-chip small {
  color: var(--muted);
  font-size: 10px;
  text-transform: capitalize;
}
.account-chip > span:last-child {
  margin-left: auto;
}
.avatar {
  width: 32px;
  height: 32px;
  background: #eeeade;
  color: #82744e;
  font-size: 10px;
  font-weight: 750;
  display: grid;
  place-content: center;
  border-radius: 50%;
}
.logout {
  margin: 14px 0 0 43px;
  font-size: 11px;
  color: var(--muted);
}
.main-shell {
  margin-left: 238px;
  width: calc(100% - 238px);
  display: flex;
  flex-direction: column;
}
.topbar {
  height: 73px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 38px;
  border-bottom: 1px solid var(--line);
  background: #ffffffb8;
  gap: 14px;
}
.breadcrumb {
  font-size: 12px;
  color: var(--muted);
}
.breadcrumb span {
  margin: 0 13px;
  color: #b2bbb5;
}
.breadcrumb strong {
  font-weight: 550;
  color: var(--ink);
}
.topbar-right {
  display: flex;
  align-items: center;
  gap: 25px;
  font-size: 11px;
  color: var(--muted);
}
.workspace-indicator {
  display: flex;
  align-items: center;
  gap: 7px;
}
.workspace-indicator i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--green);
}
.menu-toggle {
  display: none;
}
#content {
  padding: 38px;
  max-width: 1600px;
  width: 100%;
  margin: 0 auto;
  flex: 1;
  outline: none;
}
.page-heading {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  margin-bottom: 28px;
}
.page-heading p {
  color: var(--muted);
  font-size: 13px;
  margin: 0;
}
.page-heading h1 {
  font-size: 29px;
}
.page-heading .eyebrow {
  font-size: 10px;
  margin-bottom: 8px;
}
.app-footer {
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  padding: 20px 38px;
  color: #87938a;
  font-size: 10px;
}
.notice {
  border-radius: 9px;
  padding: 13px 15px;
  border: 1px solid #d2e5d6;
  background: #eff7f0;
  font-size: 12px;
  line-height: 1.6;
  margin-bottom: 20px;
}
.notice.warning {
  color: #825328;
  background: var(--orange-bg);
  border-color: #efdcc5;
}
.notice.error {
  color: var(--red);
  background: var(--red-bg);
  border-color: #edc7c4;
}
.notice.info {
  background: var(--blue-bg);
  border-color: #dce7f1;
  color: #375e7b;
}
.notice strong {
  font-weight: 650;
}
.card {
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.card-header {
  padding: 22px 24px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--line);
}
.card-header h2,
.card-header h3 {
  margin: 0;
}
.card-body {
  padding: 24px;
}
.metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}
.metric {
  padding: 23px;
  position: relative;
  min-height: 140px;
}
.metric .metric-label {
  font-size: 11px;
  color: var(--muted);
  display: block;
  margin-bottom: 22px;
}
.metric .metric-value {
  font-size: 27px;
  letter-spacing: -1px;
  font-weight: 650;
  display: block;
  line-height: 1.2;
}
.metric .metric-foot {
  display: block;
  font-size: 10px;
  color: var(--muted);
  margin-top: 9px;
  line-height: 1.5;
}
.metric .metric-icon {
  position: absolute;
  right: 20px;
  top: 19px;
  color: #83a391;
  background: var(--paper);
  border-radius: 8px;
  width: 27px;
  height: 27px;
  display: grid;
  place-content: center;
}
.metric.highlight {
  background: var(--dark);
  border-color: var(--dark);
  color: #fff;
}
.metric.highlight .metric-label,
.metric.highlight .metric-foot {
  color: #c0d6c8;
}
.metric.highlight .metric-icon {
  background: #31594b;
  color: #bcd1b6;
}
.metric .metric-value.compact {
  font-size: 20px;
}
.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(280px, 1fr);
  gap: 22px;
  margin-bottom: 24px;
}
.dashboard-grid.equal {
  grid-template-columns: 1fr 1fr;
}
.empty-state {
  padding: 40px 24px;
  text-align: center;
  color: var(--muted);
}
.empty-state .empty-symbol {
  display: grid;
  place-content: center;
  margin: 0 auto 16px;
  width: 46px;
  height: 46px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 13px;
  color: #8ea594;
  font-size: 23px;
}
.empty-state h3 {
  font-size: 14px;
  margin-bottom: 7px;
  color: var(--ink);
}
.empty-state p {
  font-size: 12px;
  max-width: 350px;
  margin: 0 auto 18px;
}
.table-wrap {
  overflow-x: auto;
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}
th {
  text-align: left;
  color: var(--muted);
  font-weight: 550;
  font-size: 10px;
  letter-spacing: 0.3px;
  background: #fafbf8;
  padding: 12px 20px;
  white-space: nowrap;
}
td {
  padding: 16px 20px;
  border-top: 1px solid #edf0ea;
  vertical-align: middle;
}
td .muted {
  display: block;
  font-size: 10px;
  margin-top: 5px;
}
tbody tr:hover {
  background: #fcfdfa;
}
.badge {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 5px;
  font-size: 10px;
  font-weight: 650;
  white-space: nowrap;
  background: #f0f2ed;
  color: var(--muted);
}
.badge.active,
.badge.completed,
.badge.approved,
.badge.paid,
.badge.happy {
  background: var(--mint);
  color: var(--green);
}
.badge.in_progress,
.badge.in_review,
.badge.issued {
  background: var(--blue-bg);
  color: var(--blue);
}
.badge.blocked,
.badge.unhappy,
.badge.overdue,
.badge.offboarded {
  background: var(--red-bg);
  color: var(--red);
}
.badge.pending,
.badge.onboarding,
.badge.partially_paid {
  background: var(--orange-bg);
  color: var(--orange);
}
.toolbar {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  padding: 17px 22px;
  border-bottom: 1px solid var(--line);
  flex-wrap: wrap;
}
.search-input {
  max-width: 320px;
}
.toolbar input,
.toolbar select {
  min-height: 36px;
  padding: 8px 11px;
}
.tabs {
  display: flex;
  gap: 18px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 26px;
  overflow: auto;
}
.tab {
  white-space: nowrap;
  border: 0;
  background: none;
  color: var(--muted);
  font-size: 13px;
  padding: 13px 0;
  border-bottom: 2px solid transparent;
}
.tab.active {
  color: var(--green);
  border-color: var(--green);
  font-weight: 650;
}
.form-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 290px;
  align-items: start;
  gap: 24px;
}
.form-main {
  min-width: 0;
}
.form-section {
  margin-bottom: 20px;
}
.section-title {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 20px;
}
.section-number {
  display: grid;
  place-content: center;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 7px;
  width: 28px;
  height: 28px;
  font-size: 11px;
  color: var(--green);
  font-weight: 650;
}
.section-title h2 {
  font-size: 16px;
  margin: 0;
}
.section-title p {
  font-size: 11px;
  color: var(--muted);
  margin: 4px 0 0;
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.field {
  min-width: 0;
}
.field.wide {
  grid-column: 1/-1;
}
.field label,
.field legend {
  display: block;
  color: var(--ink);
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 8px;
}
.field fieldset {
  border: 0;
  padding: 0;
  margin: 0;
}
.required {
  color: var(--green);
  margin-left: 3px;
}
input,
select,
textarea {
  width: 100%;
  border: 1px solid #dce2d9;
  background: white;
  border-radius: 7px;
  padding: 10px 11px;
  min-height: 40px;
  color: var(--ink);
  transition: border-color 0.15s;
}
input:hover,
select:hover,
textarea:hover {
  border-color: #a8bca9;
}
input:disabled,
textarea:disabled,
select:disabled {
  background: var(--paper);
  color: var(--muted);
}
textarea {
  resize: vertical;
  min-height: 88px;
  line-height: 1.6;
}
input::placeholder,
textarea::placeholder {
  color: #a1aba4;
  font-size: 12px;
}
.field-help {
  font-size: 10px;
  color: var(--muted);
  line-height: 1.5;
  display: block;
  margin-top: 6px;
}
.choice-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.choice {
  display: flex !important;
  align-items: center;
  gap: 7px;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 9px 10px;
  font-size: 11px !important;
  font-weight: 450 !important;
  margin: 0 !important;
  background: white;
  cursor: pointer;
}
.choice:has(input:checked) {
  border-color: #91b39a;
  background: #f1f7ef;
  color: var(--green);
}
.choice input {
  width: 13px;
  height: 13px;
  min-height: 0;
  margin: 0;
  accent-color: var(--green);
}
.choice:has(input:disabled) {
  opacity: 0.5;
  cursor: not-allowed;
}
.form-actions {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin: 22px 0;
}
.form-status {
  font-size: 11px;
  color: var(--muted);
}
.export-card {
  position: sticky;
  top: 24px;
}
.export-card .card-header {
  padding: 20px;
}
.export-card h2 {
  font-size: 15px;
}
.export-card .card-body {
  padding: 20px;
}
.export-card p {
  font-size: 11px;
  margin-bottom: 15px;
}
.export-tabs {
  display: flex;
  gap: 7px;
  margin-bottom: 14px;
}
.export-tabs button {
  flex: 1;
}
.export-preview {
  border: 1px solid var(--line);
  background: #fafbf8;
  border-radius: 8px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-family: inherit;
  font-size: 10px;
  line-height: 1.7;
  padding: 12px;
  max-height: 340px;
  overflow: auto;
  min-height: 80px;
  margin: 0 0 14px;
}
.export-card .button {
  font-size: 11px;
  padding: 9px;
  min-height: 35px;
}
.export-card .button-row {
  margin-top: 8px;
}
.nda {
  background: #fafbf8;
  border: 1px dashed #cbd6c9;
  padding: 18px;
  border-radius: 9px;
}
.nda-top {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  margin-bottom: 7px;
}
.nda h3 {
  font-size: 13px;
  margin: 0;
}
.nda p {
  font-size: 11px;
  color: var(--muted);
  margin: 0 0 15px;
}
.nda .choice {
  border: 0;
  padding: 0;
  background: none;
}
.estimate {
  padding: 16px;
  background: var(--mint);
  border-radius: 8px;
  color: var(--green);
  font-size: 12px;
  line-height: 1.7;
  margin-top: 15px;
}
.estimate strong {
  display: block;
  font-size: 19px;
}
.detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.detail-item {
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
}
.detail-item dt {
  font-size: 10px;
  color: var(--muted);
  margin-bottom: 6px;
}
.detail-item dd {
  font-size: 13px;
  margin: 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.detail-item.wide {
  grid-column: 1/-1;
}
.event {
  border-left: 2px solid var(--line);
  padding: 0 0 20px 20px;
  position: relative;
}
.event:before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #a7c1ac;
  position: absolute;
  left: -5px;
  top: 4px;
}
.event strong {
  font-size: 12px;
}
.event p {
  font-size: 12px;
  margin: 5px 0;
  color: var(--muted);
}
.event time {
  font-size: 10px;
  color: #8e9991;
}
.filters {
  display: flex;
  gap: 9px;
  align-items: center;
}
.filters select,
.filters input {
  font-size: 11px;
  min-height: 34px;
  padding: 7px 10px;
  max-width: 170px;
}
.stat-strip {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 12px;
  margin-bottom: 24px;
}
.stat-strip .card {
  padding: 18px;
}
.stat-strip strong {
  display: block;
  font-size: 23px;
  margin: 10px 0;
}
.stat-strip span {
  font-size: 10px;
  color: var(--muted);
}
.bar-chart {
  display: flex;
  align-items: flex-end;
  gap: 16px;
  min-height: 160px;
  padding-top: 18px;
}
.bar-column {
  display: flex;
  align-items: center;
  flex: 1;
  flex-direction: column;
  justify-content: flex-end;
  min-width: 30px;
}
.bar-pair {
  display: flex;
  gap: 4px;
  height: 110px;
  align-items: flex-end;
  width: 100%;
  justify-content: center;
}
.bar {
  background: var(--green);
  border-radius: 4px 4px 0 0;
  width: 20px;
  min-height: 2px;
}
.bar.secondary {
  background: #a8c6b3;
}
.bar-label {
  font-size: 9px;
  color: var(--muted);
  margin-top: 10px;
  text-align: center;
}
.chart-legend {
  display: flex;
  gap: 18px;
  font-size: 10px;
  color: var(--muted);
  margin-top: 15px;
}
.chart-legend i {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 2px;
  background: var(--green);
  margin-right: 5px;
}
.chart-legend .secondary {
  background: #a8c6b3;
}
.status-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
}
.status-line:last-child {
  border: 0;
}
.progress-track {
  height: 6px;
  background: var(--paper);
  border-radius: 4px;
  margin-top: 6px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  background: #8faf94;
  border-radius: 4px;
}
.loading-card {
  padding: 70px;
  text-align: center;
  color: var(--muted);
}
.toast {
  position: fixed;
  bottom: 25px;
  right: 25px;
  background: var(--dark);
  color: white;
  padding: 14px 20px;
  border-radius: 9px;
  box-shadow: 0 7px 25px #163c3229;
  z-index: 100;
  max-width: 440px;
  font-size: 12px;
  line-height: 1.6;
}
.toast.error {
  background: #873b38;
}
dialog {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 26px;
  max-width: 650px;
  width: calc(100% - 30px);
  box-shadow: 0 30px 100px #163c3233;
  max-height: 90vh;
  overflow: auto;
  color: var(--ink);
}
dialog::backdrop {
  background: #14261e66;
  backdrop-filter: blur(2px);
}
.dialog-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 20px;
}
.dialog-heading h2 {
  margin: 0;
}
.dialog-heading .icon-button {
  font-size: 28px;
}
.login-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 100vh;
}
.login-story {
  background: var(--dark);
  color: white;
  padding: 42px 55px;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}
.wordmark.light {
  color: white;
}
.wordmark.light .brand-mark {
  background: #ffffff16;
  border: 1px solid #ffffff35;
}
.wordmark.light .brand-sub {
  color: #bfcebd;
}
.login-message {
  margin: auto 0;
  padding: 70px 0;
  position: relative;
  z-index: 1;
}
.login-message .eyebrow {
  color: #adceb7;
}
.login-message h1 {
  font-size: 51px;
  line-height: 1.15;
  font-weight: 550;
  letter-spacing: -2px;
  margin-bottom: 23px;
}
.login-message > p:not(.eyebrow) {
  color: #c0d3c6;
  font-size: 15px;
  max-width: 320px;
}
.login-story:after {
  content: "";
  position: absolute;
  width: 550px;
  height: 550px;
  border: 1px solid #ffffff0c;
  border-radius: 50%;
  left: 190px;
  top: 240px;
  box-shadow:
    0 0 0 80px #ffffff03,
    0 0 0 160px #ffffff02;
  pointer-events: none;
}
.decorative-board {
  margin-top: 40px;
  max-width: 340px;
  border: 1px solid #ffffff22;
  border-radius: 12px;
  padding: 9px 18px;
  background: #ffffff05;
}
.decorative-board > div {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  padding: 15px 0;
  border-bottom: 1px solid #ffffff13;
}
.decorative-board > div:last-child {
  border: 0;
}
.decorative-board i {
  width: 6px;
  height: 6px;
  background: #a5c99a;
  border-radius: 50%;
}
.decorative-board span {
  margin-left: auto;
  font-size: 9px;
  color: #b7d0b9;
  background: #ffffff0c;
  padding: 5px 7px;
  border-radius: 4px;
}
.login-footer {
  font-size: 10px;
  color: #a4bfb0;
  margin: 0;
}
.login-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: #fafbf7;
  padding: 50px 38px;
}
.login-card {
  width: 100%;
  max-width: 350px;
}
.login-card h2 {
  font-size: 28px;
  line-height: 1.25;
  letter-spacing: -1px;
  margin-bottom: 13px;
}
.login-card > .muted {
  font-size: 13px;
  margin-bottom: 32px;
}
.login-card .field {
  margin-bottom: 20px;
}
.login-card .button {
  margin-top: 8px;
  justify-content: space-between;
}
.auth-links {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin-top: 21px;
}
.auth-links .text-button {
  font-size: 11px;
}
.auth-fineprint {
  margin-top: 31px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
  font-size: 10px;
  line-height: 1.8;
  color: #879389;
}
.login-help {
  font-size: 10px;
  margin: 45px 0 0;
}
.line-editor {
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 15px;
  margin: 12px 0;
}
.line-editor .form-grid {
  grid-template-columns: 2fr 1fr 1fr;
  gap: 12px;
}
.line-editor .field label {
  font-size: 10px;
}
.line-editor input {
  font-size: 12px;
}
.line-editor .remove-line {
  font-size: 10px;
  color: var(--red);
  margin-top: 10px;
}
.readonly-box {
  font-size: 12px;
  color: var(--muted);
  padding: 13px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
}
.state-hint {
  font-size: 11px;
  line-height: 1.7;
  padding: 15px;
  background: var(--paper);
  border-radius: 8px;
  margin-bottom: 18px;
}
.form-error {
  color: var(--red);
  font-size: 12px;
  line-height: 1.6;
  margin-bottom: 16px;
}
.edit-meta {
  font-size: 10px;
  color: var(--muted);
  margin-top: 7px;
}
.switcher {
  display: flex;
  gap: 5px;
  padding: 4px;
  background: #eef1e9;
  border-radius: 8px;
}
.switcher button {
  border: none;
  background: none;
  padding: 7px 12px;
  border-radius: 6px;
  font-size: 11px;
  color: var(--muted);
}
.switcher button.active {
  background: white;
  color: var(--green);
  box-shadow: 0 1px 3px #1334200a;
}
.list-title {
  font-weight: 600;
  color: var(--ink);
}
.list-title:hover {
  color: var(--green);
  text-decoration: underline;
}
.meter-row {
  display: grid;
  grid-template-columns: 95px 1fr 75px;
  gap: 12px;
  align-items: center;
  margin: 17px 0;
  font-size: 11px;
}
.meter-row .progress-track {
  height: 14px;
  margin: 0;
}
.meter-row .progress-fill {
  background: var(--green);
}
.meter-row:nth-child(2) .progress-fill {
  background: #9ab7a0;
}
.meter-value {
  text-align: right;
  font-size: 10px;
}
.currency-stack {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.currency-stack span {
  white-space: nowrap;
}
.timeline-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
@media (min-width: 1600px) {
  #content {
    padding: 44px 48px;
  }
  .topbar {
    padding: 0 48px;
  }
}
@media (max-width: 1180px) {
  .sidebar {
    width: 210px;
    padding-left: 16px;
    padding-right: 16px;
  }
  .main-shell {
    margin-left: 210px;
    width: calc(100% - 210px);
  }
  #content {
    padding: 28px;
  }
  .topbar {
    padding: 0 28px;
  }
  .form-layout {
    grid-template-columns: minmax(0, 1fr) 250px;
    gap: 18px;
  }
  .card-body {
    padding: 20px;
  }
  .metric {
    padding: 19px;
  }
  .metrics {
    gap: 12px;
  }
  .metric .metric-value {
    font-size: 23px;
  }
  .stat-strip {
    grid-template-columns: repeat(3, 1fr);
  }
}
@media (max-width: 1000px) {
  .form-layout {
    grid-template-columns: 1fr;
  }
  .export-card {
    position: static;
  }
  .export-preview {
    max-height: 220px;
  }
  .dashboard-grid {
    grid-template-columns: 1fr;
  }
  .dashboard-grid.equal {
    grid-template-columns: 1fr;
  }
  .topbar-right .workspace-indicator {
    display: none;
  }
  .login-story {
    padding: 35px;
  }
  .login-message h1 {
    font-size: 43px;
  }
  .metrics {
    grid-template-columns: 1fr 1fr;
  }
  .timeline-grid {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 760px) {
  .sidebar {
    transform: translateX(-100%);
    transition: transform 0.2s;
    width: 238px;
    box-shadow: 5px 0 25px #163c3210;
  }
  .sidebar.open {
    transform: translateX(0);
  }
  .main-shell {
    margin: 0;
    width: 100%;
  }
  .topbar {
    height: 62px;
    padding: 0 18px;
  }
  .menu-toggle {
    display: block;
  }
  .breadcrumb {
    margin-right: auto;
  }
  .topbar-right {
    font-size: 10px;
  }
  .breadcrumb span {
    margin: 0 8px;
  }
  #content {
    padding: 25px 18px;
  }
  .page-heading {
    flex-direction: column;
    margin-bottom: 23px;
    gap: 15px;
  }
  .page-heading h1 {
    font-size: 26px;
  }
  .page-heading .button-row {
    width: 100%;
  }
  .metrics {
    gap: 12px;
  }
  .metric {
    min-height: 130px;
    padding: 18px;
  }
  .metric .metric-label {
    font-size: 10px;
    max-width: 90%;
    line-height: 1.5;
    margin-bottom: 16px;
  }
  .metric .metric-icon {
    display: none;
  }
  .metric .metric-value {
    font-size: 24px;
  }
  .metric .metric-value.compact {
    font-size: 16px;
  }
  .card-header {
    padding: 19px;
  }
  .card-body {
    padding: 19px;
  }
  .stat-strip {
    grid-template-columns: repeat(3, 1fr);
    gap: 9px;
  }
  .stat-strip .card {
    padding: 13px;
  }
  .stat-strip span {
    font-size: 9px;
  }
  .stat-strip strong {
    font-size: 21px;
  }
  .form-grid,
  .detail-grid {
    grid-template-columns: 1fr;
  }
  .field.wide,
  .detail-item.wide {
    grid-column: auto;
  }
  .form-actions {
    align-items: flex-start;
    flex-direction: column;
  }
  .form-actions .button-row {
    width: 100%;
  }
  .app-footer {
    padding: 20px 18px;
    gap: 10px;
    font-size: 9px;
  }
  .login-layout {
    grid-template-columns: 1fr;
  }
  .login-story {
    padding: 25px 28px;
  }
  .login-message,
  .login-footer {
    display: none;
  }
  .login-panel {
    min-height: calc(100vh - 89px);
    padding: 40px 28px;
  }
  .login-card h2 {
    font-size: 27px;
  }
  .login-help {
    text-align: center;
    line-height: 1.5;
  }
  .line-editor .form-grid {
    grid-template-columns: 1fr 1fr;
  }
  .line-editor .field:first-child {
    grid-column: 1/-1;
  }
  .toolbar {
    padding: 14px;
  }
  .toolbar .search-input {
    max-width: 100%;
  }
  .topbar-right #today-label {
    display: none;
  }
  .toast {
    left: 18px;
    right: 18px;
    bottom: 18px;
    max-width: none;
  }
  .filters {
    flex-wrap: wrap;
  }
  .detail-grid {
    gap: 0;
  }
  .dialog-heading h2 {
    font-size: 18px;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
@media print {
  .sidebar,
  .topbar,
  .app-footer,
  .page-heading .button-row,
  .form-actions,
  .export-card,
  .toolbar,
  .toast,
  .tabs {
    display: none !important;
  }
  .main-shell {
    margin: 0;
    width: 100%;
  }
  #content {
    padding: 0;
  }
  .card {
    box-shadow: none;
    break-inside: avoid;
  }
  .form-layout {
    display: block;
  }
  body {
    background: white;
  }
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.history-title {
  margin-top: 27px;
  margin-bottom: 20px;
}
.mini-metrics {
  grid-template-columns: repeat(3, 1fr);
  margin-bottom: 20px;
  gap: 12px;
}
.mini-metrics h2 {
  margin-top: 10px;
  font-size: 20px;
}
.dashboard-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  margin: -5px 0 25px;
  flex-wrap: wrap;
}
.dashboard-controls label {
  font-size: 10px;
  color: var(--muted);
}
.section-gap {
  margin-bottom: 24px;
}
.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 35px 0 22px;
  gap: 20px;
}
.section-heading .eyebrow {
  font-size: 9px;
  margin-bottom: 8px;
}
.section-heading h2 {
  margin: 0;
}
.chart-note {
  font-size: 10px;
  margin: 22px 0 0;
}
.weekly-chart svg {
  display: block;
  width: 100%;
  height: auto;
  min-height: 150px;
}
.donut-layout {
  display: flex;
  align-items: center;
  gap: 20px;
}
.donut {
  width: 140px;
  flex-shrink: 0;
}
.donut-legend {
  flex: 1;
}
.donut-legend .status-line {
  font-size: 10px;
  gap: 12px;
}
progress {
  display: block;
  width: 100%;
  height: 15px;
  border: 0;
  border-radius: 4px;
  overflow: hidden;
  background: var(--paper);
  accent-color: var(--green);
}
progress::-webkit-progress-bar {
  background: var(--paper);
  border-radius: 4px;
}
progress::-webkit-progress-value {
  background: var(--green);
  border-radius: 4px;
}
.meter-row:nth-child(2) progress::-webkit-progress-value {
  background: #9ab7a0;
}
.record-heading {
  margin-top: 32px;
}
.financial-history {
  margin-top: 25px;
}
details summary {
  cursor: pointer;
  padding: 10px 0;
  color: var(--green);
}
@media (max-width: 760px) {
  .section-heading {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
  .dashboard-controls {
    margin-top: 0;
  }
  .filters label {
    width: auto;
  }
  .mini-metrics h2 {
    font-size: 15px;
  }
  .donut-layout {
    gap: 10px;
  }
  .donut {
    width: 105px;
  }
  .meter-row {
    grid-template-columns: 60px 1fr 85px;
  }
}
.security-actions {
  margin-top: 20px;
}
.pre-wrap {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  margin-bottom: 20px;
}
.action-export {
  margin-top: 24px;
  border-top: 1px solid var(--line);
  padding-top: 6px;
}
.action-export summary {
  font-size: 12px;
}
.clipboard-helper {
  position: fixed;
  opacity: 0;
  pointer-events: none;
}
