/* Shared interface type scale, loaded after layout and responsive styles. */
:root {
  --muted: #5d6d65;
  --ui-font:
    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
    Arial, sans-serif;
}
body {
  font-family: var(--ui-font);
  font-size: 14px;
  line-height: 1.5;
}
.brand {
  font-family: Poppins, var(--ui-font);
}
button,
input,
select,
textarea {
  font-family: inherit;
}
.nav-item {
  font-size: 14px;
  color: #52645b;
}
.workspace-switch,
.profile,
.breadcrumb {
  font-size: 13px;
}
.profile small {
  overflow-wrap: anywhere;
}
.nav-label,
.eyebrow {
  font-size: 13px;
  color: #56645d;
  letter-spacing: 1.4px;
}
.page-heading h1 {
  font-size: clamp(26px, 2.3vw, 32px);
  line-height: 1.2;
  letter-spacing: -0.8px;
}
.page-heading p,
.auth-panel p {
  font-size: 15px;
  color: #56645d;
}
.card h2 {
  font-size: 17px;
  line-height: 1.4;
  letter-spacing: -0.2px;
}
.metric-top {
  font-size: 14px;
  color: #56645d;
}
.metric-value {
  font-size: 32px;
  line-height: 1.25;
  letter-spacing: -0.8px;
}
.metric-value,
td,
.key-row strong {
  font-variant-numeric: tabular-nums;
}
.metric-foot,
.card-sub,
.legend,
.chart-caption,
.key-row,
.health-note,
.table-bottom,
.member-name small,
.task small,
.workspace-switch small,
.profile small,
.filter-note,
.demo-badge,
.help-card p,
.help-card button,
footer {
  font-size: 13px;
  line-height: 1.6;
  color: #56645d;
}
.key-row strong,
.task strong,
.help-card strong {
  font-size: 14px;
}
th {
  font-size: 13px;
  font-weight: 600;
  color: #52645b;
  letter-spacing: 0.3px;
}
td,
.member-name,
.branch-label,
.branch-label strong {
  font-size: 14px;
}
.status {
  font-size: 13px;
  font-weight: 600;
}
.primary,
.secondary,
.text-button,
.filter-group select,
.top-actions .secondary,
.view-actions .secondary,
.table-bottom .secondary,
.search input {
  font-size: 13px;
}
.form-grid label,
.auth-form label {
  font-size: 14px;
  font-weight: 600;
}
.form-grid input,
.form-grid select,
.form-grid textarea,
.auth-form input {
  font-size: 16px;
  font-weight: 400;
}
.notice,
.field-help,
.inline-error {
  font-size: 13px;
  line-height: 1.6;
}
.chart-wrap text {
  font-family: var(--ui-font);
  font-size: 13px;
  fill: #5d6d65;
}
.donut-key .key-row {
  font-size: 13px;
}
.donut-key .key-row strong {
  font-size: 14px;
}
.nav-item {
  min-height: 34px;
}
@media (max-width: 720px) {
  .page-heading {
    flex-wrap: wrap;
  }
  .page-heading p {
    font-size: 14px;
  }
  .page-heading .primary {
    font-size: 13px;
  }
  .metric-top {
    font-size: 13px;
  }
  .metric-foot {
    font-size: 13px;
  }
  .metric-value {
    font-size: 28px;
  }
  .filter-group {
    flex-wrap: wrap;
  }
  .chart-caption {
    gap: 12px;
    flex-wrap: wrap;
  }
}

/* Role workspaces use full, task-focused cards rather than restricted placeholders. */
.work-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 14px;
  margin-bottom: 24px;
}
.work-action {
  display: flex;
  flex-direction: column;
  gap: 8px;
  text-align: left;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: white;
  color: var(--green);
  font-size: 16px;
}
.work-action span {
  font-size: 13px;
  color: var(--muted);
  font-weight: 400;
}
.work-action:hover {
  background: var(--mint);
  border-color: #9bb7a7;
}
.message-tools {
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 16px;
  margin: 16px 0;
}
.staff-message,
.assignment {
  padding: 22px;
  border-bottom: 1px solid var(--line);
}
.staff-message:last-child,
.assignment:last-child {
  border-bottom: 0;
}
.staff-message.unread {
  border-left: 4px solid var(--green);
  background: #f2f7f2;
}
.staff-message h3,
.assignment h3 {
  font-size: 17px;
  margin: 10px 0;
}
.staff-message p,
.assignment p {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-size: 14px;
  line-height: 1.7;
}
.message-meta {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 13px;
  color: var(--muted);
}
.assignment {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
}
.personal-chart {
  display: flex;
  gap: 12px;
  padding: 24px;
  overflow-x: auto;
}
.personal-month {
  min-width: 80px;
  flex: 1;
  text-align: center;
  font-size: 13px;
  color: var(--muted);
}
.personal-month strong {
  color: var(--ink);
  font-size: 13px;
}
.personal-bar {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  height: 100px;
  background: #f1f5ef;
  border-radius: 5px;
  margin: 10px 0;
}
.personal-bar span {
  display: block;
  width: 60%;
  background: var(--green);
  border-radius: 4px 4px 0 0;
}
@media (max-width: 720px) {
  .assignment {
    flex-direction: column;
    align-items: stretch;
  }
}

.metrics {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
}

.staff-message h3,
.assignment h3 {
  overflow-wrap: anywhere;
}

.section-help {
  margin: 18px 0 0;
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--green);
  font-size: 14px;
}
.section-help summary,
.auth-help summary {
  cursor: pointer;
  font-weight: 600;
}
.section-help div,
.section-guide {
  color: var(--ink);
  font-size: 14px;
  line-height: 1.7;
}
.section-help li,
.section-guide li {
  margin-bottom: 9px;
}
.auth-help {
  margin-top: 18px;
  font-size: 14px;
  color: var(--green);
}
.auth-help p {
  font-size: 14px;
}
.portal-handover {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  padding: 18px;
  border-radius: 8px;
  background: var(--mint);
  font-size: 15px;
  line-height: 1.8;
  user-select: text;
}
.form-grid label .field-help {
  font-weight: 400;
}

/* Record details should be as readable as the main workspace. */
dialog {
  font-family: var(--ui-font);
  font-size: 15px;
  line-height: 1.6;
}
.modal-heading h2 {
  font-size: clamp(23px, 3vw, 27px);
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.4px;
}
.detail-list > div {
  min-width: 0;
  padding: 15px 16px;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.55;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.detail-list small {
  font-size: 13px;
  font-weight: 400;
  line-height: 1.4;
  color: #52645b;
  margin-bottom: 7px;
}
.safe-note {
  font-size: 14px;
  line-height: 1.65;
  color: #73551e;
  padding: 14px 16px;
}
.reconcile-ok {
  font-size: 14px;
  line-height: 1.65;
  color: #365c30;
}
dialog .status {
  font-size: 13px;
  font-weight: 600;
  color: #365c30;
}
dialog .status.warn {
  color: #7d5a1b;
}
dialog .status.muted {
  color: #526056;
}
dialog .tiny {
  font-size: 13px;
  color: #52645b;
}
dialog .form-actions .primary,
dialog .form-actions .secondary {
  font-size: 14px;
}
@media (max-width: 720px) {
  .detail-list {
    gap: 12px;
  }
  .detail-list > div {
    padding: 13px 14px;
  }
}

/* Table actions and supporting details must remain readable at normal zoom. */
.cell-actions { flex-wrap:wrap;align-items:center;gap:8px 12px }
td .text-button,.cell-actions .text-button { font-size:14px;line-height:1.4;min-height:36px;padding:8px 6px;white-space:nowrap }
td small,.member-name small,.tiny { font-size:13px;line-height:1.5 }
.member-avatar { font-size:13px;min-width:32px;width:32px;height:32px;flex-shrink:0 }
