:root {
  --bg: #f3f6f8;
  --surface: #ffffff;
  --surface-raised: #ffffff;
  --surface-soft: #f7faf8;
  --surface-muted: #eef4f1;
  --ink: #17211c;
  --muted: #66746d;
  --subtle: #8a968f;
  --line: #d8e1dc;
  --line-strong: #becdc5;
  --green: #16784f;
  --green-dark: #0f5f3e;
  --green-soft: #e8f5ee;
  --blue: #2563a9;
  --blue-soft: #eaf1fb;
  --amber: #a8620a;
  --amber-soft: #f8ecd6;
  --red: #b42318;
  --red-dark: #8f1d14;
  --red-soft: #fff0ee;
  --violet: #6554c0;
  --violet-soft: #f0edff;
  --radius-sm: 6px;
  --radius: 8px;
  --radius-lg: 12px;
  --shadow-sm: 0 1px 2px rgba(21, 36, 29, 0.06);
  --shadow: 0 10px 28px rgba(21, 36, 29, 0.08);
  --shadow-lg: 0 22px 52px rgba(21, 36, 29, 0.12);
  --ring: 0 0 0 3px rgba(22, 120, 79, 0.18);
}

/* Task-first finance and accounting workspace */
.finance-workspace {
  display: grid;
  min-width: 0;
  max-width: 1560px;
  margin: 0 auto;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.finance-workspace-hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 42px;
  align-items: end;
  min-height: 210px;
  padding: 38px 42px 34px;
  overflow: hidden;
  border-bottom: 1px solid #c9ded2;
  background:
    radial-gradient(circle at 94% 4%, rgba(37, 99, 169, 0.12), transparent 28%),
    linear-gradient(118deg, #eaf7ef 0%, #fbfdfc 58%, #edf4f9 100%);
}

.finance-workspace-hero::after {
  content: "";
  position: absolute;
  right: -92px;
  bottom: -116px;
  width: 330px;
  height: 210px;
  border: 1px solid rgba(15, 95, 62, 0.18);
  border-radius: 50%;
  pointer-events: none;
}

.finance-workspace-hero > * {
  position: relative;
  z-index: 1;
}

.finance-workspace-hero h2 {
  max-width: 830px;
  margin: 6px 0 10px;
  color: #103e2c;
  font-size: clamp(27px, 3vw, 38px);
  line-height: 1.08;
  letter-spacing: -0.025em;
}

.finance-workspace-hero p:last-child {
  max-width: 760px;
  margin: 0;
  color: #53665c;
  line-height: 1.65;
}

.finance-period-control {
  display: grid;
  gap: 6px;
  min-width: 220px;
  padding: 16px 18px;
  border: 1px solid #bdd2c6;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.86);
  box-shadow: var(--shadow-sm);
}

.finance-period-control span,
.finance-period-control small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.finance-period-control input {
  min-height: 38px;
  padding: 5px 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-weight: 750;
}

.finance-section-tabs {
  display: flex;
  gap: 2px;
  padding: 10px 22px 0;
  overflow-x: auto;
  border-bottom: 1px solid var(--line);
  background: #fbfdfc;
  scrollbar-width: thin;
}

.finance-section-tabs button {
  min-height: 46px;
  padding: 0 17px;
  border: 0;
  border-bottom: 3px solid transparent;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
  cursor: pointer;
}

.finance-section-tabs button:hover {
  color: var(--green-dark);
}

.finance-section-tabs button.active {
  border-bottom-color: var(--green);
  color: var(--green-dark);
}

.finance-section-tabs button:focus-visible,
.finance-workspace button:focus-visible,
.finance-workspace input:focus-visible,
.finance-workspace select:focus-visible,
.finance-workspace textarea:focus-visible,
.finance-modal-backdrop button:focus-visible,
.finance-modal-backdrop input:focus-visible,
.finance-modal-backdrop select:focus-visible,
.finance-modal-backdrop textarea:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 2px;
  box-shadow: var(--ring);
}

.finance-section {
  display: grid;
  gap: 24px;
  padding: 30px 34px 40px;
  background: #f8fbf9;
}

.finance-section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 26px;
}

.finance-section-heading h3 {
  margin: 4px 0 6px;
  color: #173b2b;
  font-size: 24px;
  line-height: 1.2;
}

.finance-section-heading p:last-child {
  max-width: 760px;
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.finance-context-chip {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid #bdd7c8;
  border-radius: 999px;
  background: #ecf7f0;
  color: var(--green-dark);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.finance-permission-notice {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 14px;
  border: 1px solid #dec188;
  border-radius: var(--radius-sm);
  background: #fff9ec;
  color: #76501d;
  font-size: 12px;
}

.finance-permission-notice strong::after {
  content: " —";
}

.finance-metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.finance-metric {
  display: grid;
  gap: 6px;
  min-height: 126px;
  padding: 22px 24px;
  border: 0;
  border-right: 1px solid var(--line);
  background: transparent;
  color: inherit;
  text-align: left;
  font: inherit;
}

button.finance-metric {
  cursor: pointer;
}

button.finance-metric:hover {
  background: #f0f8f3;
}

.finance-metric:last-child {
  border-right: 0;
}

.finance-metric span,
.finance-metric small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
  letter-spacing: 0.035em;
  text-transform: uppercase;
}

.finance-metric strong {
  color: #125f3e;
  font-size: 31px;
  line-height: 1;
}

.finance-quick-actions {
  display: grid;
  gap: 16px;
  padding: 24px;
  border: 1px solid #cbded3;
  border-radius: var(--radius);
  background: linear-gradient(112deg, #eef8f2, #fff 68%);
}

.finance-quick-actions h3 {
  margin: 4px 0 0;
  color: #153d2b;
  font-size: 19px;
}

.finance-quick-action-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.finance-quick-action-grid button {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  grid-template-rows: auto auto;
  gap: 3px 10px;
  align-items: center;
  min-height: 88px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: inherit;
  font: inherit;
  text-align: left;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
}

.finance-quick-action-grid button:hover:not(:disabled) {
  border-color: #8fbca4;
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(21, 68, 44, 0.09);
}

.finance-quick-action-grid button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.finance-quick-icon {
  display: grid;
  grid-row: 1 / 3;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 10px;
  background: var(--green-soft);
  color: var(--green-dark);
}

.finance-quick-icon svg,
.finance-book-mark svg,
.finance-import-icon svg,
.finance-card-icon svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
}

.finance-quick-action-grid strong {
  font-size: 13px;
}

.finance-quick-action-grid small {
  align-self: start;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}

.finance-two-column {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.finance-panel-card {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.finance-panel-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 74px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
  background: #fbfdfc;
}

.finance-panel-title h3 {
  margin: 3px 0 0;
  font-size: 17px;
}

.finance-panel-title > span {
  color: var(--muted);
  font-size: 12px;
}

.finance-task-list {
  display: grid;
}

.finance-task-list > button {
  display: grid;
  grid-template-columns: 9px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  min-height: 62px;
  padding: 10px 20px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: #fff;
  color: inherit;
  text-align: left;
  font: inherit;
  cursor: pointer;
}

.finance-task-list > button:last-child {
  border-bottom: 0;
}

.finance-task-list > button:hover {
  background: #f2f8f4;
}

.finance-task-list strong,
.finance-task-list small {
  display: block;
}

.finance-task-list small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
}

.finance-task-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--blue);
}

.finance-task-dot.is-success {
  background: var(--green);
}

.finance-task-dot.is-warning {
  background: var(--amber);
}

.finance-task-dot.is-danger {
  background: var(--red);
}

.finance-task-arrow {
  color: var(--green);
  font-size: 18px;
}

.finance-table-scroll {
  width: 100%;
  overflow: auto;
  scrollbar-width: thin;
}

.finance-table {
  width: 100%;
  min-width: 900px;
  border-collapse: collapse;
}

.finance-table.is-compact {
  min-width: 650px;
}

.finance-table th,
.finance-table td {
  padding: 11px 13px;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  font-size: 12px;
  text-align: left;
  vertical-align: middle;
}

.finance-table th {
  background: #f4f8f6;
  color: var(--muted);
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.finance-table tbody tr:hover td {
  background: #f8fcfa;
}

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

.finance-table .number-cell {
  text-align: right;
  white-space: nowrap;
}

.finance-table input {
  width: 100%;
  min-width: 120px;
  min-height: 36px;
  padding: 6px 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fff;
  color: inherit;
  font: inherit;
}

.finance-status {
  display: inline-flex;
  align-items: center;
  min-height: 25px;
  padding: 0 8px;
  border: 1px solid #cfd9e3;
  border-radius: 999px;
  background: #f1f5f9;
  color: #43566a;
  font-size: 10px;
  font-weight: 850;
  white-space: nowrap;
}

.finance-status.is-success {
  border-color: #abd0ba;
  background: var(--green-soft);
  color: var(--green-dark);
}

.finance-status.is-warning {
  border-color: #e4c58b;
  background: var(--amber-soft);
  color: #7b4a0c;
}

.finance-status.is-danger {
  border-color: #efb1ab;
  background: var(--red-soft);
  color: var(--red-dark);
}

.finance-row-actions {
  display: flex;
  gap: 7px;
  align-items: center;
  white-space: nowrap;
}

.finance-row-actions .text-button {
  min-height: 30px;
  padding-inline: 8px;
}

.finance-row-actions button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.finance-empty-compact {
  display: grid;
  gap: 5px;
  padding: 28px 22px;
  color: var(--muted);
  text-align: center;
}

.finance-empty-compact p {
  margin: 0;
  font-size: 12px;
  line-height: 1.5;
}

.finance-reconcile-grid {
  align-items: start;
}

.finance-reconciliation-list,
.finance-period-list {
  display: grid;
}

.finance-reconciliation-list article,
.finance-period-list article {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 16px;
  align-items: center;
  min-height: 72px;
  padding: 13px 20px;
  border-bottom: 1px solid var(--line);
}

.finance-reconciliation-list article:last-child,
.finance-period-list article:last-child {
  border-bottom: 0;
}

.finance-reconciliation-list strong,
.finance-reconciliation-list small,
.finance-period-list strong,
.finance-period-list small {
  display: block;
}

.finance-reconciliation-list small,
.finance-period-list small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
}

.finance-reconciliation-balance {
  text-align: right;
}

.finance-reconciliation-balance span,
.finance-reconciliation-balance strong {
  display: block;
}

.finance-reconciliation-balance span {
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 10px;
  text-transform: uppercase;
}

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

.finance-book-card {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  grid-template-rows: minmax(112px, 1fr) auto;
  gap: 14px 15px;
  min-height: 230px;
  padding: 21px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow-sm);
}

.finance-book-card:hover {
  border-color: #a8c6b6;
  box-shadow: 0 10px 24px rgba(23, 61, 43, 0.08);
}

.finance-book-mark {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border-radius: 12px;
  background: var(--green-soft);
  color: var(--green-dark);
}

.finance-book-mark.is-statement,
.finance-book-mark.is-summary {
  background: var(--blue-soft);
  color: var(--blue);
}

.finance-book-mark.is-budget,
.finance-book-mark.is-balance {
  background: var(--amber-soft);
  color: var(--amber);
}

.finance-book-card h3 {
  margin: 4px 0 7px;
  color: #193b2c;
  font-size: 17px;
}

.finance-book-card p:last-child {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.finance-book-actions {
  display: flex;
  grid-column: 1 / -1;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-top: 13px;
  border-top: 1px solid var(--line);
}

.finance-book-actions .action-button {
  min-height: 36px;
}

.finance-book-actions button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.finance-import-dropzone {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr) auto;
  gap: 20px;
  align-items: center;
  min-height: 132px;
  padding: 24px;
  border: 1px dashed #90b9a2;
  border-radius: var(--radius);
  background: linear-gradient(112deg, #eef8f2, #fff);
}

.finance-import-icon {
  display: grid;
  width: 58px;
  height: 58px;
  place-items: center;
  border-radius: 16px;
  background: #dff1e6;
  color: var(--green-dark);
}

.finance-import-dropzone h3 {
  margin: 0 0 6px;
  color: #173d2c;
}

.finance-import-dropzone p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.finance-import-dropzone input[type="file"] {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

.finance-import-dropzone .action-button {
  position: relative;
  cursor: pointer;
}

.finance-import-dropzone .action-button.disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.finance-import-steps {
  display: grid;
  grid-template-columns: repeat(7, minmax(90px, 1fr));
  margin: 0;
  padding: 0;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  counter-reset: finance-import;
  list-style: none;
}

.finance-import-steps li {
  position: relative;
  display: grid;
  gap: 5px;
  min-height: 66px;
  align-content: center;
  padding: 10px 13px 10px 42px;
  border-right: 1px solid var(--line);
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.finance-import-steps li:last-child {
  border-right: 0;
}

.finance-import-steps li::before {
  position: absolute;
  left: 13px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--green-soft);
  color: var(--green-dark);
  content: counter(finance-import);
  counter-increment: finance-import;
  display: grid;
  place-items: center;
}

.finance-cell-detail {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 10px;
}

.finance-modal-backdrop {
  z-index: 100;
  padding: 20px;
}

.finance-transaction-modal,
.finance-action-modal,
.finance-import-review-modal {
  width: min(940px, 96vw);
  max-height: 92vh;
  padding: 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.finance-action-modal {
  width: min(570px, 96vw);
}

.finance-transaction-modal > header,
.finance-action-modal > header,
.finance-import-review-modal > header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 20px 24px 17px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(112deg, #eaf7ef, #fff);
}

.finance-transaction-modal > header h2,
.finance-action-modal > header h2,
.finance-import-review-modal > header h2 {
  margin: 4px 0;
}

.finance-transaction-modal > header p:last-child,
.finance-import-review-modal > header p:last-child {
  margin: 0;
  color: var(--muted);
}

.finance-import-review-modal {
  width: min(1180px, 97vw);
  overflow: auto;
}

.finance-import-review-modal > header {
  position: sticky;
  top: 0;
  z-index: 2;
}

.finance-import-review-modal > footer {
  display: flex;
  justify-content: flex-end;
  padding: 16px 24px;
  border-top: 1px solid var(--line);
  background: #fbfdfc;
}

.finance-import-steps.is-compact {
  margin: 18px 24px 0;
}

.finance-import-steps.is-compact li {
  min-height: 54px;
}

.finance-import-steps li.is-complete {
  background: #f3faf6;
  color: var(--green-dark);
}

.finance-import-steps li.is-complete::before {
  background: var(--green);
  color: #fff;
  content: "✓";
}

.finance-import-steps li.is-current {
  background: #fff8e7;
  color: #684b00;
}

.finance-import-steps li.is-current::before {
  background: #f1c75b;
  color: #3b2a00;
}

.finance-import-review-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  padding: 18px 24px 0;
}

.finance-import-review-summary > div,
.finance-import-reconciliation-proof > div {
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fbfdfc;
}

.finance-import-review-summary .wide,
.finance-import-reconciliation-proof .wide {
  grid-column: 1 / -1;
}

.finance-import-review-summary span,
.finance-import-reconciliation-proof span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.finance-import-review-summary code {
  overflow-wrap: anywhere;
  color: var(--ink);
  font-size: 11px;
}

.finance-import-review-sections {
  display: grid;
  gap: 12px;
  padding: 18px 24px 24px;
}

.finance-import-review-sections > details,
.finance-import-nested-disclosure {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.finance-import-review-sections summary {
  display: flex;
  min-height: 58px;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 13px 16px;
  cursor: pointer;
  list-style-position: inside;
}

.finance-import-review-sections summary > span:first-child {
  display: inline-grid;
  gap: 3px;
  margin-right: auto;
}

.finance-import-review-sections summary small {
  color: var(--muted);
  font-weight: 500;
}

.finance-import-review-sections details[open] > summary {
  border-bottom: 1px solid var(--line);
  background: #f8fbf9;
}

.finance-import-review-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 16px;
  padding: 18px;
}

.finance-import-review-form label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.finance-import-review-form label.wide,
.finance-import-review-form .wide {
  grid-column: 1 / -1;
}

.finance-import-review-form input,
.finance-import-review-form select,
.finance-import-review-form textarea {
  width: 100%;
  min-height: 44px;
  padding: 9px 10px;
  border: 1px solid #c7d6ce;
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--ink);
  font: inherit;
}

.finance-import-review-form textarea {
  min-height: 84px;
  resize: vertical;
}

.finance-import-review-form label small,
.finance-form-guidance {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  font-weight: 500;
  line-height: 1.5;
}

.finance-inline-actions,
.finance-import-final-action {
  display: flex;
  min-height: 48px;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.finance-mapping-list {
  display: grid;
  gap: 8px;
  padding: 0 18px 18px;
}

.finance-mapping-list article {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 12px;
  align-items: center;
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}

.finance-mapping-list article > div {
  display: grid;
  gap: 3px;
}

.finance-mapping-list article small {
  color: var(--muted);
}

.finance-import-nested-disclosure {
  margin: 0 18px 18px;
  background: #fbfdfc;
}

.finance-import-review-sections .finance-table-scroll,
.finance-import-review-sections > details > .finance-empty-compact,
.finance-import-review-sections > details > .finance-form-guidance {
  margin: 18px;
}

.finance-import-source-text {
  max-width: 390px;
  overflow-wrap: anywhere;
  color: var(--muted);
  font-size: 11px;
}

.finance-import-reconciliation-proof {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  padding: 18px;
}

.finance-import-final-action {
  justify-content: flex-end;
  padding: 0 18px 18px;
}

.finance-review-next-step {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.finance-cutover-card {
  margin-bottom: 18px;
  border-color: #b8cec1;
  background: linear-gradient(145deg, #fbfdfb, #f3f8f5);
}

.finance-cutover-card > p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

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

.finance-exception-list li {
  display: grid;
  grid-template-columns: minmax(180px, .45fr) 1fr;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid #dfc6a4;
  border-radius: var(--radius-sm);
  background: #fffaf2;
  color: #6b4b20;
}

.finance-exception-list strong {
  font-size: 11px;
  letter-spacing: .04em;
  text-transform: lowercase;
}

.finance-success-note {
  padding: 12px 14px;
  border: 1px solid #a9ceb8;
  border-radius: var(--radius-sm);
  background: #edf8f1;
  color: #155b34;
  line-height: 1.5;
}

.finance-cutover-checklist {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding: 20px 24px 0;
}

.finance-cutover-checklist label {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 11px 12px;
  border: 1px solid #d5e1da;
  border-radius: var(--radius-sm);
  background: #f8fbf9;
  color: var(--ink);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.4;
}

.finance-cutover-checklist input {
  width: 16px;
  height: 16px;
  margin: 1px 0 0;
  accent-color: var(--green);
}

.finance-transaction-modal form,
.finance-action-modal form {
  display: grid;
  min-height: 0;
  overflow: auto;
}

.finance-transaction-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 16px;
  padding: 22px 24px;
}

.finance-transaction-form-grid label,
.finance-action-modal form > label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.finance-transaction-form-grid label.wide {
  grid-column: 1 / -1;
}

.finance-transaction-form-grid input,
.finance-transaction-form-grid select,
.finance-transaction-form-grid textarea,
.finance-action-modal input,
.finance-action-modal textarea {
  width: 100%;
  min-height: 42px;
  padding: 8px 10px;
  border: 1px solid #c7d6ce;
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--ink);
  font: inherit;
}

.finance-transaction-form-grid textarea,
.finance-action-modal textarea {
  min-height: 82px;
  resize: vertical;
}

.finance-action-modal form > p,
.finance-action-modal form > label {
  margin: 0;
  padding: 18px 24px 0;
}

.finance-balance-preview {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin: 0 24px;
  padding: 13px 15px;
  border: 1px solid #b9d6c6;
  border-radius: var(--radius-sm);
  background: var(--green-soft);
  color: var(--green-dark);
  font-size: 12px;
}

.finance-transaction-modal .form-actions,
.finance-action-modal .form-actions {
  margin-top: 18px;
  padding: 14px 24px 18px;
  border-top: 1px solid var(--line);
  background: #fbfdfc;
}

.finance-loading-card,
.finance-error-card {
  display: grid;
  min-height: 360px;
  place-items: center;
  align-content: center;
  gap: 10px;
  padding: 40px;
  color: var(--muted);
  text-align: center;
}

.finance-loading-card p,
.finance-error-card p {
  max-width: 640px;
  margin: 0;
}

.finance-loading-mark {
  width: 42px;
  height: 42px;
  border: 3px solid #cfe3d7;
  border-top-color: var(--green);
  border-radius: 50%;
  animation: finance-spin 0.8s linear infinite;
}

.finance-error-card {
  grid-template-columns: auto minmax(0, 640px) auto;
  text-align: left;
}

.finance-error-card h2 {
  margin: 4px 0 7px;
}

.finance-card-icon {
  display: grid;
  width: 50px;
  height: 50px;
  place-items: center;
  border-radius: 14px;
  background: var(--red-soft);
  color: var(--red);
}

@keyframes finance-spin {
  to { transform: rotate(360deg); }
}

@media (max-width: 1180px) {
  .finance-metric-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .finance-metric:nth-child(2) {
    border-right: 0;
  }

  .finance-metric:nth-child(-n + 2) {
    border-bottom: 1px solid var(--line);
  }

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

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

@media (max-width: 820px) {
  .finance-workspace-hero,
  .finance-two-column {
    grid-template-columns: 1fr;
  }

  .finance-workspace-hero {
    gap: 22px;
    padding: 30px 24px;
  }

  .finance-period-control {
    width: min(100%, 320px);
  }

  .finance-section {
    padding: 24px 20px 32px;
  }

  .finance-section-heading {
    align-items: flex-start;
    flex-direction: column;
  }

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

  .finance-import-dropzone {
    grid-template-columns: 54px minmax(0, 1fr);
  }

  .finance-import-dropzone .action-button {
    grid-column: 1 / -1;
    justify-self: start;
  }

  .finance-error-card {
    grid-template-columns: 1fr;
    text-align: center;
  }
}

@media (max-width: 560px) {
  .finance-section-tabs {
    padding-inline: 10px;
  }

  .finance-section {
    padding: 20px 14px 28px;
  }

  .finance-permission-notice {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }

  .finance-workspace-hero {
    padding: 26px 18px;
  }

  .finance-metric-grid,
  .finance-quick-action-grid,
  .finance-book-grid,
  .finance-transaction-form-grid,
  .finance-cutover-checklist,
  .finance-import-review-summary,
  .finance-import-review-form,
  .finance-import-reconciliation-proof {
    grid-template-columns: 1fr;
  }

  .finance-exception-list li {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .finance-metric,
  .finance-metric:nth-child(n) {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .finance-metric:last-child {
    border-bottom: 0;
  }

  .finance-quick-actions {
    padding: 17px;
  }

  .finance-book-card {
    min-height: 210px;
  }

  .finance-transaction-form-grid label.wide {
    grid-column: auto;
  }

  .finance-import-review-summary .wide,
  .finance-import-review-form label.wide,
  .finance-import-review-form .wide,
  .finance-import-reconciliation-proof .wide {
    grid-column: auto;
  }

  .finance-import-review-modal > header,
  .finance-import-review-modal > footer,
  .finance-import-review-sections,
  .finance-import-review-summary {
    padding-inline: 14px;
  }

  .finance-import-steps.is-compact {
    margin-inline: 14px;
  }

  .finance-mapping-list article {
    grid-template-columns: 1fr auto;
  }

  .finance-mapping-list article .text-button {
    grid-column: 1 / -1;
    justify-self: start;
  }

  .finance-balance-preview {
    align-items: flex-start;
    flex-direction: column;
  }

  .finance-reconciliation-list article,
  .finance-period-list article {
    grid-template-columns: 1fr auto;
  }

  .finance-reconciliation-balance {
    grid-row: 2;
    text-align: left;
  }
}

@media (prefers-reduced-motion: reduce) {
  .finance-quick-action-grid button,
  .finance-book-card {
    transition: none;
  }

  .finance-quick-action-grid button:hover:not(:disabled) {
    transform: none;
  }

  .finance-loading-mark {
    animation-duration: 1.8s;
  }
}

/* Nutrition menu planning and weekly costing */
.nutrition-workspace-tabs {
  display: inline-flex;
  gap: 4px;
  margin: 0 0 18px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f3f7f4;
}

.nutrition-workspace-tabs button {
  min-height: 38px;
  padding: 0 16px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.nutrition-workspace-tabs button:hover,
.nutrition-workspace-tabs button.active {
  background: #fff;
  color: var(--green-dark);
  box-shadow: 0 5px 16px rgba(27, 70, 49, 0.1);
}

.nutrition-reference-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 28px;
  margin-bottom: 18px;
  padding: 28px 32px;
  overflow: hidden;
  border: 1px solid #d6e6dc;
  border-radius: 8px 56px 8px 8px;
  background: linear-gradient(115deg, #eef8f1 0%, #f8fbfa 60%, #edf3f8 100%);
}

.nutrition-reference-hero h2 {
  margin: 4px 0 8px;
  font-size: 28px;
  line-height: 1.12;
}

.nutrition-reference-hero > div > span {
  color: var(--muted);
}

.nutrition-reference-stat {
  min-width: 150px;
  padding: 0 10px 4px 22px;
  border-left: 1px solid #bcd2c4;
  text-align: right;
}

.nutrition-reference-stat strong,
.nutrition-reference-stat span {
  display: block;
}

.nutrition-reference-stat strong {
  color: var(--green-dark);
  font-size: 34px;
}

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

.menu-generation-path {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--green-dark);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.menu-generation-path svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
}

.menu-data-section {
  padding: 24px 26px 28px;
}

.recipe-catalog {
  border-top: 1px solid var(--line);
}

.recipe-catalog-row {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) minmax(130px, auto) 24px;
  align-items: center;
  gap: 15px;
  width: 100%;
  min-height: 76px;
  padding: 10px 8px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.recipe-catalog-row:hover {
  background: #f3f8f5;
}

.recipe-index {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border-radius: 50%;
  background: #dff0e5;
  color: var(--green-dark);
  font-weight: 900;
}

.recipe-catalog-copy strong,
.recipe-catalog-copy small,
.recipe-serving-price strong,
.recipe-serving-price small,
.recipe-serving-price > span {
  display: block;
}

.recipe-catalog-copy small,
.recipe-serving-price small,
.recipe-serving-price > span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
}

.recipe-serving-price {
  text-align: right;
}

.recipe-serving-price strong {
  margin-top: 3px;
  color: var(--p-nutrition-accent, #8a5b00);
  font-size: 16px;
}

.recipe-serving-price > span {
  font-size: 10px;
}

.recipe-catalog-arrow svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
}

.menu-editor-shell {
  padding: 0;
  overflow: hidden;
  background: #f3f7f5;
}

.menu-editor-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  padding: 28px 30px 24px;
  border-bottom: 1px solid #cddfd3;
  background: linear-gradient(115deg, #ecf7f0, #f8fbfa 64%, #eef4f8);
}

.menu-editor-heading h2 {
  margin: 4px 0 7px;
  font-size: 28px;
}

.menu-editor-heading > div > span {
  color: var(--muted);
}

.menu-editor-meta,
.costing-editor-meta {
  margin: 22px 30px 0;
  padding: 20px;
  border: 1px solid #cbd9d1;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 8px 22px rgba(28, 62, 44, 0.06);
}

.menu-budget-review {
  display: grid;
  gap: 14px;
  margin: 18px 30px 0;
  padding: 18px;
  border: 1px solid #d6a12d;
  border-radius: 8px;
  background: #fff9e8;
  box-shadow: 0 8px 22px rgba(103, 82, 13, 0.08);
}

.menu-budget-review[hidden] {
  display: none;
}

.menu-budget-review > header,
.menu-budget-violation-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.menu-budget-review > header span,
.menu-budget-violation-heading span,
.menu-budget-suggestions > span {
  color: #76590b;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.menu-budget-review > header h3 {
  margin: 3px 0 0;
  color: #4f410f;
  font-size: 17px;
}

.menu-budget-review > header > strong {
  padding: 5px 9px;
  border-radius: 999px;
  background: #f4dd9d;
  color: #5d490d;
  font-size: 12px;
  white-space: nowrap;
}

.menu-budget-review-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.menu-budget-review-actions > strong {
  padding: 5px 9px;
  border-radius: 999px;
  background: #f4dd9d;
  color: #5d490d;
  font-size: 12px;
  white-space: nowrap;
}

.menu-budget-review-actions .action-button.warning {
  border-color: #aa7412;
  background: #8a5a05;
  color: #ffffff;
}

.menu-budget-review-actions .action-button.warning:hover {
  background: #6e4703;
}

.menu-budget-override-meta {
  margin: 0;
  color: #685f43;
  font-size: 13px;
}

.menu-budget-override-confirm {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 14px;
  border: 1px solid #c58b20;
  border-radius: 7px;
  background: #fff2cb;
}

.menu-budget-override-confirm[hidden] {
  display: none;
}

.menu-budget-override-confirm span {
  display: block;
  color: #76590b;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.menu-budget-override-confirm strong {
  display: block;
  margin-top: 3px;
  color: #4f410f;
}

.menu-budget-override-confirm p {
  margin: 5px 0 0;
  color: #685f43;
  font-size: 13px;
}

.menu-budget-override-confirm-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  flex: 0 0 auto;
}

.menu-budget-override-confirm .action-button.warning {
  border-color: #aa7412;
  background: #8a5a05;
  color: #ffffff;
}

.menu-budget-review-list,
.menu-budget-suggestions {
  display: grid;
  gap: 8px;
}

.menu-budget-violation {
  padding: 13px;
  border: 1px solid #e5cf91;
  border-radius: 7px;
  background: #ffffff;
}

.menu-budget-violation-heading strong {
  display: block;
  margin-top: 2px;
  color: #263f34;
}

.menu-budget-violation-heading small,
.menu-budget-violation p,
.menu-budget-more {
  color: #685f43;
}

.menu-budget-violation p {
  margin: 9px 0;
}

.menu-budget-suggestions button {
  display: grid;
  gap: 3px;
  width: 100%;
  padding: 9px 11px;
  border: 1px solid #c7d9ce;
  border-radius: 6px;
  background: #f3faf6;
  color: #1e4f3a;
  text-align: left;
  cursor: pointer;
}

.menu-budget-suggestions button:hover {
  border-color: #4a9270;
  background: #e8f6ee;
}

.menu-budget-suggestions button:focus-visible,
.menu-budget-review:focus-visible {
  outline: 3px solid rgba(23, 105, 70, 0.35);
  outline-offset: 2px;
}

.menu-budget-suggestions button small {
  color: #566b60;
}

.menu-ingredient-editor {
  padding: 26px 30px 32px;
}

.monthly-menu-calendar-section,
.weekly-costing-days {
  margin: 18px 30px 30px;
  padding: 22px;
  border: 1px solid #cbd9d1;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 12px 28px rgba(28, 62, 44, 0.07);
}

.section-heading-row {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.section-heading-row span,
.section-heading-row small {
  color: var(--muted);
  font-size: 11px;
}

.section-heading-row h3 {
  margin: 4px 0 0;
  font-size: 20px;
}

.recipe-ingredient-table input {
  min-width: 130px;
}

.recipe-ingredient-table select {
  min-width: 190px;
}

.recipe-ingredient-table [data-recipe-item="purchase_option_id"] {
  min-width: 230px;
}

.recipe-price-reference,
.recipe-derived-cost {
  min-width: 118px;
  white-space: nowrap;
}

.recipe-price-reference span,
.recipe-price-reference small {
  display: block;
}

.recipe-price-reference span,
.recipe-derived-cost {
  color: var(--green-dark);
  font-weight: 800;
}

.recipe-price-reference small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 600;
}

.recipe-total-cost {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 18px;
  margin-top: 14px;
  padding: 14px 16px;
  border: 1px solid #bdd3c5;
  border-radius: 8px;
  background: #edf7f1;
}

.recipe-total-cost span {
  color: #50675b;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.recipe-total-cost strong {
  min-width: 140px;
  color: var(--green-dark);
  font-size: 22px;
  text-align: right;
}

.recipe-ingredient-table th:first-child,
.recipe-ingredient-table td:first-child,
.recipe-ingredient-table th:last-child,
.recipe-ingredient-table td:last-child {
  width: 44px;
  text-align: center;
}

.row-order-badge {
  display: inline-grid;
  width: 25px;
  height: 25px;
  place-items: center;
  border-radius: 50%;
  background: #edf5f0;
  color: var(--green-dark);
  font-size: 11px;
  font-weight: 800;
}

.nutrition-price-hero {
  position: relative;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 28px;
  min-height: 190px;
  margin: 0 0 18px;
  padding: 34px 38px;
  overflow: hidden;
  border: 1px solid #c9ddd0;
  border-radius: 18px;
  background:
    radial-gradient(circle at 91% 20%, rgba(217, 237, 125, 0.38) 0 62px, transparent 63px),
    linear-gradient(118deg, #f5fbf7, #edf6f2 60%, #f7f9f4);
  box-shadow: 0 16px 40px rgba(21, 78, 53, 0.08);
}

.nutrition-price-hero::after {
  position: absolute;
  right: 150px;
  bottom: -85px;
  width: 210px;
  height: 150px;
  border: 1px solid rgba(31, 132, 84, 0.22);
  border-radius: 50%;
  content: "";
}

.nutrition-price-hero h2 {
  margin: 5px 0 8px;
  font-size: 31px;
}

.nutrition-price-hero > div:first-child > span {
  color: var(--muted);
}

.nutrition-price-signal {
  position: relative;
  z-index: 1;
  display: grid;
  min-width: 150px;
  padding: 18px 20px;
  border-left: 3px solid var(--green);
  background: rgba(255, 255, 255, 0.78);
}

.nutrition-price-signal span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.nutrition-price-signal strong {
  margin-top: 6px;
  color: var(--green-dark);
  font-size: 31px;
}

.ingredient-price-section {
  padding: 28px;
  overflow: hidden;
  border: 1px solid #ceded4;
  border-radius: 8px 30px 8px 30px;
  background: linear-gradient(145deg, #ffffff 0 72%, #f2f8f5);
  box-shadow: 0 14px 35px rgba(28, 62, 44, 0.07);
}

.ingredient-price-list {
  display: grid;
  gap: 10px;
  margin-top: 20px;
}

.ingredient-price-record {
  overflow: clip;
  border: 1px solid #d4e1d9;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(20, 45, 42, 0.05);
  transition: border-color 120ms ease, box-shadow 180ms ease, transform 120ms ease;
}

.ingredient-price-record:hover {
  border-color: #b7cdc0;
  box-shadow: 0 6px 18px rgba(20, 45, 42, 0.065);
}

.ingredient-price-record[open] {
  border-color: #a9c8b5;
  box-shadow: 0 14px 36px rgba(20, 45, 42, 0.085);
}

.ingredient-price-record > summary {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(170px, 0.55fr) 120px 24px;
  align-items: center;
  gap: 18px;
  min-height: 72px;
  padding: 13px 16px;
  cursor: pointer;
  list-style: none;
  outline: none;
}

.ingredient-price-record > summary::-webkit-details-marker {
  display: none;
}

.ingredient-price-record > summary:focus-visible {
  box-shadow: inset 0 0 0 3px rgba(32, 132, 84, 0.22);
}

.ingredient-price-identity,
.ingredient-price-default,
.ingredient-price-option-count {
  min-width: 0;
}

.ingredient-price-identity strong,
.ingredient-price-default strong,
.ingredient-price-option-count strong,
.ingredient-price-identity small,
.ingredient-price-default small,
.ingredient-price-option-count small {
  display: block;
}

.ingredient-price-identity strong {
  overflow-wrap: anywhere;
  color: #173e2b;
  font-size: 14px;
}

.ingredient-price-default strong {
  color: var(--green-dark);
  font-size: 15px;
}

.ingredient-price-option-count strong {
  font-size: 15px;
}

.ingredient-price-identity small,
.ingredient-price-default small,
.ingredient-price-option-count small {
  margin-top: 3px;
  overflow: hidden;
  color: var(--muted);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ingredient-price-expand {
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  color: var(--green-dark);
  transition: transform 180ms cubic-bezier(0.22, 1, 0.36, 1);
}

.ingredient-price-expand svg {
  width: 15px;
  height: 15px;
  transform: rotate(90deg);
}

.ingredient-price-record[open] .ingredient-price-expand {
  transform: rotate(90deg);
}

.ingredient-price-record-body {
  padding: 20px;
  border-top: 1px solid #d9e5de;
  background: #fbfdfc;
  animation: ingredient-options-open 260ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes ingredient-options-open {
  from { opacity: 0; transform: translateY(-5px); }
  to { opacity: 1; transform: translateY(0); }
}

.ingredient-price-master-fields {
  display: grid;
  grid-template-columns: minmax(240px, 0.8fr) minmax(320px, 1.2fr);
  gap: 14px;
}

.ingredient-price-master-fields label,
.purchase-option-field {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.ingredient-price-master-fields label > span,
.purchase-option-field > span {
  color: #4f675a;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.purchase-option-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin: 24px 0 10px;
}

.purchase-option-heading strong,
.purchase-option-heading span {
  display: block;
}

.purchase-option-heading strong {
  color: #173e2b;
  font-size: 14px;
}

.purchase-option-heading span {
  max-width: 72ch;
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
}

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

.purchase-option-row {
  display: grid;
  grid-template-columns: minmax(180px, 1.1fr) minmax(140px, 0.65fr) 88px 140px minmax(180px, 0.9fr) 140px minmax(180px, 1fr) 36px;
  align-items: end;
  gap: 10px;
  padding: 12px;
  border: 1px solid #d6e2db;
  border-radius: 12px;
  background: #fff;
}

.purchase-option-choice {
  display: flex;
  align-items: center;
  gap: 7px;
  min-height: 42px;
  color: #375446;
  font-size: 11px;
  font-weight: 700;
}

.purchase-option-choice input {
  width: 17px;
  height: 17px;
  accent-color: var(--green);
}

.purchase-option-remove {
  margin-bottom: 3px;
}

.ingredient-price-record-actions {
  display: flex;
  justify-content: flex-end;
  min-height: 24px;
  margin-top: 12px;
  color: var(--muted);
  font-size: 11px;
}

.price-input-wrap {
  display: flex;
  align-items: center;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
}

.price-input-wrap:focus-within {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(32, 132, 84, 0.1);
}

.price-input-wrap span {
  align-self: stretch;
  display: grid;
  place-items: center;
  padding: 0 10px;
  background: #edf6f0;
  color: var(--green-dark);
  font-size: 10px;
  font-weight: 800;
}

.price-input-wrap input {
  min-width: 100px;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

@media (max-width: 760px) {
  .nutrition-price-hero {
    align-items: stretch;
    flex-direction: column;
    min-height: 0;
    padding: 26px 24px;
    border-radius: 24px 8px;
  }

  .nutrition-price-hero h2 {
    font-size: 26px;
  }

  .nutrition-price-signal {
    min-width: 0;
  }

  .ingredient-price-section {
    padding: 20px 16px;
    border-radius: 14px;
  }

  .ingredient-price-record > summary {
    grid-template-columns: minmax(0, 1fr) 24px;
    gap: 10px;
  }

  .ingredient-price-default,
  .ingredient-price-option-count {
    grid-column: 1;
  }

  .ingredient-price-expand {
    grid-column: 2;
    grid-row: 1 / span 3;
  }

  .ingredient-price-master-fields,
  .purchase-option-row {
    grid-template-columns: 1fr;
  }

  .purchase-option-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .purchase-option-choice {
    min-height: 32px;
  }

  .purchase-option-remove {
    justify-self: end;
  }
}

@media (min-width: 761px) and (max-width: 1380px) {
  .purchase-option-row {
    grid-template-columns: repeat(4, minmax(150px, 1fr));
  }

  .option-notes-field {
    grid-column: span 3;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ingredient-price-record-body {
    animation: none;
  }

  .ingredient-price-record,
  .ingredient-price-expand {
    transition: none;
  }
}

.monthly-menu-ledger {
  border-top: 1px solid var(--line);
}

.monthly-menu-row {
  display: grid;
  grid-template-columns: minmax(220px, 1.5fr) minmax(110px, 0.6fr) minmax(120px, 0.7fr) 24px;
  align-items: center;
  gap: 18px;
  width: 100%;
  min-height: 78px;
  padding: 12px 10px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.monthly-menu-row:hover {
  background: #f3f8f5;
}

.monthly-menu-row strong,
.monthly-menu-row small {
  display: block;
}

.monthly-menu-row small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
}

.monthly-menu-row > span:last-child svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
}

.calendar-section-heading {
  align-items: flex-start;
}

.calendar-heading-tools {
  display: grid;
  justify-items: end;
  gap: 8px;
}

.menu-auto-generate {
  border-color: #2d7657;
  background: #e8f5ed;
  color: #1d5a40;
}

.menu-auto-generate:hover {
  background: #d9eee2;
}

.menu-generator-requirement {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) minmax(420px, 1.5fr);
  align-items: end;
  gap: 18px;
  margin: 0 28px 20px;
  padding: 16px 18px;
  border: 1px solid #c8ded0;
  border-radius: 8px;
  background: #f6faf7;
}

.menu-generator-requirement h3 {
  margin: 3px 0 5px;
  color: #234c39;
  font-size: 16px;
}

.menu-generator-requirement > div > span {
  display: block;
  max-width: 620px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.menu-generator-requirement-fields {
  display: grid;
  grid-template-columns: minmax(220px, 1.4fr) minmax(170px, 0.8fr);
  gap: 12px;
}

.menu-generation-summary {
  display: grid;
  gap: 12px;
  margin-bottom: 16px;
  padding: 16px;
  border: 1px solid #9fc5ae;
  border-radius: 8px;
  background: #f1f9f4;
}

.menu-generation-summary[hidden] {
  display: none;
}

.menu-generation-summary header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.menu-generation-summary header span {
  color: #327052;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.menu-generation-summary h4 {
  margin: 3px 0 0;
  color: #234c39;
  font-size: 16px;
}

.menu-generation-badges {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 7px;
}

.menu-generation-badges strong {
  padding: 6px 10px;
  border-radius: 999px;
  background: #d8eddf;
  color: #245d42;
  font-size: 11px;
  white-space: nowrap;
}

.menu-generation-badges .is-budget-compliant {
  background: #cfead9;
  color: #185a39;
}

.menu-generation-badges .is-budget-blocked {
  background: #f7dfc2;
  color: #7c400c;
}

.menu-generation-badges .is-required-viand {
  background: #dce7f8;
  color: #254f86;
}

.menu-generation-weeks {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 8px;
}

.menu-generation-weeks > div {
  display: grid;
  gap: 4px;
  padding: 10px 12px;
  border: 1px solid #c8ded0;
  border-radius: 7px;
  background: #ffffff;
}

.menu-generation-weeks span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
}

.menu-generation-weeks strong {
  color: #294f3c;
  font-size: 12px;
  line-height: 1.45;
}

.menu-generation-weeks small {
  font-size: 10px;
  font-weight: 700;
  line-height: 1.4;
}

.menu-generation-weeks .is-within-budget {
  color: #237047;
}

.menu-generation-weeks .is-over-budget {
  color: #a04719;
}

.menu-generation-summary p,
.menu-generation-summary ul {
  margin: 0;
  color: #52695d;
  font-size: 12px;
  line-height: 1.45;
}

.menu-generation-summary ul {
  padding-left: 18px;
}

.calendar-summary,
.holiday-legend {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px 14px;
}

.calendar-summary span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.holiday-legend span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--muted);
  font-size: 10px;
}

.holiday-legend i,
.menu-calendar-holiday i {
  width: 7px;
  height: 7px;
  flex: 0 0 7px;
  border-radius: 50%;
  background: #b85a4d;
}

.holiday-legend .special-non-working i,
.menu-calendar-holiday.special-non-working i {
  background: #b47713;
}

.holiday-legend .special-working i,
.menu-calendar-holiday.special-working i {
  background: #386ca5;
}

.monthly-menu-calendar-frame {
  overflow-x: auto;
  border: 1px solid #c8d6ce;
  border-radius: 8px;
  background: #f8faf9;
  transition: opacity 160ms ease;
}

.monthly-menu-calendar-frame.is-refreshing {
  opacity: 0.5;
}

.monthly-menu-calendar {
  display: grid;
  grid-template-columns: minmax(82px, 0.55fr) repeat(5, minmax(142px, 1fr)) minmax(82px, 0.55fr);
  grid-template-rows: 38px;
  grid-auto-rows: minmax(158px, auto);
  min-width: 950px;
  background: #ffffff;
}

.menu-calendar-weekday {
  display: grid;
  place-items: center;
  padding: 0 8px;
  border-right: 1px solid #d6e0da;
  border-bottom: 1px solid #c8d6ce;
  background: #e9f3ed;
  color: #25563f;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.menu-calendar-weekday.is-weekend {
  background: #f0f2f1;
  color: #738078;
}

.menu-calendar-cell {
  position: relative;
  display: grid;
  align-content: start;
  min-width: 0;
  padding: 10px;
  border-right: 1px solid #dbe3de;
  border-bottom: 1px solid #dbe3de;
  background: #ffffff;
  transition: background-color 150ms ease, box-shadow 150ms ease;
}

.menu-calendar-weekday:nth-child(7n),
.menu-calendar-cell:nth-child(7n) {
  border-right: 0;
}

.menu-calendar-cell.is-feeding-day:hover,
.menu-calendar-cell.is-feeding-day:focus-within {
  z-index: 1;
  background: #f5faf7;
  box-shadow: inset 0 0 0 2px #88b69a;
}

.menu-calendar-cell.has-event {
  background: #f1f8f4;
}

.menu-calendar-cell.is-weekend {
  background: #f4f5f4;
}

.menu-calendar-cell.is-outside {
  background: repeating-linear-gradient(135deg, #f6f7f6, #f6f7f6 6px, #f1f3f2 6px, #f1f3f2 12px);
}

.menu-calendar-date {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
  color: var(--muted);
}

.menu-calendar-date time {
  display: grid;
  width: 27px;
  height: 27px;
  place-items: center;
  border-radius: 50%;
  background: #edf4ef;
  color: var(--green-dark);
  font-size: 12px;
  font-weight: 900;
}

.menu-calendar-date span {
  color: var(--subtle);
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
}

.menu-calendar-cell.is-weekend .menu-calendar-date {
  align-items: flex-start;
  flex-direction: column;
}

.menu-calendar-cell.is-weekend .menu-calendar-date time {
  background: #e5e9e6;
  color: #657169;
}

.menu-calendar-holidays {
  display: grid;
  gap: 4px;
  margin-bottom: 7px;
}

.menu-calendar-holiday {
  display: flex;
  align-items: flex-start;
  gap: 5px;
  padding: 4px 6px;
  border-radius: 5px;
  background: #fff2ef;
  color: #8d3f35;
  font-size: 9px;
  font-weight: 800;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.menu-calendar-holiday.special-non-working {
  background: #fff5df;
  color: #805710;
}

.menu-calendar-holiday.special-working {
  background: #edf4fb;
  color: #315f90;
}

.menu-calendar-holiday i {
  margin-top: 2px;
}

.menu-calendar-event {
  display: grid;
  gap: 6px;
  margin-top: auto;
}

.menu-calendar-event select,
.menu-calendar-event input {
  width: 100%;
  min-width: 0;
  height: 34px;
  padding: 6px 8px;
  font-size: 11px;
}

.menu-calendar-event input {
  background: #fbfcfb;
}

.menu-calendar-cell.has-event .menu-calendar-event select {
  border-color: #7cae91;
  background: #ffffff;
  color: #174c34;
  font-weight: 700;
}

.menu-recipe-hover-card {
  position: fixed;
  z-index: 1200;
  display: grid;
  gap: 12px;
  max-width: calc(100vw - 24px);
  padding: 16px;
  border-radius: 14px;
  background: var(--p-surface-strong, #ffffff);
  color: var(--p-text, #172525);
  box-shadow: 0 18px 46px rgba(23, 37, 37, 0.2);
  font-family: var(--p-font-body, "Aptos", "Segoe UI", sans-serif);
  pointer-events: none;
}

.menu-recipe-hover-card[hidden] {
  display: none;
}

.menu-recipe-hover-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.menu-recipe-hover-heading strong {
  min-width: 0;
  color: var(--p-text, #172525);
  font-size: 15px;
  line-height: 1.25;
}

.menu-recipe-hover-heading span {
  flex: 0 0 auto;
  color: var(--p-text-tertiary, #63716e);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.menu-recipe-hover-card p {
  margin: 0;
  color: var(--p-text-secondary, #4b5b58);
  font-size: 12px;
  line-height: 1.55;
}

.menu-recipe-hover-card dl {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 0;
  border-top: 1px solid var(--p-border, #d7e0dc);
}

.menu-recipe-hover-card dl div {
  display: grid;
  gap: 2px;
  padding: 10px 10px 0 0;
}

.menu-recipe-hover-card dt {
  color: var(--p-text-tertiary, #63716e);
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.menu-recipe-hover-card dd {
  margin: 0;
  color: var(--p-text, #172525);
  font-size: 12px;
  font-weight: 750;
  line-height: 1.3;
}

.menu-calendar-weekend-label {
  align-self: end;
  margin-top: auto;
  color: #9aa39d;
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
}

.menu-costing-filters {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) 170px minmax(190px, 0.7fr) auto;
  align-items: end;
  gap: 12px;
}

.menu-costing-filters label > span {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 11px;
}

.menu-costing-filters input,
.menu-costing-filters select {
  width: 100%;
}

.menu-costing-batch-print {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) 190px auto;
  align-items: end;
  gap: 14px;
  margin-top: 14px;
  padding: 16px;
  border: 1px solid #bcd4c4;
  border-radius: var(--radius);
  background: linear-gradient(120deg, #f2faf5 0%, #ffffff 72%);
}

.menu-costing-batch-print > div {
  display: grid;
  gap: 4px;
  align-self: center;
}

.menu-costing-batch-print > div strong {
  color: var(--ink);
  font-size: 14px;
}

.menu-costing-batch-print label > span {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 11px;
}

.menu-costing-batch-print input {
  width: 100%;
}

.status-chip {
  display: inline-flex;
  padding: 4px 8px;
  border-radius: 999px;
  background: #edf2ef;
  color: #536159;
  font-size: 10px;
  font-weight: 800;
}

.status-chip.submitted {
  background: #dff1e6;
  color: #17633f;
}

.costing-budget-display {
  min-width: 210px;
  padding-left: 22px;
  border-left: 1px solid #bcd2c4;
  text-align: right;
}

.costing-budget-display span,
.costing-budget-display strong {
  display: block;
}

.costing-budget-display span {
  color: var(--muted);
  font-size: 11px;
}

.costing-budget-display strong {
  margin-top: 5px;
  color: var(--green-dark);
  font-size: 24px;
}

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

.weekly-costing-live-summary {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.weekly-costing-live-summary span {
  padding-left: 12px;
  border-left: 1px solid #ccd9d0;
}

.weekly-costing-live-summary strong {
  display: block;
  margin-top: 3px;
  color: var(--green-dark);
  font-size: 13px;
}

.costing-day-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
}

.costing-day-card {
  overflow: hidden;
  border: 1px solid #cfdcd3;
  border-radius: 7px;
  background: #fff;
}

.costing-day-card > header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 14px;
  padding: 15px 17px;
  border-bottom: 1px solid #d8e4dc;
  background: #edf7f0;
}

.costing-day-card > header span,
.costing-day-card > header small {
  color: var(--muted);
  font-size: 10px;
}

.costing-day-card > header h3 {
  margin: 3px 0;
  font-size: 16px;
}

.costing-day-card > header label {
  width: 110px;
}

.costing-day-card > header label span {
  display: block;
  margin-bottom: 4px;
}

.costing-day-card > header input {
  width: 100%;
}

.costing-entry-table {
  min-width: 720px;
}

.costing-entry-table input {
  min-width: 90px;
}

.costing-entry-table input[readonly] {
  border-color: transparent;
  background: transparent;
  color: #425047;
}

.costing-entry-table thead tr:first-child th:nth-child(2) {
  background: #e7f2ea;
  color: #255b42;
}

.costing-entry-table thead tr:first-child th:nth-child(3) {
  background: #f8eed3;
  color: #6d571c;
}

@media (max-width: 1180px) {
  .menu-costing-filters,
  .menu-costing-batch-print {
    grid-template-columns: 1fr 1fr;
  }

  .menu-costing-batch-print > div {
    grid-column: 1 / -1;
  }
}

@media (min-width: 1600px) {
  .costing-day-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .costing-entry-table {
    min-width: 590px;
  }
}

@media (max-width: 760px) {
  .nutrition-reference-hero,
  .menu-editor-heading {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .nutrition-reference-hero {
    padding: 22px;
    border-radius: 8px 36px 8px 8px;
  }

  .nutrition-reference-stat,
  .costing-budget-display {
    padding: 12px 0 0;
    border-top: 1px solid #bcd2c4;
    border-left: 0;
    text-align: left;
  }

  .costing-day-grid,
  .costing-editor-meta {
    grid-template-columns: 1fr;
  }

  .menu-editor-meta,
  .menu-generator-requirement,
  .costing-editor-meta,
  .menu-budget-review,
  .monthly-menu-calendar-section,
  .weekly-costing-days {
    margin-right: 16px;
    margin-left: 16px;
  }

  .menu-generator-requirement,
  .menu-generator-requirement-fields {
    grid-template-columns: 1fr;
  }

  .monthly-menu-calendar-section,
  .weekly-costing-days {
    padding: 16px;
  }

  .menu-budget-review > header,
  .menu-budget-violation-heading,
  .menu-generation-summary header {
    align-items: flex-start;
    flex-direction: column;
  }

  .menu-generation-badges {
    justify-content: flex-start;
  }

  .calendar-section-heading,
  .calendar-heading-tools {
    align-items: flex-start;
    justify-items: start;
  }

  .calendar-summary,
  .holiday-legend {
    justify-content: flex-start;
  }

  .menu-costing-filters,
  .menu-costing-batch-print,
  .recipe-catalog-row,
  .monthly-menu-row {
    grid-template-columns: 1fr;
  }

  .recipe-index,
  .recipe-catalog-arrow,
  .monthly-menu-row > span:last-child {
    display: none;
  }

  .recipe-serving-price {
    text-align: left;
  }

  .recipe-total-cost {
    justify-content: space-between;
  }
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 320px;
  background:
    linear-gradient(180deg, #f8fafc 0%, var(--bg) 45%, #eef4f1 100%);
  color: var(--ink);
  font-family: "Segoe UI", Arial, sans-serif;
  font-size: 14px;
  line-height: 1.45;
  accent-color: var(--green);
}

body.is-locked {
  overflow: hidden;
}

.hidden {
  display: none !important;
}

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

button {
  cursor: pointer;
  touch-action: manipulation;
}

button:disabled,
input:disabled,
select:disabled,
textarea:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

button,
a,
input,
select,
textarea,
summary {
  transition:
    background-color 180ms ease,
    border-color 180ms ease,
    color 180ms ease,
    box-shadow 180ms ease,
    transform 180ms ease;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible {
  outline: 0;
  box-shadow: var(--ring);
}

.skip-link {
  position: fixed;
  left: 16px;
  top: 12px;
  z-index: 100;
  transform: translateY(-140%);
  padding: 10px 12px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  color: var(--green-dark);
  background: #ffffff;
  box-shadow: var(--shadow);
  font-weight: 700;
  text-decoration: none;
}

.skip-link:focus {
  transform: translateY(0);
}

svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

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

.app-sidebar {
  position: sticky;
  top: 0;
  min-height: 100vh;
  max-height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 16px;
  overflow: auto;
  padding: 18px 14px 14px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(248, 251, 249, 0.94)),
    var(--surface);
  border-right: 1px solid var(--line);
  box-shadow: 12px 0 34px rgba(21, 36, 29, 0.04);
}

.brand-lockup {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 8px;
  border: 1px solid rgba(216, 225, 220, 0.78);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.84);
  box-shadow: var(--shadow-sm);
}

.brand-mark {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: var(--radius);
  background: #ffffff;
  box-shadow: inset 0 0 0 1px var(--line), 0 6px 14px rgba(22, 120, 79, 0.09);
  overflow: hidden;
}

.brand-mark img {
  width: 44px;
  height: 44px;
  object-fit: contain;
}

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

.brand-lockup strong {
  color: var(--green-dark);
  font-size: 14px;
  line-height: 1.18;
}

.brand-lockup span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.25;
  margin-top: 3px;
}

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

.nav-program {
  display: grid;
  gap: 5px;
  padding: 4px;
  border: 1px solid transparent;
  border-radius: var(--radius-lg);
}

.nav-program summary {
  min-height: 38px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 0 11px;
  border-radius: var(--radius);
  color: #43524b;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  cursor: pointer;
  list-style: none;
}

.nav-program summary:hover {
  color: var(--green-dark);
  background: rgba(232, 245, 238, 0.75);
}

.nav-program summary::-webkit-details-marker {
  display: none;
}

.nav-program summary::after {
  content: "";
  width: 7px;
  height: 7px;
  border-right: 1.8px solid currentColor;
  border-bottom: 1.8px solid currentColor;
  transform: rotate(45deg);
  transition: transform 140ms ease;
}

.nav-program[open] summary::after {
  transform: rotate(225deg);
}

.nav-program[open] {
  padding-bottom: 4px;
  border-color: rgba(216, 225, 220, 0.75);
  background: rgba(255, 255, 255, 0.58);
}

.nav-program .nav-item {
  margin-left: 6px;
  width: calc(100% - 6px);
}

.nav-item {
  width: 100%;
  min-height: 42px;
  display: grid;
  grid-template-columns: 24px 1fr;
  gap: 10px;
  align-items: center;
  border: 1px solid transparent;
  border-radius: var(--radius);
  background: transparent;
  color: var(--muted);
  text-align: left;
  padding: 0 10px;
  font-weight: 600;
}

.nav-item:hover {
  color: var(--ink);
  background: #f1f6f3;
  transform: translateX(1px);
}

.nav-item.active {
  color: var(--green-dark);
  border-color: #b8dcc8;
  background: linear-gradient(135deg, #e7f5ee, #f4fbf7);
  box-shadow: inset 3px 0 0 var(--green), var(--shadow-sm);
}

.nav-icon {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  color: currentColor;
}

.sidebar-footer {
  margin-top: auto;
  padding: 12px;
  border: 1px solid rgba(216, 225, 220, 0.82);
  border-radius: var(--radius-lg);
  background: #f4f7fa;
  color: var(--muted);
  font-size: 11px;
  word-break: break-word;
  box-shadow: var(--shadow-sm);
}

.sidebar-footer span {
  display: block;
}

#currentUser {
  color: var(--green-dark);
  font-weight: 650;
  margin-bottom: 8px;
}

.sidebar-logout {
  width: 100%;
  min-height: 38px;
  margin-bottom: 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
  font-weight: 700;
}

.sidebar-logout:hover {
  border-color: var(--line-strong);
  background: #ffffff;
  box-shadow: var(--shadow-sm);
}

.app-main {
  min-width: 0;
  min-height: 100vh;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  min-height: 78px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  padding: 16px 26px;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.85);
}

.topbar h1,
.topbar p {
  margin: 0;
}

.topbar h1 {
  color: #13251c;
  font-size: 25px;
  font-weight: 750;
  letter-spacing: 0;
}

.eyebrow {
  color: var(--green);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.topbar-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.page-root {
  min-width: 0;
  overflow: auto;
  padding: 22px;
  scroll-behavior: smooth;
}

.page-root > * {
  animation: page-enter 180ms ease-out both;
}

@keyframes page-enter {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.login-screen {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 20px;
  overflow: auto;
  background:
    linear-gradient(135deg, rgba(22, 120, 79, 0.14), rgba(37, 99, 169, 0.10)),
    var(--bg);
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(18, 31, 24, 0.32);
  backdrop-filter: blur(8px);
}

.modal-panel {
  width: min(420px, 100%);
  display: grid;
  gap: 16px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: #ffffff;
  box-shadow: 0 24px 70px rgba(13, 29, 21, 0.2);
}

.modal-panel h2 {
  margin: 2px 0 4px;
  color: var(--ink);
  font-size: 22px;
}

.modal-panel span {
  color: var(--muted);
  font-size: 14px;
}

.modal-panel label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.modal-panel input {
  min-height: 44px;
  width: 100%;
  border: 1px solid #cdd8d0;
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  padding: 0 12px;
  font-size: 16px;
}

.print-preview-shell {
  display: grid;
  gap: 14px;
}

.print-preview-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.print-preview-actions h2 {
  margin: 2px 0 0;
  font-size: 18px;
}

.print-preview-frame {
  width: 100%;
  height: calc(100vh - 210px);
  min-height: 560px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: #ffffff;
  box-shadow: var(--shadow);
}

.login-panel {
  width: min(420px, 100%);
  display: grid;
  gap: 14px;
  padding: 30px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--shadow-lg);
}

.signup-panel {
  width: min(520px, 100%);
  margin: auto;
}

.login-panel.is-loading {
  transform: translateY(-2px);
}

.login-panel img {
  width: 68px;
  height: 68px;
  object-fit: contain;
}

.login-panel h1 {
  margin: -6px 0 4px;
  font-size: 26px;
  line-height: 1.12;
  color: #13251c;
}

.login-subtitle {
  margin: -8px 0 4px;
  color: var(--muted);
  font-size: 14px;
}

.login-loader {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--green-dark);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.login-loader span {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--green);
  animation: loading-dot 900ms ease-in-out infinite;
}

.login-loader span:nth-child(2) {
  animation-delay: 120ms;
}

.login-loader span:nth-child(3) {
  animation-delay: 240ms;
}

.login-loader strong {
  margin-left: 4px;
}

.app-loading-overlay {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 22px;
  background: rgba(244, 249, 246, 0.5);
  backdrop-filter: blur(8px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease;
}

.app-loading-overlay.visible {
  opacity: 1;
  pointer-events: auto;
}

.app-loading-panel {
  min-width: 188px;
  display: grid;
  justify-items: center;
  gap: 12px;
  padding: 18px 20px;
  border: 1px solid rgba(205, 220, 211, 0.76);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: var(--shadow-lg);
}

.app-loading-panel strong {
  color: var(--green-dark);
  font-size: 12px;
  text-transform: uppercase;
}

.loading-orbit {
  position: relative;
  width: 46px;
  height: 46px;
  border-radius: 999px;
  background: radial-gradient(circle at center, #ffffff 38%, #dff3e7 40%);
}

.loading-orbit span {
  position: absolute;
  inset: 4px;
  border-radius: inherit;
  border: 3px solid transparent;
  border-top-color: var(--green);
  animation: loading-spin 900ms linear infinite;
}

.loading-orbit span:nth-child(2) {
  inset: 12px;
  border-top-color: #a8ec80;
  animation-duration: 650ms;
  animation-direction: reverse;
}

@keyframes loading-dot {
  0%, 80%, 100% {
    transform: scale(0.72);
    opacity: 0.45;
  }
  40% {
    transform: scale(1);
    opacity: 1;
  }
}

@keyframes loading-spin {
  to {
    transform: rotate(360deg);
  }
}

.login-panel label,
.account-form label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.login-panel input,
.login-panel select,
.account-form input {
  min-height: 44px;
  width: 100%;
  border: 1px solid #cdd8d0;
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  padding: 0 12px;
}

.login-secondary {
  justify-self: center;
}

.signup-limited-note {
  margin: 0;
  padding: 10px 12px;
  border-left: 4px solid #d0a222;
  background: #fff8dd;
  color: #675519;
  font-size: 12px;
  line-height: 1.45;
}

.login-message {
  min-height: 18px;
  margin: 0;
  color: var(--red);
  font-size: 13px;
}

.accounts-layout {
  display: grid;
  grid-template-columns: minmax(260px, 360px) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.account-form {
  display: grid;
  gap: 12px;
}

.checkbox-row {
  grid-template-columns: 18px 1fr;
  align-items: center;
}

.checkbox-row input {
  min-height: auto;
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

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

.account-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-soft);
}

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

.account-request-page,
.account-status-page,
.organization-tree-page {
  display: grid;
  gap: 16px;
}

.account-status-card {
  width: min(720px, 100%);
  margin: 36px auto 0;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
  box-shadow: var(--shadow);
}

.account-status-card h2,
.account-request-heading h2,
.organization-tree-heading h2 {
  margin: 4px 0 8px;
  color: var(--green-dark);
}

.account-status-grid,
.account-approval-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 18px;
}

.account-status-grid > div,
.account-approval-step {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-soft);
}

.account-status-grid span,
.account-approval-step span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.account-status-grid strong,
.account-approval-step strong {
  display: block;
  margin-top: 4px;
}

.account-request-list {
  display: grid;
  gap: 12px;
}

.account-request-card {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(280px, 1.4fr);
  gap: 16px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  box-shadow: var(--shadow);
}

.account-request-summary p,
.organization-position p,
.organization-member p {
  margin: 4px 0 0;
  color: var(--muted);
}

.account-request-actions {
  display: grid;
  gap: 10px;
}

.account-request-actions textarea {
  width: 100%;
  min-height: 70px;
}

.account-request-buttons {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.organization-tree-heading {
  position: relative;
  padding-left: 20px;
}

.organization-tree-heading::before {
  position: absolute;
  inset: 16px auto 16px 0;
  width: 4px;
  border-radius: 999px;
  background: linear-gradient(180deg, #174f86, var(--green));
  content: "";
}

.organization-tree-heading > p:last-child {
  max-width: 820px;
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.org-chart {
  overflow-x: auto;
  border: 1px solid #bfd0dc;
  border-radius: 18px;
  background:
    linear-gradient(rgba(255, 255, 255, 0.88), rgba(255, 255, 255, 0.94)),
    linear-gradient(90deg, rgba(23, 79, 134, 0.045) 1px, transparent 1px),
    linear-gradient(rgba(23, 79, 134, 0.045) 1px, transparent 1px),
    #f5f8fa;
  background-size: auto, 24px 24px, 24px 24px, auto;
  box-shadow: var(--shadow);
}

.org-chart-scroll {
  min-width: 1120px;
  padding: 34px 30px 42px;
}

.org-chart-root {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.org-chart-line {
  width: 3px;
  height: 30px;
  background: #174f86;
}

.org-chart-node {
  position: relative;
  z-index: 1;
  width: 100%;
  min-height: 88px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 13px 15px;
  border: 2px solid #092f55;
  border-radius: 8px;
  background: linear-gradient(155deg, #10283f, #061827);
  color: #fff;
  text-align: center;
  box-shadow: 0 10px 22px rgba(7, 32, 53, 0.16);
}

.org-chart-node > span {
  color: #9fcee5;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  line-height: 1.25;
  text-transform: uppercase;
}

.org-chart-node > strong {
  display: block;
  margin-top: 6px;
  color: #fff;
  font-size: 14px;
  line-height: 1.25;
}

.org-chart-node.is-unit {
  width: 230px;
  min-height: 68px;
  border-color: #0c3961;
  background: #071b2c;
}

.org-chart-node.org-chart-president {
  width: 270px;
}

.org-chart-node.is-compact {
  min-height: 76px;
  padding: 11px 12px;
}

.org-chart-node.is-vacant {
  border-color: #a58429;
  border-style: dashed;
  background: #fffaf0;
  box-shadow: none;
}

.org-chart-node.is-vacant > span {
  color: #765d18;
}

.org-chart-node.is-vacant > strong {
  color: #765d18;
  font-style: italic;
}

.org-chart-account {
  display: inline-flex;
  max-width: 100%;
  margin-top: 8px;
  padding: 3px 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  color: #dceef7;
  font-size: 11px;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.org-chart-account.is-unlinked {
  background: rgba(255, 205, 91, 0.15);
  color: #ffe1a0;
}

.org-chart-split {
  position: relative;
  display: grid;
  grid-template-columns: minmax(720px, 3fr) minmax(280px, 1fr);
  gap: 48px;
  margin-top: 30px;
  padding-top: 48px;
}

.org-chart-split::before {
  position: absolute;
  top: 0;
  right: calc(12.5% - 6px);
  left: calc(37.5% - 18px);
  height: 3px;
  background: #174f86;
  content: "";
}

.org-chart-split::after {
  position: absolute;
  top: -30px;
  left: 50%;
  width: 3px;
  height: 30px;
  background: #174f86;
  content: "";
}

.org-chart-major-branch {
  position: relative;
  min-width: 0;
}

.org-chart-major-branch::before {
  position: absolute;
  top: -48px;
  left: 50%;
  width: 3px;
  height: 48px;
  background: #174f86;
  content: "";
}

.org-chart-major-branch > .org-chart-node {
  width: 280px;
  margin: 0 auto;
}

.org-chart-unit-grid,
.org-chart-admin-units {
  position: relative;
  display: grid;
  gap: 22px;
  margin-top: 46px;
  padding-top: 34px;
}

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

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

.org-chart-unit-grid::before,
.org-chart-admin-units::before {
  position: absolute;
  top: 0;
  right: calc(16.666% - 7px);
  left: calc(16.666% - 7px);
  height: 3px;
  background: #174f86;
  content: "";
}

.org-chart-admin-units::before {
  right: calc(25% - 6px);
  left: calc(25% - 6px);
}

.org-chart-unit-grid::after,
.org-chart-admin-units::after {
  position: absolute;
  top: -46px;
  left: 50%;
  width: 3px;
  height: 46px;
  background: #174f86;
  content: "";
}

.org-chart-unit {
  position: relative;
  min-width: 0;
  padding: 14px;
  border: 1px solid #cad8e1;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.78);
}

.org-chart-unit::before {
  position: absolute;
  top: -34px;
  left: 50%;
  width: 3px;
  height: 34px;
  background: #174f86;
  content: "";
}

.org-chart-unit > h3 {
  margin: 0 0 12px;
  color: #123d66;
  font-size: 13px;
  letter-spacing: 0.07em;
  text-align: center;
  text-transform: uppercase;
}

.org-chart-subordinates {
  position: relative;
  display: grid;
  gap: 20px;
  padding-top: 24px;
  padding-left: 18px;
}

.org-chart-subordinates::before {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 3px;
  background: #174f86;
  content: "";
}

.org-chart-subordinates::after {
  position: absolute;
  top: 0;
  left: 0;
  width: 50%;
  height: 3px;
  background: #174f86;
  content: "";
}

.org-chart-subordinates > .org-chart-node,
.org-chart-subordinates > .org-chart-unit,
.org-chart-subordinates > .org-special-project {
  z-index: 1;
}

.org-chart-subordinates > .org-chart-node::before,
.org-chart-subordinates > .org-chart-unit::before,
.org-chart-subordinates > .org-special-project::before {
  position: absolute;
  top: 50%;
  left: -18px;
  width: 18px;
  height: 3px;
  background: #174f86;
  content: "";
}

.administration-branch > .admin-reporting-lines {
  margin-top: 0;
}

.org-special-project {
  position: relative;
  z-index: 1;
  margin-top: 28px;
  padding: 16px;
  border: 2px solid #bd8c1e;
  border-radius: 12px;
  background: linear-gradient(145deg, #fffdf6, #fff6d8);
  box-shadow: 0 10px 22px rgba(105, 74, 11, 0.12);
}

.org-special-project::before {
  position: absolute;
  top: -30px;
  left: 50%;
  width: 3px;
  height: 28px;
  background: #174f86;
  content: "";
}

.org-special-project > span {
  color: #755712;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.org-special-project h4 {
  margin: 5px 0 4px;
  color: #173c31;
  font-size: 18px;
}

.org-special-project > p {
  margin: 0;
  color: #615c4d;
  font-size: 12px;
  line-height: 1.45;
}

.org-project-leaders {
  display: grid;
  gap: 7px;
  margin-top: 12px;
}

.org-project-leader {
  padding: 9px 10px;
  border: 1px solid rgba(117, 87, 18, 0.26);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.74);
}

.org-project-leader strong,
.org-project-leader span {
  display: block;
}

.org-project-leader strong {
  color: #173c31;
  font-size: 12px;
}

.org-project-leader span {
  margin-top: 2px;
  color: #6e644b;
  font-size: 10px;
  line-height: 1.3;
}

.organization-account-assignments summary {
  cursor: pointer;
  color: var(--green-dark);
  font-weight: 800;
}

.organization-members {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.organization-account-assignments .organization-members {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.organization-member {
  padding: 10px;
  border-left: 3px solid #82ad96;
  background: var(--surface-soft);
}

.organization-member strong {
  color: var(--ink);
}

.organization-vacant {
  color: #886a17 !important;
  font-style: italic;
}

@media (max-width: 760px) {
  .account-request-card,
  .account-status-grid,
  .account-approval-grid {
    grid-template-columns: 1fr;
  }

  .organization-tree-page {
    gap: 12px;
  }

  .org-chart-scroll {
    padding: 26px 24px 34px;
  }
}

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

.action-button,
.icon-button,
.text-button {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow-sm);
}

.action-button {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 15px;
  white-space: nowrap;
  font-weight: 700;
}

.action-button:hover,
.icon-button:hover,
.text-button:hover {
  border-color: var(--line-strong);
  background: #f8fbf9;
  box-shadow: 0 8px 18px rgba(21, 36, 29, 0.08);
}

.action-button:active,
.icon-button:active,
.text-button:active {
  transform: translateY(1px);
}

.action-button.primary,
.primary {
  border-color: var(--green);
  background: linear-gradient(180deg, #1c8458, var(--green));
  color: #ffffff;
}

.action-button.primary:hover,
.primary:hover {
  background: var(--green-dark);
}

.action-button.danger,
.danger {
  border-color: var(--red);
  background: linear-gradient(180deg, #c2382c, var(--red));
  color: #ffffff;
}

.action-button.danger:hover,
.danger:hover {
  background: var(--red-dark);
}

.button-icon,
.search-icon {
  display: grid;
  place-items: center;
}

.icon-button {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  padding: 0;
}

.primary-icon {
  color: #ffffff;
  border-color: var(--green);
  background: var(--green);
}

.text-button {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 12px;
  color: var(--green-dark);
  background: #f7fbf8;
  font-weight: 700;
}

.coming-soon-page {
  min-height: calc(100vh - 140px);
  display: grid;
  align-content: center;
  justify-items: start;
  gap: 12px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background:
    linear-gradient(135deg, rgba(22, 120, 79, 0.11), rgba(37, 99, 169, 0.08)),
    var(--surface);
  box-shadow: var(--shadow);
}

.coming-soon-mark {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border-radius: var(--radius);
  color: var(--green-dark);
  background: #eaf6ef;
}

.coming-soon-mark svg {
  width: 28px;
  height: 28px;
}

.coming-soon-page h2 {
  max-width: 820px;
  margin: 0;
  font-size: clamp(26px, 4vw, 42px);
  line-height: 1.08;
}

.coming-soon-page > strong {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  padding: 0 12px;
  border: 1px solid #cfe0d4;
  border-radius: 999px;
  color: var(--green-dark);
  background: #eef8f1;
}

.coming-soon-page p {
  max-width: 720px;
  margin: 0;
  color: var(--muted);
}

.coming-soon-note {
  max-width: 760px;
  margin-top: 8px;
  padding: 12px;
  border: 1px solid #d8e2dd;
  border-radius: var(--radius);
  color: #42524a;
  background: rgba(255, 255, 255, 0.78);
}

.record-card:hover,
.bin-record:hover,
.bin-preview-row:hover {
  border-color: var(--line-strong);
  box-shadow: var(--shadow-lg);
  transform: translateY(-1px);
}

.split-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(280px, 0.8fr);
  gap: 16px;
  margin-top: 16px;
}

.analytics-summary,
.database-analytics,
.monitoring-overview {
  margin-top: 16px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.98) 0%, rgba(247, 250, 248, 0.96) 52%, rgba(248, 251, 255, 0.98) 100%);
  box-shadow: var(--shadow);
}

.database-analytics {
  margin-bottom: 14px;
}

.analytics-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.analytics-title-row h3,
.analytics-card h4 {
  margin: 0;
}

.analytics-title-row h3 {
  font-size: 19px;
}

.analytics-eyebrow {
  display: block;
  margin-bottom: 3px;
  color: var(--green-dark);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

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

.analytics-kpi-grid,
.analytics-preview-grid,
.analytics-chart-grid {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

.analytics-kpi-grid {
  grid-template-columns: repeat(4, minmax(150px, 1fr));
}

.analytics-kpi-grid.detailed {
  grid-template-columns: repeat(6, minmax(132px, 1fr));
}

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

.analytics-chart-grid {
  grid-template-columns: repeat(3, minmax(240px, 1fr));
}

.analytics-kpi {
  min-width: 0;
  min-height: 112px;
  display: grid;
  align-content: space-between;
  gap: 8px;
  padding: 14px;
  border: 1px solid #d7e2dc;
  border-left: 4px solid var(--green);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.88);
  box-shadow: var(--shadow-sm);
}

.analytics-kpi.blue {
  border-left-color: var(--blue);
}

.analytics-kpi.amber {
  border-left-color: var(--amber);
}

.analytics-kpi.violet {
  border-left-color: var(--violet);
}

.analytics-kpi.red {
  border-left-color: var(--red);
}

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

.analytics-kpi strong {
  color: var(--ink);
  font-size: 23px;
  line-height: 1.12;
  overflow-wrap: anywhere;
}

.analytics-card {
  min-width: 0;
  min-height: 238px;
  padding: 14px;
  border: 1px solid #d8e2dd;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow-sm);
}

.analytics-card.wide {
  grid-column: span 2;
}

.analytics-card-head {
  min-height: 42px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
  margin-bottom: 10px;
}

.analytics-card-title {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.analytics-card-body {
  min-width: 0;
}

.chart-copy-button {
  width: 40px;
  height: 40px;
  border-color: transparent;
  border-radius: 999px;
  color: var(--green-dark);
  background: rgba(229, 244, 235, 0.82);
  box-shadow: none;
}

.chart-copy-button:hover {
  border-color: rgba(31, 122, 79, 0.18);
  color: #ffffff;
  background: var(--green);
  box-shadow: none;
}

.chart-copy-button:disabled {
  cursor: wait;
  opacity: 0.72;
}

.chart-copy-button.is-copying svg {
  animation: chart-copy-pulse 720ms ease-in-out infinite alternate;
}

.analytics-card h4 {
  font-size: 15px;
}

.analytics-empty {
  display: grid;
  place-items: center;
  min-height: 72px;
  border: 1px dashed #cbd8cf;
  border-radius: var(--radius);
  color: var(--muted);
  background: #fbfcfd;
  font-size: 13px;
}

.bar-list {
  display: grid;
  gap: 11px;
}

.bar-row {
  display: grid;
  gap: 5px;
}

.bar-row-meta {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  font-size: 12px;
}

.bar-row-meta span {
  min-width: 0;
  overflow: hidden;
  color: var(--ink);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bar-row-meta strong {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 12px;
}

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

.bar-track span {
  display: block;
  min-width: 4px;
  height: 100%;
  border-radius: inherit;
}

.donut-wrap {
  min-height: 154px;
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}

.donut-frame {
  position: relative;
  width: 150px;
  height: 150px;
}

.donut-chart {
  width: 150px;
  height: 150px;
  transform: rotate(-90deg);
}

.donut-bg,
.donut-segment {
  fill: none;
  stroke-width: 5;
}

.donut-bg {
  stroke: #edf2ef;
}

.donut-segment {
  transition: stroke-dasharray 160ms ease;
}

.donut-center {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  text-align: center;
}

.donut-center strong {
  color: var(--green-dark);
  font-size: 28px;
  line-height: 1;
}

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

.chart-legend {
  display: grid;
  gap: 8px;
}

.chart-legend div {
  display: grid;
  grid-template-columns: 12px minmax(0, 1fr) auto;
  gap: 7px;
  align-items: center;
  font-size: 12px;
}

.legend-swatch {
  width: 10px;
  height: 10px;
  border-radius: 999px;
}

.chart-legend strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chart-legend em {
  color: var(--muted);
  font-style: normal;
}

.stacked-analytics {
  display: grid;
  gap: 16px;
}

.stacked-analytics > div > span {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

@keyframes chart-copy-pulse {
  from { opacity: 0.42; transform: scale(0.88); }
  to { opacity: 1; transform: scale(1); }
}

.flow-analytics {
  margin-top: 20px;
  margin-bottom: 24px;
  padding: 6px 0 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.flow-analytics .analytics-title-row {
  padding: 2px 8px 18px;
  border-bottom: 1px solid rgba(13, 86, 55, 0.12);
}

.flow-analytics .analytics-title-row h3 {
  font-size: 24px;
  line-height: 1.2;
}

.flow-analytics .analytics-note {
  padding: 7px 12px;
  border-left: 2px solid rgba(13, 86, 55, 0.18);
}

.nutrition-growth-analytics-scope {
  display: flex;
  align-items: end;
  justify-content: flex-end;
  gap: 12px;
}

.nutrition-growth-period-controls {
  display: flex;
  align-items: end;
  gap: 8px;
}

.nutrition-growth-period-controls label {
  display: grid;
  gap: 4px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.nutrition-growth-period-controls select {
  min-width: 104px;
  height: 38px;
  border: 1px solid rgba(13, 86, 55, 0.2);
  border-radius: 6px;
  background: #ffffff;
  color: var(--ink);
  padding: 0 30px 0 10px;
  font-size: 13px;
  font-weight: 700;
}

.nutrition-growth-period-controls label:last-child select {
  min-width: 142px;
}

.nutrition-growth-analytics-loading {
  display: flex;
  min-height: 178px;
  align-items: center;
  justify-content: center;
  gap: 18px;
  margin-top: 18px;
  border-top: 1px solid rgba(13, 86, 55, 0.08);
  border-bottom: 1px solid rgba(13, 86, 55, 0.08);
  background: linear-gradient(90deg, transparent, rgba(232, 244, 237, 0.62), transparent);
  color: var(--muted);
}

.nutrition-growth-analytics-loading .loading-orbit {
  flex: 0 0 auto;
}

.nutrition-growth-analytics-loading strong {
  display: block;
  color: var(--ink);
  font-size: 15px;
}

.nutrition-growth-analytics-loading p {
  margin: 4px 0 0;
  font-size: 13px;
}

.flow-analytics .analytics-signal-strip {
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 0;
  margin-top: 18px;
  padding: 10px 16px;
  border: 1px solid rgba(13, 86, 55, 0.12);
  border-radius: 30px 72px 34px 48px;
  background:
    radial-gradient(circle at 88% 14%, rgba(155, 232, 125, 0.22), transparent 24%),
    linear-gradient(115deg, #0d5637, #116a47 72%, #174f3b);
  box-shadow: 0 18px 42px rgba(13, 86, 55, 0.16);
}

.flow-analytics .analytics-signal-strip.four-signals {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.flow-analytics .analytics-kpi {
  min-height: 94px;
  padding: 12px 18px;
  border: 0;
  border-right: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.flow-analytics .analytics-kpi:last-child {
  border-right: 0;
}

.flow-analytics .analytics-kpi span,
.flow-analytics .analytics-kpi em {
  color: rgba(255, 255, 255, 0.7);
}

.flow-analytics .analytics-kpi strong {
  color: #ffffff;
  font-size: 24px;
}

.flow-analytics .flow-chart-grid {
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 18px;
  margin-top: 20px;
}

.flow-analytics .analytics-card {
  grid-column: span 6;
  min-height: 252px;
  padding: 20px 22px;
  overflow: hidden;
  border-color: rgba(205, 220, 211, 0.7);
  border-radius: 34px 62px 36px 48px;
  background:
    radial-gradient(circle at 94% 10%, rgba(155, 232, 125, 0.14), transparent 24%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.96), rgba(241, 249, 244, 0.82));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.98),
    0 16px 36px rgba(21, 36, 29, 0.07);
}

.flow-analytics .analytics-card:nth-child(even) {
  border-radius: 58px 32px 52px 36px;
  background:
    radial-gradient(circle at 8% 12%, rgba(63, 136, 197, 0.1), transparent 24%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.96), rgba(244, 249, 252, 0.84));
}

.flow-analytics .analytics-card-head {
  min-height: 54px;
  margin: 0 0 18px;
  padding: 2px 4px 14px;
  border-bottom: 1px solid rgba(13, 86, 55, 0.1);
}

.flow-analytics .analytics-card h4 {
  color: #0d5637;
  font-size: 17px;
}

.database-flow-analytics .analytics-card:nth-child(1),
.database-flow-analytics .analytics-card:nth-child(4),
.database-flow-analytics .analytics-card:nth-child(5),
.database-flow-analytics .analytics-card:nth-child(7) {
  grid-column: span 7;
}

.database-flow-analytics .analytics-card:nth-child(2),
.database-flow-analytics .analytics-card:nth-child(3),
.database-flow-analytics .analytics-card:nth-child(6),
.database-flow-analytics .analytics-card:nth-child(8) {
  grid-column: span 5;
}

.database-flow-analytics .analytics-card:nth-child(n+9) {
  grid-column: span 4;
}

.nutrition-flow-analytics .analytics-card:nth-child(1) {
  grid-column: span 7;
}

.nutrition-flow-analytics .analytics-card:nth-child(2) {
  grid-column: span 5;
}

.nutrition-flow-analytics .analytics-card:nth-child(n+3) {
  grid-column: span 6;
}

.monitoring-flow-analytics .analytics-card:nth-child(1) {
  grid-column: span 7;
}

.monitoring-flow-analytics .analytics-card:nth-child(2) {
  grid-column: span 5;
}

.monitoring-flow-analytics .finance-summary {
  gap: 0;
}

.monitoring-flow-analytics .finance-summary div {
  padding: 15px 4px;
  border: 0;
  border-bottom: 1px solid rgba(13, 86, 55, 0.1);
  border-radius: 0;
  background: transparent;
}

.monitoring-flow-analytics .finance-summary div:last-child {
  border-bottom: 0;
}

.database-page.flow-data-section,
.monitoring-page.flow-data-section {
  --flow-data-padding: clamp(18px, 2.2vw, 26px);
  position: relative;
  margin-top: 30px;
  padding: var(--flow-data-padding);
  overflow: hidden;
  border: 1px solid rgba(205, 220, 211, 0.72);
  border-radius: 44px 28px 52px 32px;
  background: linear-gradient(145deg, rgba(248, 252, 249, 0.98), rgba(241, 248, 251, 0.88));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.98),
    0 18px 42px rgba(21, 36, 29, 0.07);
}

.flow-data-section .table-toolbar {
  position: relative;
  z-index: 1;
  padding: 4px 4px 20px;
  border-bottom: 1px solid rgba(13, 86, 55, 0.12);
  background: transparent;
}

.flow-data-section .table-toolbar .search-band {
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid rgba(205, 220, 211, 0.78);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.96);
}

.flow-data-section .database-table-host,
.flow-data-section .monitoring-list-host {
  position: relative;
  z-index: 1;
  margin-top: 18px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 14px 34px rgba(21, 36, 29, 0.07);
}

.finance-summary {
  display: grid;
  gap: 10px;
}

.finance-summary div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 10px;
  border: 1px solid #d8e2dd;
  border-radius: var(--radius);
  background: #fbfcfd;
}

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

.finance-summary strong {
  color: var(--green-dark);
  font-size: 15px;
}

.dashboard-copyright {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  align-items: center;
  justify-content: center;
  margin-top: 16px;
  padding: 12px 10px;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}

.dashboard-copyright span:not(:last-child)::after {
  content: "";
  width: 4px;
  height: 4px;
  display: inline-block;
  margin-left: 14px;
  border-radius: 999px;
  background: #c3ccc5;
  vertical-align: middle;
}

.dashboard-page {
  display: grid;
  gap: 26px;
  min-height: calc(100vh - 124px);
  margin: -4px;
  padding: 24px;
  border-radius: 24px;
  background:
    linear-gradient(135deg, rgba(232, 245, 238, 0.86), rgba(255, 255, 255, 0.96) 48%, rgba(234, 241, 251, 0.52)),
    #f8fbf9;
}

.dashboard-intro {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(360px, 1.05fr);
  gap: 28px;
  align-items: end;
  padding: 2px 2px 4px;
}

.dashboard-intro-copy h2 {
  margin: 4px 0 8px;
  color: #0e2a1e;
  font-size: clamp(28px, 4vw, 46px);
  line-height: 1.02;
  font-weight: 850;
}

.dashboard-intro-copy span {
  display: block;
  max-width: 560px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.6;
}

.dashboard-metrics-strip {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  overflow: hidden;
  border: 1px solid rgba(205, 220, 211, 0.78);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.94), var(--shadow-sm);
}

.dashboard-metric {
  min-width: 0;
  display: grid;
  gap: 4px;
  padding: 13px 14px;
  border: 0;
  border-right: 1px solid var(--line);
  border-radius: 0;
  background: rgba(255, 255, 255, 0.24);
  color: inherit;
  text-align: left;
}

.dashboard-metric:last-child {
  border-right: 0;
}

.dashboard-metric:hover {
  background: #eff9f3;
}

.dashboard-metric strong {
  color: #0d5637;
  font-size: 26px;
  line-height: 1;
  font-weight: 850;
  font-variant-numeric: tabular-nums;
}

.dashboard-metric span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  line-height: 1.25;
  text-transform: uppercase;
}

.dashboard-metric em {
  overflow: hidden;
  color: #7a8881;
  font-size: 11px;
  font-style: normal;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-metric.is-summary-only:hover {
  background: rgba(255, 255, 255, 0.24);
}

.dashboard-authority-list {
  display: grid;
  align-content: start;
}

.dashboard-authority-row {
  display: grid;
  gap: 4px;
  padding: 15px 2px;
  border-bottom: 1px solid var(--line);
}

.dashboard-authority-row:last-child {
  border-bottom: 0;
}

.dashboard-authority-row strong {
  color: #173f2d;
  font-size: 14px;
}

.dashboard-authority-row span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
  text-transform: capitalize;
}

.dashboard-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
  gap: 34px;
  align-items: start;
}

.dashboard-actions-panel,
.dashboard-activity-panel {
  min-width: 0;
}

.dashboard-section-heading {
  min-height: 38px;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 8px;
}

.dashboard-section-heading h3 {
  margin: 0;
  color: #0e2a1e;
  font-size: 17px;
}

.dashboard-section-heading span,
.dashboard-section-heading .text-button {
  color: var(--muted);
  font-size: 13px;
}

.dashboard-command-list,
.recent-update-list {
  display: grid;
  overflow: hidden;
  border: 1px solid rgba(205, 220, 211, 0.72);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.74);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.95);
}

.dashboard-command,
.recent-update-row {
  width: 100%;
  display: grid;
  align-items: center;
  gap: 14px;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  color: inherit;
  text-align: left;
}

.dashboard-command {
  grid-template-columns: 40px minmax(0, 1fr) 24px;
  min-height: 64px;
  padding: 10px 14px;
}

.dashboard-command:last-child,
.recent-update-row:last-child {
  border-bottom: 0;
}

.dashboard-command:hover,
.recent-update-row:hover {
  background: linear-gradient(90deg, rgba(31, 122, 79, 0.09), rgba(255, 255, 255, 0.42));
}

.dashboard-command-icon {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #0d5637;
  background: #ddf2e5;
}

.dashboard-command strong,
.recent-update-row strong {
  display: block;
  color: var(--ink);
  font-size: 14px;
  line-height: 1.25;
}

.dashboard-command em,
.recent-update-row span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  line-height: 1.35;
}

.dashboard-command i,
.recent-update-row i {
  display: grid;
  place-items: center;
  color: #6a766f;
}

.recent-update-row {
  grid-template-columns: minmax(0, 1fr) auto 24px;
  min-height: 58px;
  padding: 10px 14px;
}

.recent-update-row time {
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.scroll-reveal {
  opacity: 0;
  transform: translateY(18px);
  transition:
    opacity 520ms ease,
    transform 520ms cubic-bezier(0.2, 0.7, 0.2, 1);
}

.scroll-reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@keyframes dashboard-scroll-rise {
  from {
    opacity: 0;
    filter: blur(4px);
    transform: translateY(28px) scale(0.985);
  }
  to {
    opacity: 1;
    filter: blur(0);
    transform: translateY(0) scale(1);
  }
}

@keyframes dashboard-scroll-soften {
  from {
    opacity: 0.45;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@supports (animation-timeline: view()) {
  .scroll-reveal {
    opacity: 1;
    transform: none;
    transition: none;
    animation-name: dashboard-scroll-rise;
    animation-duration: 1s;
    animation-fill-mode: both;
    animation-timing-function: linear;
    animation-timeline: view();
    animation-range: entry 0% cover 34%;
  }

  .dashboard-command,
  .recent-update-row,
  .dashboard-metric,
  .analytics-shape {
    animation-name: dashboard-scroll-soften;
    animation-duration: 1s;
    animation-fill-mode: both;
    animation-timing-function: linear;
    animation-timeline: view();
    animation-range: entry 0% cover 24%;
  }
}

.dashboard-analytics-section {
  display: grid;
  gap: 12px;
  padding-top: 8px;
}

.dashboard-analytics-loading,
.dashboard-analytics-content,
.dashboard-analytics-error {
  min-height: 292px;
  overflow: hidden;
  border: 1px solid rgba(205, 220, 211, 0.72);
  border-radius: 30px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.86), rgba(239, 248, 243, 0.74));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.95),
    0 20px 54px rgba(21, 36, 29, 0.08);
}

.dashboard-analytics-loading {
  display: grid;
  grid-template-columns: 1.25fr 1fr 1fr;
  gap: 12px;
  padding: 14px;
}

.analytics-skeleton {
  min-height: 238px;
  border-radius: 18px;
  background:
    linear-gradient(90deg, rgba(232, 245, 238, 0.74), rgba(255, 255, 255, 0.96), rgba(232, 245, 238, 0.74));
  background-size: 220% 100%;
  animation: skeleton-sheen 1.15s ease-in-out infinite;
}

.analytics-skeleton.wide {
  min-height: 258px;
}

.dashboard-analytics-content {
  display: grid;
  gap: 0;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 260ms ease, transform 260ms ease;
}

.dashboard-analytics-content.is-ready {
  opacity: 1;
  transform: translateY(0);
}

.dashboard-analytics-landscape {
  position: relative;
  isolation: isolate;
  min-height: 760px;
  padding: 20px;
  display: grid;
  grid-template-columns: minmax(206px, 0.56fr) minmax(380px, 1.14fr) minmax(310px, 0.96fr);
  grid-template-rows: minmax(286px, auto) minmax(238px, auto) minmax(210px, auto);
  grid-template-areas:
    "stats growth month"
    "stats growth groups"
    "status status status";
  gap: 18px;
  background:
    radial-gradient(circle at 14% 20%, rgba(155, 232, 125, 0.24), transparent 28%),
    radial-gradient(circle at 84% 12%, rgba(63, 136, 197, 0.14), transparent 24%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.82), rgba(231, 244, 236, 0.62));
}

.dashboard-analytics-landscape::before {
  content: "";
  position: absolute;
  inset: 18px 22px auto auto;
  width: 150px;
  height: 150px;
  border: 1px solid rgba(13, 86, 55, 0.12);
  border-radius: 52px 86px 58px 92px;
  opacity: 0.65;
  pointer-events: none;
}

.analytics-ribbon {
  grid-area: stats;
  display: flex;
  flex-direction: column;
  gap: 0;
  align-items: stretch;
  justify-content: center;
  padding: 18px 16px;
  border: 1px solid rgba(205, 220, 211, 0.7);
  border-radius: 30px 70px 34px 48px;
  background:
    radial-gradient(circle at 18% 16%, rgba(155, 232, 125, 0.22), transparent 34%),
    linear-gradient(180deg, rgba(13, 86, 55, 0.98), rgba(10, 70, 47, 0.92)),
    var(--green-dark);
  box-shadow: 0 18px 48px rgba(13, 86, 55, 0.17);
}

.dashboard-analytics-stat {
  min-height: 88px;
  flex: 0 0 auto;
  display: grid;
  gap: 5px;
  align-content: center;
  padding: 13px 4px;
  border: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
  background: transparent;
}

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

.dashboard-analytics-stat span {
  color: rgba(255, 255, 255, 0.72);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.dashboard-analytics-stat strong {
  color: #ffffff;
  font-size: 25px;
  line-height: 1.06;
  overflow-wrap: anywhere;
}

.dashboard-analytics-stat em {
  color: rgba(255, 255, 255, 0.68);
  font-size: 12px;
  font-style: normal;
}

.analytics-shape {
  position: relative;
  min-width: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 16px;
  overflow: hidden;
  padding: 24px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.88), rgba(247, 251, 248, 0.72));
  border: 1px solid rgba(205, 220, 211, 0.66);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.96),
    0 16px 36px rgba(21, 36, 29, 0.065);
}

.analytics-shape::after {
  content: "";
  position: absolute;
  width: 86px;
  height: 86px;
  right: -34px;
  top: -34px;
  border-radius: 999px;
  background: rgba(155, 232, 125, 0.14);
  pointer-events: none;
}

.growth-pulse {
  grid-area: growth;
  border-radius: 40px 76px 42px 62px;
  background:
    radial-gradient(circle at 12% 94%, rgba(63, 136, 197, 0.12), transparent 28%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.9), rgba(239, 249, 243, 0.72));
}

.month-flow {
  grid-area: month;
  border-radius: 32px 54px 32px 68px;
  background:
    radial-gradient(circle at 88% 12%, rgba(248, 200, 76, 0.18), transparent 30%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.9), rgba(247, 250, 253, 0.78));
}

.group-current {
  grid-area: groups;
  border-radius: 68px 32px 52px 34px;
  background:
    radial-gradient(circle at 8% 12%, rgba(37, 99, 169, 0.1), transparent 30%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.9), rgba(246, 250, 248, 0.78));
}

.status-stream {
  grid-area: status;
  min-height: 210px;
  border-radius: 36px 78px 38px 54px;
  background:
    linear-gradient(115deg, rgba(255, 255, 255, 0.9), rgba(239, 248, 243, 0.64) 58%, rgba(234, 241, 251, 0.7));
}

.analytics-shape-heading {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  min-height: 42px;
  padding: 2px 6px 14px;
  border-bottom: 1px solid rgba(13, 86, 55, 0.1);
}

.analytics-shape-heading span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.35;
  text-transform: uppercase;
}

.analytics-shape-heading strong {
  max-width: 58%;
  color: #0d5637;
  font-size: 15px;
  line-height: 1.3;
  text-align: right;
  overflow-wrap: anywhere;
}

.analytics-shape-insight {
  min-width: 0;
  max-width: 66%;
  display: flex;
  gap: 8px;
  align-items: flex-start;
  justify-content: flex-end;
}

.analytics-shape-insight strong {
  max-width: none;
}

.analytics-shape-insight .chart-copy-button {
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  margin-top: -7px;
}

.vega-chart {
  position: relative;
  z-index: 1;
  min-width: 0;
  display: grid;
  align-items: stretch;
  box-sizing: border-box;
  min-height: 164px;
  padding: 4px 6px 2px;
}

.growth-pulse .vega-chart {
  min-height: 446px;
}

.month-flow .vega-chart {
  min-height: 196px;
}

.group-current .vega-chart,
.status-stream .vega-chart {
  min-height: 184px;
}

.vega-chart .vega-embed {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}

.vega-chart .vega-embed > div,
.vega-chart .chart-wrapper {
  width: 100%;
  height: 100%;
}

.vega-chart .chart-wrapper,
.vega-chart svg,
.vega-chart canvas {
  display: block;
  width: 100%;
  height: 100%;
  max-width: 100%;
}

.vega-chart svg {
  fill: initial;
  stroke: initial;
  stroke-width: initial;
  stroke-linecap: initial;
  stroke-linejoin: initial;
}

.dashboard-analytics-error {
  display: grid;
  align-content: center;
  justify-items: start;
  gap: 8px;
  padding: 18px;
}

.dashboard-analytics-error strong {
  color: var(--red);
}

.dashboard-analytics-error span {
  color: var(--muted);
}

@keyframes skeleton-sheen {
  0% {
    background-position: 100% 0;
  }
  100% {
    background-position: -100% 0;
  }
}

.system-tools-page {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
  gap: 14px;
}

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

.dashboard-summary-row {
  width: 100%;
  display: grid;
  align-items: center;
  gap: 12px;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfdfc;
  color: inherit;
  text-align: left;
}

.dashboard-summary-row {
  grid-template-columns: minmax(0, 1fr) auto;
}

.dashboard-summary-row:hover,
.system-tools-page .recent-update-row:hover {
  border-color: #bdd3c6;
  background: #f5faf7;
}

.dashboard-summary-row strong {
  display: block;
  color: var(--ink);
  font-size: 14px;
  line-height: 1.25;
}

.dashboard-summary-row span {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
}

.dashboard-summary-row em {
  color: var(--green-dark);
  font-size: 22px;
  font-style: normal;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.system-tool-copy {
  max-width: 620px;
  margin: 0 0 14px;
  color: var(--muted);
  line-height: 1.6;
}

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

.tool-panel,
.search-page,
.database-page,
.monitoring-page {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.tool-panel {
  padding: 16px;
}

.panel-title-row {
  min-height: 38px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.panel-title-row h3 {
  margin: 0;
  font-size: 16px;
}

.panel-title-row span {
  color: var(--muted);
  font-size: 13px;
}

.record-stack,
.bin-list-modern,
.bin-preview {
  display: grid;
  gap: 8px;
}

.record-stack.spacious {
  padding: 14px;
}

.record-card {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) auto;
  gap: 11px;
  align-items: center;
  min-height: 62px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fcfdfc;
}

.record-card:hover {
  background: #f8fbf9;
}

.avatar {
  width: 46px;
  height: 46px;
  border-radius: var(--radius);
  object-fit: cover;
}

.avatar-fallback {
  display: grid;
  place-items: center;
  color: var(--green-dark);
  background: #e7f4ec;
  font-weight: 700;
}

.record-card-body {
  min-width: 0;
}

.record-card-body strong,
.record-card-body span,
.bin-preview-row strong,
.bin-preview-row span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.record-card-body span,
.bin-preview-row span {
  color: var(--muted);
  font-size: 12px;
}

.record-card-actions,
.table-actions {
  display: flex;
  gap: 6px;
}

.bin-preview-row {
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfcfd;
}

.empty-state {
  padding: 26px 14px;
  color: var(--muted);
  text-align: center;
}

.search-page {
  overflow: hidden;
}

.search-band {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 16px;
  border-bottom: 1px solid var(--line);
  background: #fbfcfd;
}

.search-band.compact {
  border: 0;
  padding: 0;
  background: transparent;
}

.search-band.with-button {
  grid-template-columns: 32px minmax(0, 1fr) auto;
}

.search-icon {
  width: 32px;
  height: 32px;
  color: var(--green);
  border-radius: var(--radius);
  background: #eaf6ef;
}

input,
select,
textarea {
  width: 100%;
  min-width: 0;
  min-height: 40px;
  border: 1px solid #ccd8d2;
  border-radius: var(--radius);
  background: #ffffff;
  color: var(--ink);
  padding: 8px 10px;
  box-shadow: inset 0 1px 0 rgba(17, 24, 39, 0.02);
}

textarea {
  resize: vertical;
  min-height: 76px;
}

input:focus,
select:focus,
textarea:focus {
  outline: 0;
  border-color: var(--green);
  box-shadow: var(--ring);
}

input[data-capitalize="words"],
textarea[data-capitalize="words"] {
  text-transform: capitalize;
}

.application-paper {
  max-width: 1180px;
  margin: 0 auto;
  border: 1px solid #cbd8cf;
  border-radius: var(--radius-lg);
  background: #ffffff;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.form-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 154px;
  gap: 18px;
  align-items: start;
  padding: 24px;
  background:
    linear-gradient(90deg, rgba(22, 120, 79, 0.12), rgba(37, 99, 169, 0.05)),
    #ffffff;
  border-bottom: 2px solid var(--green);
}

.form-heading h2,
.form-heading h3,
.form-heading p {
  margin: 0;
}

.form-heading h2 {
  color: #13251c;
  font-size: 21px;
  line-height: 1.15;
}

.form-heading p {
  margin: 4px 0 18px;
  color: var(--muted);
}

.form-heading h3 {
  width: fit-content;
  padding: 8px 12px;
  border-radius: var(--radius);
  color: #ffffff;
  background: var(--green);
  font-size: 15px;
}

.monitoring-page {
  margin-top: 14px;
  overflow: hidden;
}

.monitoring-list-host {
  min-height: 220px;
}

.monitoring-table {
  min-width: 1080px;
}

.nutrition-table {
  min-width: 1320px;
}

.nutrition-center-table {
  min-width: 1120px;
}

.nutrition-center-linked-table {
  min-width: 900px;
}

.nutrition-household-table {
  min-width: 720px;
}

.monitoring-paper {
  max-width: 1240px;
}

.nutrition-paper {
  max-width: 1240px;
}

.nutrition-form-heading {
  grid-template-columns: minmax(0, 1fr) 220px;
}

.nutrition-form-heading .photo-box {
  width: min(220px, 100%);
  aspect-ratio: 3 / 4;
  justify-self: end;
}

.ocr-status-panel {
  display: grid;
  gap: 10px;
  padding: 12px 22px;
  border-bottom: 1px solid var(--line);
  background: #fbfcfd;
}

.ocr-status-panel[hidden] {
  display: none;
}

.ocr-status-row {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
}

.ocr-status-row strong,
.ocr-status-row span {
  display: block;
}

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

.ocr-status-panel details {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.ocr-status-panel summary {
  cursor: pointer;
  padding: 8px 10px;
  color: var(--green-dark);
  font-size: 13px;
  font-weight: 700;
}

.ocr-status-panel pre {
  max-height: 180px;
  overflow: auto;
  margin: 0;
  padding: 10px;
  border-top: 1px solid var(--line);
  color: #405047;
  white-space: pre-wrap;
}

.monitoring-heading {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  padding: 24px;
  border-bottom: 2px solid var(--green);
  background:
    linear-gradient(90deg, rgba(22, 120, 79, 0.12), rgba(37, 99, 169, 0.05)),
    #ffffff;
}

.monitoring-heading img {
  width: 54px;
  height: 54px;
  object-fit: contain;
}

.monitoring-heading h2,
.monitoring-heading h3 {
  margin: 0;
}

.monitoring-heading h2 {
  color: #143d33;
  font-size: 20px;
}

.monitoring-heading h3 {
  margin-top: 3px;
  color: var(--green-dark);
  font-size: 16px;
}

.monitoring-identity-grid,
.income-grid,
.signature-grid {
  display: grid;
  gap: 12px;
}

.monitoring-identity-grid {
  grid-template-columns: repeat(4, minmax(160px, 1fr));
  padding: 18px 22px 6px;
}

.monitoring-identity-grid .wide {
  grid-column: span 2;
}

.monitoring-entry-section .family-section-header {
  margin-bottom: 8px;
}

.compact-action {
  min-height: 34px;
  padding: 0 10px;
  font-size: 13px;
}

.monitoring-table-wrap {
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.monitoring-entry-table {
  min-width: 980px;
}

.monitoring-entry-table th,
.monitoring-entry-table td {
  background: #ffffff;
}

.monitoring-entry-table th {
  background: #eef7f1;
}

.monitoring-entry-table input {
  min-width: 112px;
}

.row-remove-head,
.row-remove-cell {
  width: 54px;
  min-width: 54px;
  text-align: center;
}

.row-remove-cell .icon-button {
  margin: 0 auto;
}

.monitoring-empty-row td {
  height: 54px;
  color: var(--muted);
  text-align: center;
  background: #fbfcfd;
}

.income-grid {
  grid-template-columns: repeat(4, minmax(160px, 1fr));
}

.strong-value {
  color: var(--green-dark);
  font-weight: 800;
}

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

.signature-grid > div {
  display: grid;
  gap: 10px;
}

.signature-grid h3 {
  margin-bottom: 0;
}

.photo-box {
  position: relative;
  width: 154px;
  aspect-ratio: 1 / 1;
  display: grid;
  place-items: center;
  border: 1px solid #cbd8cf;
  border-radius: var(--radius);
  background: #f4f7f5;
  color: var(--muted);
  overflow: hidden;
  transition: border-color 160ms ease, background-color 160ms ease, box-shadow 160ms ease;
}

.photo-preview {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
}

.photo-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.editable-photo.drag-over {
  border-color: var(--green);
  background: #eaf6ef;
  box-shadow: 0 0 0 3px rgba(31, 122, 79, 0.16);
}

.photo-actions {
  position: absolute;
  left: 6px;
  right: 6px;
  bottom: 6px;
  display: flex;
  gap: 6px;
  justify-content: center;
}

.photo-choose-button {
  min-width: 80px;
  background: rgba(255, 255, 255, 0.9);
}

.photo-remove-button {
  color: #ffffff;
  border-color: var(--red);
  background: var(--red);
}

.photo-remove-button:hover {
  background: var(--red-dark);
}

.photo-remove-button[hidden],
.editable-photo:not(.has-photo) .photo-remove-button {
  display: none;
}

.editable-photo input[type="file"] {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.record-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(180px, 1fr));
  gap: 12px;
  padding: 16px 22px;
  background: #f9fbfa;
  border-bottom: 1px solid var(--line);
}

.paper-section {
  padding: 18px 22px;
  border-bottom: 1px solid var(--line);
}

.paper-section h3 {
  margin: 0 0 12px;
  padding: 9px 11px;
  border-left: 4px solid var(--green);
  border-radius: var(--radius);
  background: #edf7f0;
  color: #17251d;
  font-size: 15px;
  font-weight: 800;
}

.family-section-header {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.family-section-header h3 {
  flex: 1;
}

.family-add-button {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  color: var(--green-dark);
  background: #eaf6ef;
  border-color: #bee0ca;
}

.family-add-button:hover {
  background: #dff0e6;
  border-color: #8fc7a7;
}

.paper-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(170px, 1fr));
  gap: 12px;
}

.nutrition-field-groups {
  display: grid;
  gap: 14px;
}

.nutrition-field-group {
  padding: 12px;
  border: 1px solid #d8e2dd;
  border-radius: 8px;
  background: #fbfcfd;
}

.nutrition-field-group h4 {
  margin: 0 0 10px;
  color: var(--green-dark);
  font-size: 13px;
}

.paper-field {
  min-width: 0;
}

.paper-field.wide {
  grid-column: 1 / -1;
}

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

.display-value {
  min-height: 40px;
  padding: 8px 9px;
  border: 1px solid #dce5df;
  border-radius: var(--radius);
  background: #fbfcfd;
  line-height: 1.35;
  word-break: break-word;
}

.choice-group {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.paper-field .choice-pill {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 92px;
  position: relative;
  margin: 0;
  padding: 0 14px;
  border: 1px solid #cfd8d2;
  border-radius: 7px;
  background: #ffffff;
  color: var(--muted);
  cursor: pointer;
  font-size: 14px;
  text-align: center;
  transition: border-color 160ms ease, background-color 160ms ease, color 160ms ease, box-shadow 160ms ease;
}

.paper-field .choice-pill input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.paper-field .choice-pill span {
  width: 100%;
}

.paper-field .choice-pill:hover,
.paper-field .choice-pill:focus-within {
  border-color: #8fc7a7;
  background: #f1f8f4;
  color: var(--green-dark);
}

.paper-field .choice-pill:has(input:checked) {
  border-color: var(--green);
  background: #eaf6ef;
  color: var(--green-dark);
  box-shadow: inset 0 0 0 1px rgba(31, 122, 79, 0.16);
}

.family-table-wrap,
.data-table-scroll {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.86);
}

.family-table,
.data-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

.family-table th,
.family-table td,
.data-table th,
.data-table td {
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 9px 10px;
  text-align: left;
  vertical-align: top;
}

.family-table th,
.data-table th {
  background: #f1f6f3;
  color: #233d30;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.family-table td {
  min-width: 130px;
  background: #ffffff;
}

.family-empty-row td {
  color: var(--muted);
  text-align: center;
  background: #fbfcfd;
}

.family-table input,
.family-table select {
  min-width: 128px;
  border-color: transparent;
  background: transparent;
  padding: 6px;
  box-shadow: none;
}

.family-table input:focus,
.family-table select:focus {
  background: #ffffff;
  border-color: var(--green);
}

.nutrition-growth-entry-wrap {
  max-height: 68vh;
}

.nutrition-growth-entry-table {
  min-width: 1280px;
}

.nutrition-growth-entry-table th,
.nutrition-growth-entry-table td {
  font-size: 12px;
}

.nutrition-growth-entry-table input {
  min-width: 92px;
  width: 100%;
  text-align: right;
}

.nutrition-growth-entry-table td:nth-child(4),
.nutrition-growth-entry-table td:nth-child(8),
.nutrition-growth-entry-table td:nth-child(9) {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.nutrition-growth-entry-table td:nth-child(10) {
  min-width: 150px;
  color: var(--green-dark);
  font-weight: 800;
}

.nutrition-growth-entry-table tr.is-inactive > td {
  background: #fff0f0;
  color: #783f46;
}

.nutrition-growth-entry-table tr.is-inactive input:disabled {
  border-color: #dfa4aa;
  background: #f8dfe1;
  color: #783f46;
  cursor: not-allowed;
  opacity: 1;
}

.nutrition-inactive-badge {
  display: inline-flex;
  width: fit-content;
  margin-top: 5px;
  padding: 2px 7px;
  border: 1px solid #e3a6ac;
  border-radius: 999px;
  background: #f7dadd;
  color: #8b2f3a;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.04em;
  line-height: 1.3;
  text-transform: uppercase;
}

.growth-derived-value {
  background: linear-gradient(135deg, #f6fbff 0%, #f3f8f5 100%);
  color: #243029;
}

.financial-command-band {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) 120px minmax(220px, 0.65fr) auto;
  gap: 18px;
  align-items: end;
  margin-bottom: 24px;
  padding: 22px 24px;
  border: 1px solid rgba(205, 220, 211, 0.72);
  border-radius: 34px 58px 32px 46px;
  background: linear-gradient(135deg, rgba(246, 252, 248, 0.98), rgba(240, 247, 252, 0.86));
  box-shadow: 0 18px 42px rgba(21, 36, 29, 0.07);
}

.financial-command-band h2,
.financial-page-heading h2 {
  margin: 4px 0 0;
  font-size: 24px;
}

.financial-command-band label,
.financial-page-heading label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.financial-command-band input,
.financial-command-band select,
.financial-page-heading input {
  width: 100%;
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid #ccd9d1;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--ink);
  font: inherit;
}

.financial-command-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.financial-flow-analytics {
  margin-bottom: 30px;
}

.financial-negative {
  color: var(--red) !important;
  font-weight: 800;
}

.financial-report-paper {
  max-width: none;
}

.financial-entry-wrap {
  max-height: 64vh;
}

.financial-entry-table {
  min-width: 1500px;
}

.financial-entry-table th,
.financial-entry-table td,
.financial-budget-table th,
.financial-budget-table td {
  font-size: 12px;
}

.financial-entry-table th:nth-child(3),
.financial-entry-table td:nth-child(3) {
  min-width: 250px;
}

.financial-entry-table input,
.financial-budget-table input {
  width: 100%;
  min-width: 88px;
  min-height: 38px;
  padding: 7px 8px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: rgba(248, 251, 249, 0.94);
  font: inherit;
}

.financial-entry-table input:focus,
.financial-budget-table input:focus {
  border-color: var(--green);
  background: #ffffff;
  outline: none;
}

.financial-entry-table td:nth-child(n+5):nth-child(-n+12),
.financial-entry-table th:nth-child(n+5):nth-child(-n+12),
.financial-budget-table td:nth-child(n+4):nth-child(-n+14),
.financial-budget-table th:nth-child(n+4):nth-child(-n+14) {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.financial-entry-table tfoot th {
  position: sticky;
  bottom: 0;
  z-index: 2;
  background: #fff5a8;
  color: #27332c;
}

.financial-closing-section {
  display: grid;
  gap: 24px;
}

.financial-balance-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  padding: 12px 18px;
  border-radius: 24px 48px 26px 36px;
  background: linear-gradient(115deg, #0d5637, #116a47 72%, #174f3b);
  box-shadow: 0 16px 34px rgba(13, 86, 55, 0.16);
}

.financial-balance-strip div {
  display: grid;
  gap: 5px;
  padding: 10px 18px;
  border-right: 1px solid rgba(255, 255, 255, 0.16);
}

.financial-balance-strip div:last-child {
  border-right: 0;
}

.financial-balance-strip span {
  color: rgba(255, 255, 255, 0.7);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.financial-balance-strip strong {
  color: #ffffff;
  font-size: 19px;
}

.financial-balance-strip .financial-negative {
  color: #ffd4d4 !important;
}

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

.financial-form-signature {
  display: grid;
  align-content: end;
  min-width: 0;
  min-height: 118px;
  padding: 18px;
  border: 1px solid rgba(13, 86, 55, 0.14);
  border-radius: 8px;
  background: rgba(246, 250, 247, 0.9);
  text-align: center;
}

.financial-form-signature > span {
  align-self: start;
  margin-bottom: 24px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-align: left;
  text-transform: uppercase;
}

.financial-form-signature strong,
.financial-form-signature small {
  display: block;
}

.financial-form-signature strong {
  padding-top: 8px;
  border-top: 1px solid #607068;
  color: var(--ink);
  font-size: 14px;
}

.financial-form-signature small {
  margin-top: 4px;
  color: var(--muted);
}

.financial-form-signature input {
  width: 100%;
  padding: 8px 4px;
  border: 0;
  border-bottom: 1px solid #607068;
  border-radius: 0;
  background: transparent;
  text-align: center;
}

.financial-form-signature input:focus {
  border-bottom-color: var(--green);
  outline: none;
}

.financial-budget-shell {
  display: grid;
  width: 100%;
  min-width: 0;
  gap: 20px;
  padding: 24px;
  overflow: hidden;
  border: 1px solid rgba(205, 220, 211, 0.72);
  border-radius: 42px 28px 50px 34px;
  background: linear-gradient(145deg, rgba(248, 252, 249, 0.98), rgba(241, 248, 251, 0.88));
  box-shadow: 0 18px 42px rgba(21, 36, 29, 0.07);
}

.financial-page-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  padding: 0 4px 18px;
  border-bottom: 1px solid rgba(13, 86, 55, 0.12);
}

.financial-page-heading > div > span {
  display: block;
  margin-top: 8px;
  color: var(--muted);
}

.financial-page-heading label {
  width: 150px;
  flex: 0 0 auto;
}

.financial-budget-guidance {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  padding: 14px 18px;
  border-left: 4px solid #d0a62b;
  background: rgba(255, 247, 219, 0.72);
  color: #67520d;
}

.financial-budget-guidance span {
  color: #645f4c;
  line-height: 1.45;
}

.financial-budget-centers {
  display: grid;
  min-width: 0;
  gap: 18px;
}

.financial-budget-center {
  display: grid;
  min-width: 0;
  gap: 18px;
  padding: 20px;
  border: 1px solid rgba(194, 211, 201, 0.86);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 10px 26px rgba(25, 48, 36, 0.05);
}

.financial-budget-center-heading,
.financial-budget-subheading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.financial-budget-center-heading span,
.financial-budget-subheading span,
.financial-budget-decision-label {
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.financial-budget-center-heading h3,
.financial-budget-subheading h4 {
  margin: 3px 0 0;
  color: var(--green-dark);
}

.financial-budget-center-heading h3 {
  font-size: 20px;
}

.financial-budget-subheading h4 {
  font-size: 15px;
}

.financial-budget-year-chip {
  padding: 7px 10px;
  border-radius: 6px;
  background: #e7f3ec;
  color: var(--green-dark) !important;
}

.financial-budget-center-metrics {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  border-top: 1px solid rgba(13, 86, 55, 0.1);
  border-bottom: 1px solid rgba(13, 86, 55, 0.1);
}

.financial-budget-center-metrics > div,
.financial-budget-center-metrics > label {
  display: grid;
  align-content: center;
  min-width: 0;
  min-height: 88px;
  padding: 13px 15px;
  border-right: 1px solid rgba(13, 86, 55, 0.1);
}

.financial-budget-center-metrics > :last-child {
  border-right: 0;
}

.financial-budget-center-metrics span,
.financial-budget-decision span,
.financial-budget-decision label > span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.financial-budget-center-metrics strong {
  margin-top: 5px;
  color: var(--ink);
  font-size: 19px;
}

.financial-budget-center-metrics small {
  margin-top: 3px;
  color: var(--muted);
}

.financial-budget-center-metrics input,
.financial-budget-category-table input,
.financial-budget-decision textarea {
  width: 100%;
  min-width: 0;
  margin-top: 7px;
  padding: 8px 9px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #ffffff;
  font: inherit;
}

.financial-approved-input {
  background: rgba(231, 243, 236, 0.78);
}

.financial-approved-input input {
  border-color: rgba(13, 86, 55, 0.35);
  color: var(--green-dark);
  font-weight: 800;
}

.financial-budget-proposal-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.8fr) minmax(260px, 0.8fr);
  min-width: 0;
  gap: 18px;
}

.financial-category-proposal,
.financial-budget-decision {
  min-width: 0;
}

.financial-budget-subheading {
  margin-bottom: 10px;
}

.financial-budget-subheading small {
  color: var(--muted);
}

.financial-budget-category-wrap {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.financial-budget-category-table {
  width: 100%;
  min-width: 560px;
}

.financial-budget-category-table th,
.financial-budget-category-table td {
  padding: 8px 10px;
  font-size: 12px;
}

.financial-budget-category-table th:first-child {
  text-align: left;
}

.financial-budget-category-table td:nth-child(2),
.financial-budget-category-table td:nth-child(3) {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.financial-budget-category-table input {
  min-width: 120px;
  margin: 0;
  text-align: right;
}

.financial-budget-decision {
  display: grid;
  align-content: start;
  gap: 0;
  padding: 18px;
  border-radius: 8px;
  background: #113f31;
  color: #ffffff;
}

.financial-budget-decision-label {
  margin-bottom: 10px;
  color: rgba(255, 255, 255, 0.6);
}

.financial-budget-decision > div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.financial-budget-decision > div span,
.financial-budget-decision label > span {
  color: rgba(255, 255, 255, 0.62);
}

.financial-budget-decision strong {
  color: #ffffff;
  font-size: 14px;
  text-align: right;
}

.financial-budget-decision label {
  display: grid;
  margin-top: 14px;
}

.financial-budget-decision textarea {
  resize: vertical;
}

.financial-budget-decision .financial-negative {
  color: #ffd0c9 !important;
}

.subtle-cell {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
}

.latest-growth-cell {
  min-width: 260px;
  color: #53645b;
  font-size: 11px;
  line-height: 1.35;
}

.form-certification {
  padding: 20px 22px 26px;
}

.form-certification p {
  margin: 0 0 8px;
  color: #39443e;
}

.form-certification div {
  margin-top: 32px;
  padding-top: 8px;
  border-top: 1px solid #9aa7a0;
  color: var(--muted);
  text-align: center;
}

.form-certification strong,
.form-certification span {
  display: block;
}

.form-certification strong {
  margin-bottom: 3px;
  color: #1d2520;
  font-weight: 700;
}

.beneficiary-monitoring-summary {
  padding: 18px 22px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(135deg, #fbfdfc 0%, #f6fbff 100%);
}

.beneficiary-monitoring-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.beneficiary-monitoring-head h3 {
  margin: 0;
  font-size: 16px;
}

.beneficiary-monitoring-head > span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.beneficiary-monitoring-kpis {
  display: grid;
  grid-template-columns: repeat(5, minmax(140px, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.beneficiary-monitoring-kpis article {
  min-width: 0;
  min-height: 92px;
  display: grid;
  align-content: space-between;
  gap: 6px;
  padding: 12px;
  border: 1px solid #d7e2dc;
  border-left: 4px solid var(--green);
  border-radius: 8px;
  background: #ffffff;
}

.beneficiary-monitoring-kpis span,
.beneficiary-monitoring-kpis em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.beneficiary-monitoring-kpis strong {
  color: var(--green-dark);
  font-size: 18px;
  line-height: 1.12;
  overflow-wrap: anywhere;
}

.beneficiary-monitoring-table-wrap {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.beneficiary-monitoring-table {
  width: 100%;
  min-width: 760px;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 13px;
}

.beneficiary-monitoring-table th,
.beneficiary-monitoring-table td {
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 8px;
  text-align: left;
  vertical-align: top;
}

.beneficiary-monitoring-table th {
  color: #294235;
  background: #eef7f1;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.beneficiary-monitoring-table td {
  background: #ffffff;
}

.beneficiary-monitoring-empty {
  border: 1px dashed #cbd8cf;
  border-radius: 8px;
  background: #ffffff;
  color: var(--muted);
  padding: 24px 12px;
  text-align: center;
}

.readonly input,
.readonly select,
.readonly textarea {
  pointer-events: none;
}

.database-page {
  overflow: hidden;
}

.database-filter-panel {
  margin-bottom: 14px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: #fbfcfd;
  box-shadow: var(--shadow);
}

.database-filter-panel.collapsed .database-filter-body {
  display: none;
}

.database-filter-search {
  margin-top: 10px;
}

.filter-panel-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.table-toolbar .database-filter-panel {
  margin-bottom: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.database-filter-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(160px, 1fr));
  gap: 10px;
  align-items: end;
  margin-top: 12px;
}

.database-filter-grid label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.database-filter-grid input,
.database-filter-grid select {
  min-height: 38px;
  width: 100%;
  border: 1px solid #cdd8d0;
  border-radius: var(--radius);
  background: #ffffff;
  color: var(--ink);
  padding: 0 10px;
}

.table-toolbar-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
}

.filter-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.filter-summary span {
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  padding: 0 9px;
  border: 1px solid #cfe0d4;
  border-radius: 999px;
  background: #eef8f1;
  color: var(--green-dark);
  font-size: 12px;
  font-weight: 700;
}

.table-toolbar {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 14px;
  align-items: stretch;
  padding: 16px;
  border-bottom: 1px solid var(--line);
  background: #fbfcfd;
}

.table-toolbar .search-band {
  width: 100%;
  grid-template-columns: 32px minmax(0, 1fr);
}

.table-toolbar .search-band.with-button {
  grid-template-columns: 32px minmax(0, 1fr) auto;
}

.table-count {
  color: var(--muted);
  font-size: 13px;
  white-space: nowrap;
}

.pagination-bar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding: 12px 14px;
  border-top: 1px solid var(--line);
  background: #fbfcfd;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.pagination-bar .text-button {
  min-height: 32px;
  padding: 0 10px;
}

.pagination-bar .text-button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
  transform: none;
}

.database-table-host {
  min-height: 240px;
}

.data-table {
  min-width: 1900px;
  font-size: 13px;
}

.data-table.nutrition-table {
  min-width: 1320px;
}

.data-table.nutrition-center-table {
  min-width: 1120px;
}

.data-table.nutrition-center-linked-table {
  min-width: 900px;
}

.data-table th,
.data-table td {
  max-width: 260px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  background: #ffffff;
}

.data-table th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #eef4fb;
  color: #203650;
  box-shadow: inset 0 -1px 0 var(--line);
}

.data-table tr:hover td {
  background: #f8fbff;
}

.sticky-column {
  position: sticky;
  left: 0;
  z-index: 3;
  min-width: 96px;
  background: #ffffff;
  box-shadow: 1px 0 0 var(--line);
}

.data-table th.sticky-column {
  background: #eef4fb;
  z-index: 4;
}

.bin-list-modern {
  gap: 10px;
}

.bin-record {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfcfd;
}

.bin-record strong,
.bin-record span {
  display: block;
}

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

.viewer-picker {
  max-width: 860px;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%) translateY(18px);
  min-width: min(440px, calc(100vw - 28px));
  max-width: calc(100vw - 28px);
  padding: 12px 14px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: var(--radius);
  color: #ffffff;
  background: rgba(29, 37, 32, 0.95);
  opacity: 0;
  pointer-events: none;
  transition: opacity 160ms ease, transform 160ms ease;
  text-align: center;
}

.toast.visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

@media (max-width: 1180px) {
  .financial-command-band {
    grid-template-columns: minmax(260px, 1fr) 120px minmax(200px, 0.7fr);
  }

  .financial-command-actions {
    grid-column: 1 / -1;
    justify-content: flex-start;
  }

  .financial-budget-center-metrics {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .financial-budget-center-metrics > :nth-child(3) {
    border-right: 0;
  }

  .financial-budget-center-metrics > :nth-child(-n+3) {
    border-bottom: 1px solid rgba(13, 86, 55, 0.1);
  }

  .analytics-kpi-grid.detailed,
  .analytics-chart-grid,
  .database-filter-grid {
    grid-template-columns: repeat(2, minmax(220px, 1fr));
  }

  .monitoring-identity-grid,
  .income-grid {
    grid-template-columns: repeat(2, minmax(180px, 1fr));
  }

  .split-layout,
  .dashboard-intro,
  .dashboard-workspace,
  .system-tools-page {
    grid-template-columns: 1fr;
  }

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

  .dashboard-metric {
    border-bottom: 1px solid var(--line);
  }

  .dashboard-analytics-loading,
  .dashboard-analytics-landscape {
    grid-template-columns: 1fr;
  }

  .analytics-ribbon,
  .growth-pulse,
  .month-flow,
  .group-current,
  .status-stream {
    grid-area: auto;
  }

  .dashboard-analytics-landscape {
    min-height: auto;
    grid-template-areas: none;
    grid-template-rows: none;
  }

  .analytics-ribbon {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    border-radius: 28px;
  }

  .dashboard-analytics-stat {
    min-height: 74px;
    border-bottom: 0;
    border-right: 1px solid rgba(255, 255, 255, 0.14);
    padding: 8px 12px;
  }

  .dashboard-analytics-stat:last-child {
    border-right: 0;
  }

  .growth-pulse .vega-chart {
    min-height: 300px;
  }
}

@media (max-width: 880px) {
  .financial-command-band {
    grid-template-columns: 1fr 1fr;
    border-radius: 28px 42px 30px 36px;
  }

  .financial-command-band > div:first-child {
    grid-column: 1 / -1;
  }

  .financial-balance-strip {
    grid-template-columns: 1fr;
  }

  .financial-balance-strip div {
    border-right: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.16);
  }

  .financial-balance-strip div:last-child {
    border-bottom: 0;
  }

  .financial-page-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .financial-budget-proposal-grid,
  .financial-signature-grid {
    grid-template-columns: 1fr;
  }

  .financial-budget-center-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .financial-budget-center-metrics > :nth-child(n) {
    border-right: 1px solid rgba(13, 86, 55, 0.1);
    border-bottom: 1px solid rgba(13, 86, 55, 0.1);
  }

  .financial-budget-center-metrics > :nth-child(even) {
    border-right: 0;
  }

  .financial-budget-center-metrics > :last-child {
    grid-column: 1 / -1;
    border-right: 0;
    border-bottom: 0;
  }

  .financial-budget-guidance {
    grid-template-columns: 1fr;
  }

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

  .app-sidebar {
    position: static;
    min-height: auto;
    max-height: none;
    overflow: visible;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .app-nav {
    grid-template-columns: 1fr;
  }

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

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

  .print-preview-actions {
    align-items: stretch;
    flex-direction: column;
  }

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

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

  .dashboard-command,
  .recent-update-row {
    grid-template-columns: minmax(0, 1fr) 24px;
  }

  .dashboard-command-icon,
  .recent-update-row time {
    display: none;
  }

  .analytics-title-row {
    align-items: stretch;
    flex-direction: column;
  }

  .nutrition-growth-analytics-scope {
    align-items: stretch;
    flex-direction: column;
  }

  .nutrition-growth-period-controls {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .nutrition-growth-period-controls select,
  .nutrition-growth-period-controls label:last-child select {
    width: 100%;
    min-width: 0;
  }

  .dashboard-analytics-landscape {
    padding: 12px;
    border-radius: 18px;
    gap: 12px;
  }

  .analytics-ribbon {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    border-radius: 24px;
  }

  .dashboard-analytics-stat {
    border-right: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.14);
  }

  .dashboard-analytics-stat:nth-last-child(-n+2) {
    border-bottom: 0;
  }

  .growth-pulse .vega-chart,
  .month-flow .vega-chart,
  .group-current .vega-chart,
  .status-stream .vega-chart {
    min-height: 220px;
  }

  .analytics-kpi-grid,
  .analytics-kpi-grid.detailed,
  .analytics-preview-grid,
  .analytics-chart-grid,
  .database-filter-grid {
    grid-template-columns: 1fr;
  }

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

  .analytics-card.wide {
    grid-column: auto;
  }

  .monitoring-heading,
  .monitoring-identity-grid,
  .income-grid,
  .beneficiary-monitoring-kpis,
  .signature-grid {
    grid-template-columns: 1fr;
  }

  .beneficiary-monitoring-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .monitoring-identity-grid .wide {
    grid-column: auto;
  }

  .photo-box {
    width: 136px;
  }

  .nutrition-form-heading .photo-box {
    width: min(184px, 100%);
    justify-self: start;
  }

  .record-strip,
  .paper-grid {
    grid-template-columns: 1fr;
  }

  .table-toolbar,
  .record-card,
  .bin-record {
    align-items: stretch;
    flex-direction: column;
  }

  .record-card {
    grid-template-columns: 46px minmax(0, 1fr);
  }

  .record-card-actions {
    grid-column: 1 / -1;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }

  .page-root > * {
    animation: none;
  }

  .scroll-reveal,
  .dashboard-analytics-content {
    opacity: 1;
    transform: none;
    transition: none;
    animation: none !important;
  }

  .login-loader span,
  .loading-orbit span,
  .analytics-skeleton,
  .dashboard-command,
  .recent-update-row,
  .dashboard-metric,
  .analytics-shape {
    animation: none !important;
  }
}

@media (max-width: 560px) {
  .financial-command-band {
    grid-template-columns: 1fr;
    gap: 14px;
    padding: 18px;
    border-radius: 24px 16px 28px 18px;
  }

  .financial-command-band > div:first-child,
  .financial-command-actions {
    grid-column: auto;
  }

  .financial-command-actions,
  .financial-command-actions .action-button {
    width: 100%;
  }

  .financial-signature-grid {
    grid-template-columns: 1fr;
  }

  .financial-budget-shell {
    padding: 14px;
    border-radius: 24px 16px 28px 18px;
  }

  .financial-budget-center {
    padding: 14px;
  }

  .financial-budget-center-metrics {
    grid-template-columns: 1fr;
  }

  .financial-budget-center-metrics > :nth-child(n) {
    grid-column: auto;
    border-right: 0;
    border-bottom: 1px solid rgba(13, 86, 55, 0.1);
  }

  .financial-budget-center-metrics > :last-child {
    border-bottom: 0;
  }

  .page-root {
    padding: 12px;
  }

  .dashboard-page {
    margin: 0;
    padding: 16px;
    border-radius: 16px;
  }

  .app-nav,
  .dashboard-metrics-strip,
  .donut-wrap {
    grid-template-columns: 1fr;
  }

  .dashboard-metric {
    border-right: 0;
  }

  .donut-frame,
  .donut-chart {
    width: 132px;
    height: 132px;
  }

  .search-band {
    grid-template-columns: 32px minmax(0, 1fr);
  }

  .search-band .action-button {
    grid-column: 1 / -1;
  }
}

/* Scholarship Program */
.scholarship-page {
  --scholar-ink: #202844;
  --scholar-green: #245aa8;
  --scholar-mint: #eaf2ff;
  --scholar-aqua: #edf4ff;
  --scholar-gold: #f2c95f;
  display: grid;
  gap: 22px;
  color: var(--scholar-ink);
}

.scholarship-command-band {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 28px;
  min-height: 178px;
  padding: 30px 34px;
  overflow: hidden;
  border: 1px solid rgba(36, 90, 168, 0.14);
  border-radius: 44px 20px 52px 26px;
  background:
    linear-gradient(112deg, rgba(234, 242, 255, 0.96), rgba(255, 255, 255, 0.98) 58%, rgba(237, 244, 255, 0.9));
  box-shadow: 0 18px 44px rgba(32, 40, 68, 0.08);
}

.scholarship-command-band::after {
  content: "";
  position: absolute;
  right: -54px;
  top: -86px;
  width: 210px;
  height: 210px;
  border: 34px solid rgba(242, 201, 95, 0.2);
  border-radius: 50%;
  pointer-events: none;
}

.scholarship-command-band > div {
  position: relative;
  z-index: 1;
}

.scholarship-command-band h2 {
  max-width: 760px;
  margin: 4px 0 8px;
  font-size: 30px;
  line-height: 1.14;
  letter-spacing: 0;
}

.scholarship-command-band p:last-child {
  max-width: 720px;
  margin: 0;
  color: #5e6984;
  line-height: 1.65;
}

.scholarship-command-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 9px;
}

.scholarship-metric-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  padding: 6px 24px;
  border-top: 1px solid rgba(36, 90, 168, 0.16);
  border-bottom: 1px solid rgba(36, 90, 168, 0.16);
  background: rgba(255, 255, 255, 0.58);
}

.scholarship-metric-strip > div {
  min-width: 0;
  padding: 15px 22px;
  border-right: 1px solid rgba(36, 90, 168, 0.12);
}

.scholarship-metric-strip > div:last-child {
  border-right: 0;
}

.scholarship-metric-strip span,
.scholarship-metric-strip small {
  display: block;
  color: #64708c;
}

.scholarship-metric-strip span {
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.scholarship-metric-strip strong {
  display: block;
  margin: 5px 0 2px;
  overflow-wrap: anywhere;
  color: #245aa8;
  font-size: 25px;
  line-height: 1.15;
}

.scholarship-metric-strip small {
  font-size: 12px;
}

.scholarship-analytics-flow {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(280px, 0.75fr);
  gap: 18px;
  align-items: stretch;
}

.scholarship-chart {
  position: relative;
  min-height: 250px;
  padding: 24px;
  overflow: hidden;
  border: 1px solid rgba(36, 90, 168, 0.16);
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 10px 26px rgba(32, 40, 68, 0.08);
}

.scholarship-chart:not(.wide) {
  border-radius: 16px;
}

.scholarship-chart::after {
  content: none;
}

.scholarship-chart header {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 22px;
}

.scholarship-chart header span {
  color: #6c7690;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.scholarship-chart h3 {
  margin: 4px 0 0;
  font-size: 18px;
}

.scholarship-bars {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 14px;
}

.scholarship-bar-row {
  display: grid;
  grid-template-columns: minmax(112px, 0.9fr) minmax(120px, 2fr) 34px;
  align-items: center;
  gap: 12px;
  min-height: 24px;
}

.scholarship-bar-row > span {
  overflow: hidden;
  color: #46516d;
  font-size: 12px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.scholarship-bar-row > div {
  height: 10px;
  overflow: hidden;
  border-radius: 5px;
  background: #e4ebf7;
}

.scholarship-bar-row i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #1d477f, #5f88c5, #f2c95f);
}

.scholarship-bar-row strong {
  color: #1d477f;
  text-align: right;
}

.scholarship-chart-empty {
  display: grid;
  min-height: 126px;
  place-items: center;
  color: #6c7690;
}

.scholarship-data-surface {
  position: relative;
  padding: 24px;
  overflow: hidden;
  border: 1px solid rgba(36, 90, 168, 0.13);
  border-radius: 32px 20px 38px 24px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 16px 38px rgba(32, 40, 68, 0.06);
}

.scholarship-data-toolbar {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) auto auto;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
  padding: 4px;
}

.scholarship-data-toolbar .search-band {
  min-width: 0;
  margin: 0;
}

.scholarship-data-toolbar > select {
  width: auto;
  min-width: 170px;
}

.scholarship-data-toolbar > span {
  color: #667a70;
  font-size: 12px;
  white-space: nowrap;
}

.scholarship-table-scroll {
  min-height: 220px;
  border: 1px solid #dce7e1;
  border-radius: 14px;
}

.scholarship-table th {
  background: #edf6f1;
  color: #234c3a;
}

.scholarship-table td {
  max-width: 320px;
  overflow-wrap: anywhere;
}

.scholarship-table th.sticky-column > input[type="checkbox"] {
  margin: 0 9px 0 1px;
  vertical-align: middle;
}

.scholarship-table .table-actions {
  align-items: center;
}

.scholarship-table .table-actions > input[type="checkbox"] {
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
  margin: 0 4px 0 1px;
  accent-color: #14734a;
}

.scholarship-empty {
  display: grid;
  min-height: 220px;
  place-items: center;
  align-content: center;
  gap: 5px;
  color: #708077;
  text-align: center;
}

.scholarship-empty strong {
  color: #244d3b;
  font-size: 17px;
}

.scholarship-pagination {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 14px 4px 0;
  color: #63766c;
  font-size: 12px;
}

.scholarship-pagination > div {
  display: flex;
  gap: 7px;
}

.scholarship-pagination .icon-button:first-child svg {
  transform: rotate(180deg);
}

.scholarship-segmented {
  display: flex;
  gap: 4px;
  width: max-content;
  max-width: 100%;
  padding: 4px;
  overflow-x: auto;
  border: 1px solid #d6e3dc;
  border-radius: 10px;
  background: #f3f7f5;
}

.scholarship-segmented button {
  min-height: 38px;
  padding: 7px 15px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: #53685e;
  font-weight: 700;
  white-space: nowrap;
}

.scholarship-segmented button:hover {
  background: #edf4ff;
}

.scholarship-segmented button.active {
  background: #245aa8;
  color: #fff;
  box-shadow: 0 5px 14px rgba(36, 90, 168, 0.2);
}

.scholarship-compliance-note {
  margin: 0;
  padding: 14px 18px;
  border-left: 4px solid #d2a72d;
  background: #fff9e8;
  color: #6b5a28;
  line-height: 1.55;
}

.account-role-fieldset {
  margin: 4px 0 0;
  padding: 14px;
  border: 1px solid #d6e2dc;
  border-radius: 8px;
}

.account-role-guidance {
  margin: 0;
  padding: 12px 14px;
  border-left: 4px solid #26875a;
  background: #eef8f2;
  color: #4d6559;
  font-size: 12px;
  line-height: 1.5;
}

.account-role-fieldset legend {
  padding: 0 5px;
  color: #214f3a;
  font-weight: 800;
}

.account-role-fieldset > p {
  margin: 0 0 10px;
  color: #6b7c73;
  font-size: 12px;
}

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

.scholarship-modal-backdrop {
  z-index: 1200;
  padding: 24px;
}

.scholarship-modal {
  display: flex;
  flex-direction: column;
  width: min(1120px, calc(100vw - 48px));
  max-width: 1120px;
  max-height: calc(100vh - 48px);
  padding: 0;
  overflow: hidden;
  border-radius: 26px 16px 30px 20px;
  background: #f9fbfa;
}

.scholarship-modal-header,
.scholarship-modal-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  padding: 20px 24px;
  background: #fff;
}

.scholarship-modal-header {
  border-bottom: 1px solid #dfe8e3;
}

.scholarship-modal-header h2 {
  margin: 3px 0;
  font-size: 22px;
}

.scholarship-modal-header span {
  color: #687b71;
}

.scholarship-modal-footer {
  justify-content: flex-end;
  border-top: 1px solid #dfe8e3;
}

.scholarship-modal-body {
  flex: 1;
  min-height: 0;
  padding: 24px;
  overflow: auto;
}

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

.scholarship-form-grid label,
.scholar-profile-form label {
  display: grid;
  align-content: start;
  gap: 6px;
  min-width: 0;
  color: #53665c;
  font-size: 12px;
}

.scholarship-form-grid label.wide,
.scholar-profile-form label.wide {
  grid-column: 1 / -1;
}

.scholarship-form-grid input,
.scholarship-form-grid select,
.scholarship-form-grid textarea,
.scholar-profile-form input,
.scholar-profile-form select,
.scholar-profile-form textarea {
  width: 100%;
}

.scholar-profile-form {
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
  align-items: start;
  gap: 20px;
}

.scholar-photo-editor {
  position: sticky;
  top: 0;
  display: grid;
  gap: 10px;
}

.scholar-photo-preview,
.scholar-view-photo {
  display: grid;
  overflow: hidden;
  place-items: center;
  border: 1px solid #cbdcd3;
  background: #edf5f1;
  color: #527064;
}

.scholar-photo-preview {
  width: 230px;
  aspect-ratio: 4 / 5;
  border-radius: 18px 10px 22px 12px;
}

.scholar-photo-preview img,
.scholar-view-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.scholar-photo-preview span svg {
  width: 34px;
  height: 34px;
}

.scholar-form-section {
  grid-column: 2;
  padding: 18px;
  border: 1px solid #dbe7e0;
  border-radius: 16px 9px 20px 11px;
  background: #fff;
}

.scholar-form-section.family-composition-section {
  grid-column: 1 / -1;
}

.scholar-form-section h3 {
  margin: 0 0 14px;
  font-size: 16px;
}

.grade-batch-section {
  grid-column: 1 / -1;
  margin-top: 18px;
}

.grade-batch-section .section-title-row > div {
  display: grid;
  gap: 4px;
}

.grade-batch-section .section-title-row h3 {
  margin: 0;
}

.grade-batch-section .section-title-row span {
  color: #687b71;
  font-size: 12px;
}

.grade-batch-table-scroll {
  margin-top: 14px;
}

.grade-batch-table {
  min-width: 1030px;
}

.grade-batch-table input,
.grade-batch-table select {
  width: 100%;
  min-width: 92px;
}

.grade-batch-table th:first-child,
.grade-batch-table td:first-child {
  min-width: 170px;
}

.grade-batch-table th:nth-child(2),
.grade-batch-table td:nth-child(2) {
  min-width: 135px;
}

.grade-batch-table th:nth-child(7),
.grade-batch-table td:nth-child(7) {
  min-width: 170px;
}

.section-title-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.scholar-dynamic-rows {
  display: grid;
  gap: 8px;
}

.scholar-dynamic-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(120px, 1fr)) 38px;
  gap: 8px;
  align-items: center;
  padding: 10px;
  border: 1px solid #e0e9e4;
  border-radius: 8px;
  background: #f8fbf9;
}

.scholar-household-table {
  width: 100%;
  margin-bottom: 16px;
  overflow-x: auto;
  border: 1px solid #dce7e1;
  border-radius: 8px;
  background: #fbfdfc;
}

.scholar-household-table > * {
  min-width: 1320px;
}

.scholar-household-grid {
  display: grid;
  grid-template-columns: minmax(190px, 1.35fr) 62px 132px 116px 130px 122px minmax(170px, 1.2fr) minmax(150px, 1fr) 126px 38px;
  gap: 8px;
  align-items: center;
}

.household-grid-header {
  padding: 10px;
  border-bottom: 1px solid #d6e3dc;
  background: #eaf4ee;
  color: #405d50;
  font-size: 11px;
  font-weight: 800;
}

.scholar-household-table .scholar-dynamic-rows {
  gap: 0;
}

.scholar-dynamic-row.household-row {
  border: 0;
  border-bottom: 1px solid #e0e9e4;
  border-radius: 0;
  background: #fff;
}

.scholar-dynamic-row.household-row:last-child {
  border-bottom: 0;
}

.scholar-dynamic-row.document-row {
  grid-template-columns: 0.8fr 1fr 2fr 38px;
}

.scholar-dynamic-row.renewal-item-row {
  grid-template-columns: 130px minmax(240px, 1.5fr) 130px 150px 155px 110px 38px;
  overflow-x: auto;
}

.renewal-item-deadline,
.renewal-response-field {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.renewal-item-deadline > span,
.renewal-response-field > span {
  color: #65766e;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
}

.scholar-dynamic-row.evaluation-criterion-row {
  grid-template-columns: minmax(220px, 1fr) 120px 38px;
}

.scholar-view-hero,
.sponsor-view-hero {
  display: grid;
  gap: 22px;
  align-items: center;
  margin-bottom: 22px;
  padding: 22px;
  border-radius: 30px 14px 34px 18px;
  background: linear-gradient(120deg, #e4f4ea, #fff 62%, #e5f3f3);
}

.scholar-view-hero {
  grid-template-columns: 180px minmax(0, 1fr);
}

.scholar-view-photo {
  width: 180px;
  aspect-ratio: 4 / 5;
  border-radius: 18px 10px 22px 12px;
}

.scholar-view-hero h2,
.sponsor-view-hero h2 {
  margin: 5px 0 10px;
  font-size: 27px;
}

.scholar-view-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  align-items: center;
}

.scholar-view-badges .status-pill:first-child {
  border: 1px solid rgba(36, 90, 168, 0.24);
  background: #eaf1fb;
  color: #1d477f;
}

.scholar-view-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  overflow: hidden;
  border: 1px solid #d7e3dd;
  border-radius: 12px;
  background: #fff;
}

.scholar-view-grid > div {
  min-width: 0;
  padding: 13px 15px;
  border-right: 1px solid #e3ebe6;
  border-bottom: 1px solid #e3ebe6;
}

.scholar-view-grid span,
.scholar-view-grid strong {
  display: block;
}

.scholar-view-grid span {
  color: #6d7f75;
  font-size: 11px;
  text-transform: capitalize;
}

.scholar-view-grid strong {
  margin-top: 4px;
  overflow-wrap: anywhere;
}

.scholar-view-section {
  margin-top: 22px;
}

.scholar-view-section h3 {
  margin: 0 0 10px;
}

.scholar-household-list {
  display: grid;
  gap: 7px;
}

.scholar-household-list > div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 12px;
  border-bottom: 1px solid #dfe8e3;
}

.scholar-household-list span {
  color: #65786e;
}

.scholar-document-link {
  display: inline-flex;
  margin: 3px 6px 3px 0;
  padding: 8px 11px;
  border: 1px solid #cddfd5;
  border-radius: 6px;
  color: #245aa8;
  font-weight: 700;
}

.status-pill {
  display: inline-flex;
  width: max-content;
  padding: 5px 9px;
  border-radius: 999px;
  background: #e4f3ea;
  color: #245aa8;
  font-size: 11px;
  font-weight: 800;
}

.status-pill.warning {
  background: #fff2c9;
  color: #795e0b;
}

.scholar-import-drop {
  display: grid;
  min-height: 150px;
  place-items: center;
  align-content: center;
  gap: 5px;
  padding: 20px;
  border: 2px dashed #9ec5b0;
  border-radius: 18px 10px 22px 12px;
  background: #edf7f1;
  text-align: center;
}

.scholar-import-summary {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin: 16px 0;
  padding: 11px 14px;
  border-left: 4px solid #245aa8;
  background: #fff;
}

.attendance-batch,
.renewal-responses,
.evaluation-scores {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid #dce7e1;
}

.grade-model-note {
  display: grid;
  gap: 4px;
  padding: 12px 14px;
  border-left: 4px solid #238358;
  border-radius: 4px 8px 8px 4px;
  background: #edf7f1;
  color: #315346;
}

.grade-model-note strong,
.grade-model-note span {
  display: block;
}

.grade-model-note span {
  color: #64786e;
  font-size: 12px;
}

.renewal-evaluation-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 180px;
  align-items: center;
  gap: 18px;
  margin-bottom: 18px;
  padding: 20px;
  border-radius: 26px 12px 30px 14px;
  background: linear-gradient(120deg, #e6f4eb, #fff 62%, #e7f2f3);
}

.renewal-evaluation-hero span,
.renewal-evaluation-hero p,
.renewal-rating small {
  color: #667970;
  font-size: 12px;
}

.renewal-evaluation-hero h3,
.renewal-evaluation-hero p {
  margin: 4px 0 0;
}

.renewal-rating {
  display: grid;
  justify-items: end;
  gap: 3px;
}

.renewal-rating strong {
  color: #12623e;
  font-size: 34px;
  line-height: 1;
}

.renewal-score-sheet {
  overflow: hidden;
  margin-bottom: 20px;
  border: 1px solid #d9e5df;
  border-radius: 10px;
  background: #fff;
}

.renewal-score-line {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 100px 62px;
  align-items: center;
  gap: 12px;
  padding: 12px 15px;
  border-bottom: 1px solid #e4ece8;
}

.renewal-score-line span,
.renewal-score-line small {
  display: block;
}

.renewal-score-line small,
.renewal-adjustment small {
  margin-top: 3px;
  color: #73837b;
  font-size: 11px;
}

.renewal-score-line strong,
.renewal-score-line b {
  text-align: right;
}

.renewal-score-line b {
  color: #238358;
  font-size: 12px;
}

.renewal-adjustment {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 160px;
  align-items: center;
  gap: 4px 12px;
  padding: 12px 15px;
  background: #f5faf7;
}

.renewal-adjustment small {
  grid-column: 1;
}

.renewal-decision-grid {
  padding-top: 2px;
}

.renewal-response-row,
.evaluation-score-row {
  display: grid;
  grid-template-columns: minmax(190px, 1.4fr) 150px minmax(125px, 0.7fr) minmax(180px, 1.1fr) minmax(160px, 1fr);
  align-items: center;
  gap: 9px;
  padding: 10px 0;
  border-bottom: 1px solid #e0e9e4;
}

.evaluation-score-row {
  grid-template-columns: minmax(220px, 1.5fr) 120px minmax(200px, 1fr);
}

.renewal-response-row strong,
.renewal-response-row span,
.evaluation-score-row strong,
.evaluation-score-row span {
  display: block;
}

.renewal-response-row span,
.evaluation-score-row span {
  margin-top: 3px;
  color: #73837b;
  font-size: 11px;
}

.renewal-response-row.is-overdue {
  margin: 3px 0;
  padding: 10px;
  border: 1px solid #efc9bf;
  border-left: 4px solid #b74a35;
  border-radius: 6px;
  background: #fff8f5;
}

.renewal-overdue-note {
  display: block;
  margin-top: 6px;
  color: #9b3828;
  font-size: 11px;
  font-weight: 700;
}

.batch-renewal-deadlines {
  display: grid;
  gap: 0;
  overflow: hidden;
  border: 1px solid #dbe7e1;
  border-radius: 6px;
  background: #fbfdfc;
}

.batch-renewal-deadlines h3,
.batch-renewal-deadlines p {
  margin: 0;
  padding: 14px 16px;
}

.batch-renewal-deadlines div {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 9px 16px;
  border-top: 1px solid #e6eee9;
}

.batch-renewal-deadlines strong {
  white-space: nowrap;
}

.batch-edit-modal {
  width: min(1500px, calc(100vw - 32px));
  max-width: 1500px;
}

.batch-edit-workspace {
  display: grid;
  gap: 16px;
  min-width: 0;
}

.batch-edit-summary {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 20px;
  padding: 15px 17px;
  border: 1px solid #d9e7df;
  border-left: 4px solid #168052;
  border-radius: 7px;
  background: #f4faf6;
}

.batch-edit-summary > div,
.batch-edit-summary label {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.batch-scholar-cell > *,
.batch-result-cell > * {
  display: block;
}

.batch-scholar-cell > * + *,
.batch-result-cell > * + * {
  margin-top: 4px;
}

.batch-edit-summary span,
.batch-scholar-cell span,
.batch-result-cell span,
.batch-edit-footnote {
  color: #687b71;
  font-size: 12px;
}

.batch-edit-summary label {
  width: min(420px, 45%);
}

.batch-edit-table {
  max-width: 100%;
  overflow: auto;
  border: 1px solid #d8e5de;
  border-radius: 7px;
  background: #fff;
}

.batch-edit-table table {
  width: 100%;
  min-width: 1380px;
  border-collapse: collapse;
}

.batch-edit-table th,
.batch-edit-table td {
  min-width: 145px;
  padding: 10px;
  border-right: 1px solid #e4ece7;
  border-bottom: 1px solid #e4ece7;
  text-align: left;
  vertical-align: top;
}

.batch-edit-table th {
  position: sticky;
  top: 0;
  z-index: 2;
  padding-block: 12px;
  background: #eaf5ef;
  color: #214a38;
  font-size: 12px;
  white-space: nowrap;
}

.batch-edit-table th:first-child,
.batch-edit-table td:first-child {
  position: sticky;
  left: 0;
  z-index: 1;
  min-width: 210px;
  background: #fbfdfc;
  box-shadow: 1px 0 0 #d8e5de;
}

.batch-edit-table th:first-child {
  z-index: 3;
  background: #eaf5ef;
}

.batch-edit-table input,
.batch-edit-table select,
.batch-edit-table textarea {
  width: 100%;
  min-width: 130px;
  margin: 0;
}

.batch-edit-table textarea {
  min-height: 58px;
  resize: vertical;
}

.batch-scholar-cell small {
  color: #a43c2c;
  font-size: 11px;
  line-height: 1.35;
}

.batch-result-cell strong {
  color: #245aa8;
  font-size: 16px;
}

.batch-edit-footnote {
  margin: -5px 2px 0;
}

.scholarship-document-center {
  --document-navy: #1b365d;
  --document-aqua: #00a6a6;
  --document-red: #9b1c31;
  --document-gold: #f4b41a;
}

.scholarship-document-browser {
  display: grid;
  gap: 18px;
  padding: 24px;
  border: 1px solid rgba(27, 54, 93, .14);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 10px 30px rgba(26, 55, 42, .06);
}

.scholarship-document-browser-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
}

.scholarship-document-browser-heading h3 {
  margin: 3px 0 0;
  color: var(--document-navy);
  font-size: 22px;
}

.scholarship-document-search {
  display: flex;
  width: min(100%, 330px);
  min-height: 44px;
  align-items: center;
  gap: 9px;
  padding: 0 13px;
  border: 1px solid #cbd8d1;
  border-radius: 10px;
  background: #fff;
}

.scholarship-document-search input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: #1f3329;
  font: inherit;
}

.scholarship-document-groups {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.scholarship-document-groups button {
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid #d4e0da;
  border-radius: 999px;
  background: #f7faf8;
  color: #52645b;
  font: inherit;
  font-size: 12px;
  font-weight: 750;
  cursor: pointer;
}

.scholarship-document-groups button:hover,
.scholarship-document-groups button.active {
  border-color: #245aa8;
  background: #245aa8;
  color: #fff;
}

.scholarship-document-result-count {
  margin: -5px 0 0;
  color: #6e7d75;
  font-size: 12px;
}

.scholarship-document-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(255px, 1fr));
  gap: 12px;
}

.scholarship-document-card {
  --document-accent: var(--document-aqua);
  display: grid;
  grid-template-rows: auto auto minmax(62px, auto) auto;
  gap: 10px;
  min-width: 0;
  padding: 18px;
  border: 1px solid #d9e3de;
  border-left: 4px solid var(--document-accent);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 6px 18px rgba(21, 63, 46, .05);
}

.scholarship-document-card.accent-red {
  --document-accent: var(--document-red);
}

.scholarship-document-card.accent-gold {
  --document-accent: var(--document-gold);
}

.scholarship-document-card.accent-green {
  --document-accent: #216b48;
}

.scholarship-document-card.accent-navy {
  --document-accent: var(--document-navy);
}

.scholarship-document-card header {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  align-items: center;
  gap: 11px;
}

.scholarship-document-card header > span {
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border-radius: 10px;
  background: color-mix(in srgb, var(--document-accent) 14%, white);
  color: var(--document-accent);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: .04em;
}

.scholarship-document-card header p,
.scholarship-document-card header h3,
.scholarship-document-card > p,
.scholarship-document-card > small {
  margin: 0;
}

.scholarship-document-card header p {
  color: #728078;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.scholarship-document-card header h3 {
  margin-top: 3px;
  color: var(--document-navy);
  font-size: 16px;
  line-height: 1.25;
}

.scholarship-document-card > strong {
  width: max-content;
  max-width: 100%;
  padding: 5px 9px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--document-accent) 12%, white);
  color: var(--document-accent);
  font-size: 11px;
}

.scholarship-document-card > p {
  color: #4e6258;
  font-size: 12px;
  line-height: 1.5;
}

.scholarship-document-card .action-button {
  justify-self: start;
}

.scholarship-document-card[hidden],
.scholarship-type-tile[hidden],
#scholarshipDocumentEmpty[hidden],
#scholarshipTypeEmpty[hidden] {
  display: none;
}

.scholarship-document-card:focus-within {
  border-color: var(--document-accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--document-accent) 18%, transparent);
}

.scholarship-document-rules {
  display: grid;
  grid-template-columns: minmax(220px, .72fr) minmax(0, 1.28fr);
  gap: 26px;
  padding: 24px 28px;
  border-left: 6px solid var(--document-gold);
  border-radius: 8px 24px 24px 8px;
  background: #fff9e8;
}

.scholarship-document-rules h3 {
  margin: 4px 0 0;
  color: var(--document-navy);
  font-size: 20px;
}

.scholarship-document-rules ol {
  display: grid;
  gap: 9px;
  margin: 0;
  padding-left: 20px;
  color: #5d572e;
  line-height: 1.55;
}

.scholarship-document-rule {
  display: grid;
  align-content: center;
  gap: 3px;
  padding: 11px 13px;
  border-left: 4px solid #00a6a6;
  background: #edf9f8;
  color: #4c6761;
}

.scholarship-document-rule strong {
  color: #245aa8;
}

.scholarship-packet-recipient-list {
  display: grid;
  gap: 14px;
}

.scholarship-packet-recipient-list > p,
.scholarship-document-loading {
  margin: 0;
  padding: 24px;
  border: 1px dashed #b7cbc1;
  border-radius: 14px;
  background: #f6faf8;
  color: #687970;
  text-align: center;
}

.scholarship-packet-recipient {
  overflow: hidden;
  border: 1px solid #d4e1da;
  border-radius: 18px 10px 20px 12px;
  background: #fff;
}

.scholarship-packet-recipient > header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  background: #edf6f1;
}

.scholarship-recipient-toggle {
  display: flex !important;
  align-items: center;
  gap: 10px !important;
  color: #1f4735 !important;
}

.scholarship-recipient-toggle input {
  width: 18px !important;
  height: 18px;
  accent-color: #245aa8;
}

.scholarship-recipient-toggle strong,
.scholarship-recipient-toggle small {
  display: block;
}

.scholarship-recipient-toggle small {
  margin-top: 2px;
  color: #64776d;
  font-weight: 500;
}

.scholarship-readiness-badges {
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 5px;
}

.scholarship-readiness-badges span {
  padding: 4px 7px;
  border-radius: 999px;
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
}

.scholarship-readiness-badges .ready {
  background: #eaf2ff;
  color: #245aa8;
}

.scholarship-readiness-badges .missing {
  background: #fff0e8;
  color: #a04420;
}

.scholarship-recipient-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding: 16px;
}

.scholarship-recipient-fields label {
  display: grid;
  gap: 5px;
  color: #586b61;
  font-size: 11px;
}

.scholarship-recipient-fields label.wide {
  grid-column: 1 / -1;
}

.scholarship-recipient-fields input,
.scholarship-recipient-fields textarea {
  width: 100%;
}

.scholarship-support-checklist {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px 14px;
  margin: 0 16px 16px;
  padding: 13px 15px 15px;
  border: 1px solid #d9e4de;
  border-radius: 12px;
}

.scholarship-support-checklist legend {
  padding: 0 6px;
  color: #295b43;
  font-size: 11px;
  font-weight: 800;
}

.scholarship-support-checklist label {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  color: #53665c;
  font-size: 11px;
}

.scholarship-support-checklist input {
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
  accent-color: #245aa8;
}

.scholarship-invoice-lines {
  display: grid;
  overflow: hidden;
  border: 1px solid #d7e2dc;
  border-radius: 14px;
}

.scholarship-invoice-lines > p {
  margin: 0;
  padding: 22px;
  color: #687a70;
  text-align: center;
}

.scholarship-invoice-line {
  display: grid !important;
  grid-template-columns: 68px minmax(0, 1fr) 110px 120px;
  align-items: center !important;
  gap: 10px !important;
  min-height: 52px;
  padding: 8px 12px;
  border-bottom: 1px solid #e0e8e4;
}

.scholarship-invoice-line:last-child {
  border-bottom: 0;
}

.scholarship-invoice-line.header {
  min-height: 38px;
  background: #edf6f1;
  color: #315844;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.scholarship-invoice-line strong,
.scholarship-invoice-line small {
  display: block;
}

.scholarship-invoice-line small {
  margin-top: 2px;
  color: #6c7c74;
}

.scholarship-invoice-line input {
  width: 18px !important;
  height: 18px;
  accent-color: #245aa8;
}

@media (max-width: 1050px) {
  .scholarship-command-band {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .scholarship-command-actions {
    justify-content: flex-start;
  }

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

  .scholarship-metric-strip > div:nth-child(2) {
    border-right: 0;
  }

  .scholarship-analytics-flow {
    grid-template-columns: 1fr;
  }

  .scholarship-document-rules {
    grid-template-columns: 1fr;
  }

  .scholar-profile-form {
    grid-template-columns: 190px minmax(0, 1fr);
  }

  .scholar-photo-preview {
    width: 190px;
  }

  .scholar-household-grid {
    grid-template-columns: minmax(190px, 1.35fr) 62px 132px 116px 130px 122px minmax(170px, 1.2fr) minmax(150px, 1fr) 126px 38px;
  }
}

@media (max-width: 760px) {
  .scholarship-command-band {
    min-height: 0;
    padding: 22px;
    border-radius: 28px 16px 32px 18px;
  }

  .scholarship-command-band h2 {
    font-size: 25px;
  }

  .scholarship-metric-strip,
  .scholarship-form-grid,
  .scholar-view-grid {
    grid-template-columns: 1fr;
  }

  .scholarship-metric-strip > div,
  .scholarship-metric-strip > div:nth-child(n) {
    border-right: 0;
    border-bottom: 1px solid rgba(36, 90, 168, 0.12);
  }

  .scholarship-data-surface {
    padding: 14px;
  }

  .scholarship-data-toolbar {
    grid-template-columns: 1fr;
  }

  .scholarship-recipient-fields,
  .scholarship-support-checklist {
    grid-template-columns: 1fr;
  }

  .scholarship-invoice-line {
    grid-template-columns: 52px minmax(0, 1fr) 86px;
  }

  .scholarship-invoice-line > :last-child {
    grid-column: 2 / -1;
  }

  .scholarship-data-toolbar > select {
    width: 100%;
  }

  .scholarship-modal-backdrop {
    padding: 8px;
  }

  .scholarship-modal {
    width: calc(100vw - 16px);
    max-height: calc(100vh - 16px);
    border-radius: 16px;
  }

  .scholarship-modal-header,
  .scholarship-modal-footer,
  .scholarship-modal-body {
    padding: 16px;
  }

  .scholar-profile-form {
    grid-template-columns: 1fr;
  }

  .scholar-photo-editor {
    position: static;
  }

  .scholar-photo-preview {
    width: min(230px, 100%);
  }

  .scholar-form-section {
    grid-column: 1;
  }

  .scholar-view-hero {
    grid-template-columns: 120px minmax(0, 1fr);
  }

  .scholar-view-photo {
    width: 120px;
  }

  .scholar-dynamic-row,
  .scholar-dynamic-row.document-row,
  .scholar-dynamic-row.renewal-item-row,
  .scholar-dynamic-row.evaluation-criterion-row,
  .renewal-response-row,
  .evaluation-score-row,
  .renewal-evaluation-hero,
  .renewal-score-line,
  .renewal-adjustment {
    grid-template-columns: 1fr;
  }

  .renewal-rating {
    justify-items: start;
  }

  .renewal-score-line strong,
  .renewal-score-line b {
    text-align: left;
  }

  .batch-edit-summary {
    align-items: stretch;
    flex-direction: column;
  }

  .batch-edit-summary label {
    width: 100%;
  }

  .renewal-adjustment small {
    grid-column: 1;
  }

  .scholar-dynamic-row.household-row.scholar-household-grid {
    grid-template-columns: minmax(190px, 1.35fr) 62px 132px 116px 130px 122px minmax(170px, 1.2fr) minmax(150px, 1fr) 126px 38px;
  }

  .account-role-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 1180px) {
  .flow-analytics .analytics-signal-strip,
  .flow-analytics .analytics-kpi-grid.detailed {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .flow-analytics .analytics-kpi:nth-child(3n) {
    border-right: 0;
  }

  .flow-analytics .analytics-signal-strip.four-signals {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .flow-analytics .analytics-signal-strip.four-signals .analytics-kpi:nth-child(3n) {
    border-right: 1px solid rgba(255, 255, 255, 0.15);
  }

  .flow-analytics .analytics-signal-strip.four-signals .analytics-kpi:nth-child(even) {
    border-right: 0;
  }

  .database-flow-analytics .analytics-card,
  .database-flow-analytics .analytics-card:nth-child(n),
  .nutrition-flow-analytics .analytics-card,
  .nutrition-flow-analytics .analytics-card:nth-child(n),
  .monitoring-flow-analytics .analytics-card,
  .monitoring-flow-analytics .analytics-card:nth-child(n) {
    grid-column: span 6;
  }
}

@media (max-width: 880px) {
  .database-page.flow-data-section,
  .monitoring-page.flow-data-section {
    --flow-data-padding: 18px;
    border-radius: 34px 22px 40px 26px;
  }

  .flow-analytics .analytics-signal-strip,
  .flow-analytics .analytics-kpi-grid.detailed {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .flow-analytics .analytics-kpi:nth-child(3n) {
    border-right: 1px solid rgba(255, 255, 255, 0.15);
  }

  .flow-analytics .analytics-kpi:nth-child(even) {
    border-right: 0;
  }

  .flow-analytics .analytics-signal-strip.four-signals {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .database-flow-analytics .analytics-card,
  .database-flow-analytics .analytics-card:nth-child(n),
  .nutrition-flow-analytics .analytics-card,
  .nutrition-flow-analytics .analytics-card:nth-child(n),
  .monitoring-flow-analytics .analytics-card,
  .monitoring-flow-analytics .analytics-card:nth-child(n) {
    grid-column: auto;
  }
}

@media (max-width: 560px) {
  .database-page.flow-data-section,
  .monitoring-page.flow-data-section {
    --flow-data-padding: 14px;
    margin-top: 22px;
    border-radius: 24px 16px 28px 18px;
  }

  .flow-data-section .table-toolbar {
    padding: 2px 2px 16px;
  }

  .flow-data-section .table-toolbar .search-band {
    padding: 9px 10px;
  }

  .flow-analytics .analytics-signal-strip,
  .flow-analytics .analytics-signal-strip.four-signals,
  .flow-analytics .analytics-kpi-grid.detailed {
    grid-template-columns: 1fr;
    padding: 12px 16px;
    border-radius: 24px 42px 26px 34px;
  }

  .flow-analytics .analytics-kpi,
  .flow-analytics .analytics-kpi:nth-child(n),
  .flow-analytics .analytics-signal-strip.four-signals .analytics-kpi:nth-child(n) {
    border-right: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
  }

  .flow-analytics .analytics-kpi:last-child {
    border-bottom: 0;
  }

  .flow-analytics .analytics-card {
    padding: 18px;
    border-radius: 26px 42px 28px 34px;
  }
}

/* MOO operational records */
.operations-page {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.operations-heading {
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  min-height: 154px;
  padding: 30px 34px 26px;
  border-bottom: 1px solid #cbded2;
  background: linear-gradient(112deg, #f2faf5 0%, #ffffff 58%, #edf5fb 100%);
  overflow: hidden;
}

.operations-heading::after {
  content: "";
  position: absolute;
  right: -44px;
  bottom: -72px;
  width: 230px;
  height: 128px;
  border: 1px solid rgba(36, 90, 168, 0.22);
  border-radius: 50% 0 0 0;
  transform: rotate(-7deg);
}

.operations-heading h2 {
  margin: 5px 0 8px;
  font-size: 28px;
  letter-spacing: 0;
}

.operations-heading p:last-child {
  max-width: 760px;
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.operations-count {
  position: relative;
  z-index: 1;
  min-width: 86px;
  color: #0e6540;
  font-size: 36px;
  font-weight: 800;
  text-align: right;
}

.operations-tabs {
  display: flex;
  gap: 4px;
  padding: 12px 20px 0;
  border-bottom: 1px solid var(--line);
  overflow-x: auto;
}

.operations-tabs button {
  min-height: 40px;
  padding: 0 15px;
  border: 0;
  border-bottom: 3px solid transparent;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
}

.operations-tabs button:hover,
.operations-tabs button.active {
  color: #0f6842;
  border-bottom-color: #1a8a57;
}

.operations-toolbar {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) auto auto auto;
  gap: 10px;
  align-items: center;
  padding: 20px 22px;
  border-bottom: 1px solid var(--line);
  background: #fbfdfc;
}

.operations-toolbar .search-band {
  margin: 0;
}

.archive-toggle {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 42px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}

.archive-toggle select {
  min-width: 180px;
  min-height: 42px;
  border: 1px solid #cddbd3;
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  padding: 0 34px 0 10px;
}

.record-bin-page .operations-table {
  min-width: 820px;
}

.operations-table-scroll {
  width: 100%;
  overflow: auto;
}

.operations-table {
  min-width: 1040px;
  margin: 0;
}

.operations-table th,
.operations-table td {
  padding: 10px 12px;
  vertical-align: top;
}

.operations-table th:first-child,
.operations-table td:first-child {
  position: sticky;
  left: 0;
  z-index: 2;
  width: 92px;
  background: inherit;
}

.operations-table tbody tr:hover td {
  background: #f5faf7;
}

.operations-modal {
  width: min(940px, 96vw);
  max-height: 92vh;
  padding: 0;
  border-radius: 8px;
  overflow: hidden;
}

.operations-modal > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 20px 24px 16px;
  border-bottom: 1px solid var(--line);
  background: #f2f8f4;
}

.operations-modal > header h2 {
  margin: 3px 0 0;
}

.operations-modal form {
  display: grid;
  min-height: 0;
  overflow: hidden;
}

.operations-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 16px;
  max-height: calc(92vh - 170px);
  padding: 22px 24px;
  overflow-y: auto;
}

.operations-form-grid label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.operations-form-grid label.wide {
  grid-column: 1 / -1;
}

.operations-form-grid input,
.operations-form-grid select,
.operations-form-grid textarea {
  width: 100%;
  min-height: 43px;
  padding: 9px 11px;
  border: 1px solid #cbd8d0;
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  font: inherit;
}

.operations-form-grid textarea {
  min-height: 86px;
  resize: vertical;
}

.operations-modal .form-actions {
  padding: 14px 24px 18px;
  border-top: 1px solid var(--line);
  background: #fff;
}

.operations-dashboard {
  display: grid;
  gap: 0;
  min-width: 0;
  background: #fff;
}

.operations-overview-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px;
  gap: 54px;
  align-items: end;
  min-height: 260px;
  padding: 46px 52px 38px;
  color: #ecfff4;
  background: linear-gradient(118deg, #0c5a3b 0%, #154b3a 58%, #173f46 100%);
  clip-path: polygon(0 0, 100% 0, 100% 88%, 70% 100%, 0 93%);
}

.operations-overview-hero h2 {
  max-width: 780px;
  margin: 7px 0 14px;
  color: #fff;
  font-size: 36px;
  line-height: 1.08;
  letter-spacing: 0;
}

.operations-overview-hero p:last-child {
  max-width: 680px;
  margin: 0;
  color: #cfe8db;
  line-height: 1.65;
}

.operations-overview-total {
  display: grid;
  gap: 4px;
  padding: 0 0 22px 24px;
  border-left: 1px solid rgba(255,255,255,.24);
}

.operations-overview-hero .eyebrow {
  color: #b9e8c7;
}

.operations-overview-total span,
.operations-overview-total em {
  color: #cfe8db;
  font-size: 12px;
  font-style: normal;
  text-transform: uppercase;
}

.operations-overview-total strong {
  font-size: 58px;
  line-height: 1;
}

.operations-signal-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 8px 52px 0;
  border-bottom: 1px solid var(--line);
}

.operations-signal-strip button {
  display: grid;
  gap: 6px;
  padding: 24px 22px;
  border: 0;
  border-right: 1px solid var(--line);
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.operations-signal-strip button:last-child {
  border-right: 0;
}

.operations-signal-strip span {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}

.operations-signal-strip strong {
  color: #145f40;
  font-size: 28px;
}

.operations-overview-flow {
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 46px;
  padding: 38px 52px 52px;
}

.operations-attention-list,
.operations-audit-stream {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.operations-attention-list button,
.operations-audit-stream li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  min-height: 52px;
  padding: 10px 0;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  text-align: left;
}

.operations-attention-list button {
  cursor: pointer;
}

.operations-attention-list span,
.operations-audit-stream span,
.operations-audit-stream time {
  color: var(--muted);
  font-size: 12px;
}

.operations-audit-stream li {
  grid-template-columns: 90px minmax(0, 1fr) auto;
}

.account-program-roles {
  display: grid;
  gap: 10px;
}

@media (max-width: 900px) {
  .operations-toolbar,
  .operations-overview-flow,
  .operations-overview-hero {
    grid-template-columns: 1fr;
  }

  .operations-signal-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-inline: 24px;
  }

  .operations-overview-hero,
  .operations-overview-flow {
    padding-inline: 26px;
  }

  .operations-overview-total {
    border-left: 0;
    border-top: 1px solid rgba(255,255,255,.24);
    padding: 18px 0 24px;
  }
}

@media (max-width: 880px) {
  .app-sidebar {
    max-height: 44vh;
    overflow-y: auto;
    overscroll-behavior: contain;
  }
}

@media (max-width: 620px) {
  .operations-heading,
  .operations-form-grid {
    grid-template-columns: 1fr;
    padding-inline: 16px;
  }

  .operations-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .operations-form-grid label.wide {
    grid-column: auto;
  }

  .operations-signal-strip {
    grid-template-columns: 1fr;
  }

  .operations-signal-strip button {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
}

/* Protected program document archive */
.document-archive-page {
  display: grid;
  gap: 22px;
  max-width: 1500px;
  margin: 0 auto;
}

.document-archive-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 30px;
  min-height: 190px;
  padding: 34px 38px;
  overflow: hidden;
  border: 1px solid #cdded5;
  border-radius: 8px 56px 8px 8px;
  background:
    linear-gradient(118deg, rgba(229, 246, 236, .96), rgba(249, 252, 251, .98) 56%, rgba(234, 243, 251, .96));
  box-shadow: 0 18px 42px rgba(31, 74, 54, .08);
}

.document-archive-hero h2 {
  margin: 5px 0 9px;
  color: #113d2b;
  font-size: 30px;
  line-height: 1.15;
}

.document-archive-hero p:last-child {
  max-width: 700px;
  margin: 0;
  color: var(--muted);
}

.document-service-status {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  min-width: 245px;
  padding: 14px 16px;
  border: 1px solid #c8d9d0;
  border-radius: 8px 28px 8px 8px;
  background: rgba(255, 255, 255, .82);
}

.document-service-status > span {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 50%;
  background: var(--green-soft);
  color: var(--green-dark);
}

.document-service-status svg,
.document-drop-icon svg,
.document-name-cell svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
}

.document-service-status strong,
.document-service-status small {
  display: block;
}

.document-service-status small {
  margin-top: 3px;
  color: var(--muted);
}

.document-service-status.offline {
  border-color: #e4c8c3;
  background: #fff8f7;
}

.document-service-status.offline > span {
  background: var(--red-soft);
  color: var(--red);
}

.document-upload-section,
.document-library-section {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.document-upload-section {
  padding: 28px 30px 30px;
  border-top: 4px solid var(--green);
}

.document-section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 22px;
}

.document-section-heading span {
  color: var(--green);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.document-section-heading h3 {
  margin: 3px 0 0;
  font-size: 21px;
}

.document-section-heading p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.document-upload-layout {
  display: grid;
  grid-template-columns: minmax(280px, .85fr) minmax(420px, 1.15fr);
  gap: 24px;
}

.document-drop-zone {
  display: grid;
  min-height: 176px;
  place-items: center;
  align-content: center;
  gap: 7px;
  border: 2px dashed #a9c8b6;
  border-radius: 8px;
  background: #f5faf7;
  color: var(--ink);
  font: inherit;
  cursor: pointer;
  transition: border-color .18s ease, background .18s ease, transform .18s ease;
}

.document-drop-zone:hover,
.document-drop-zone.dragging {
  border-color: var(--green);
  background: #e9f6ee;
  transform: translateY(-2px);
}

.document-drop-icon {
  display: grid;
  width: 48px;
  height: 48px;
  margin-bottom: 4px;
  place-items: center;
  border-radius: 50%;
  background: #dcefe3;
  color: var(--green-dark);
}

.document-drop-zone small {
  color: var(--muted);
}

.document-upload-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  align-content: start;
}

.document-upload-fields label,
.document-filter-row > label:not(.search-band) {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.document-upload-fields input,
.document-upload-fields select,
.document-filter-row select {
  width: 100%;
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid #cbd8d1;
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  font: inherit;
}

.document-file-queue {
  display: grid;
  gap: 0;
  margin-top: 20px;
  border-top: 1px solid var(--line);
}

.document-file-queue > span {
  padding: 16px 2px 0;
  color: var(--muted);
  font-size: 13px;
}

.document-file-queue > div {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto 38px;
  align-items: center;
  gap: 12px;
  min-height: 58px;
  border-bottom: 1px solid var(--line);
}

.document-file-type {
  color: var(--blue);
  font-size: 10px;
  font-weight: 900;
}

.document-file-queue small {
  color: var(--muted);
}

.document-upload-actions {
  display: flex;
  justify-content: flex-end;
  padding-top: 20px;
}

.document-library-section {
  padding-top: 26px;
}

.document-library-section > .document-section-heading {
  padding: 0 30px;
}

.document-filter-row {
  display: grid;
  grid-template-columns: minmax(320px, 1fr) minmax(190px, .28fr) minmax(210px, .32fr) 42px;
  align-items: end;
  gap: 12px;
  padding: 18px 30px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: #f8faf9;
}

.document-filter-row .search-band {
  min-height: 44px;
}

.document-table-host {
  min-height: 220px;
}

.document-table {
  width: 100%;
  min-width: 1120px;
}

.document-table td {
  vertical-align: middle;
}

.document-table td:nth-child(4) strong,
.document-table td:nth-child(4) small {
  display: block;
}

.document-table td:nth-child(4) small {
  margin-top: 3px;
  color: var(--muted);
}

.document-name-cell {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  max-width: 330px;
}

.document-name-cell span {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 6px;
  background: var(--blue-soft);
  color: var(--blue);
}

.document-name-cell svg {
  width: 16px;
  height: 16px;
}

.document-name-cell strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.muted-text {
  color: var(--muted);
}

@media (max-width: 1050px) {
  .document-archive-hero,
  .document-upload-layout {
    grid-template-columns: 1fr;
  }

  .document-service-status {
    width: min(100%, 360px);
  }

  .document-filter-row {
    grid-template-columns: minmax(0, 1fr) minmax(180px, .4fr) 42px;
  }

  .document-filter-row > label:nth-child(3) {
    grid-column: 1 / 2;
  }
}

@media (max-width: 680px) {
  .document-archive-hero,
  .document-upload-section {
    padding: 22px 18px;
  }

  .document-library-section > .document-section-heading,
  .document-filter-row {
    padding-inline: 18px;
  }

  .document-section-heading,
  .document-upload-fields,
  .document-filter-row {
    grid-template-columns: 1fr;
  }

  .document-section-heading {
    display: grid;
  }

  .document-filter-row > label:nth-child(3) {
    grid-column: auto;
  }

  .document-filter-row > .icon-button {
    width: 100%;
  }

  .document-file-queue > div {
    grid-template-columns: 38px minmax(0, 1fr) 38px;
  }

  .document-file-queue small {
    display: none;
  }
}

.finance-request-lines {
  display: grid;
  gap: 12px;
  padding: 18px 0 6px;
  border-top: 1px solid #d9e5de;
}

.finance-request-lines .panel-title-row h3,
.finance-request-lines .panel-title-row span,
.finance-request-lines > p {
  margin: 0;
}

.finance-request-lines > p {
  color: var(--muted);
  font-size: 12px;
}

#financeRequestLineRows {
  display: grid;
  gap: 8px;
}

.finance-request-line {
  display: grid;
  grid-template-columns: minmax(210px, .9fr) minmax(240px, 1.2fr) minmax(120px, .45fr) 40px;
  align-items: end;
  gap: 10px;
  padding: 12px;
  border: 1px solid #dbe6df;
  border-radius: 7px 18px 7px 12px;
  background: #f8fbf9;
}

.finance-request-line label {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.finance-request-total {
  display: flex;
  align-items: baseline;
  justify-content: flex-end;
  gap: 12px;
  padding-top: 5px;
  color: #5b6d63;
}

.finance-request-total strong {
  color: #245aa8;
  font-size: 20px;
}

.operations-decision-modal {
  width: min(520px, calc(100vw - 36px));
}

.operations-decision-modal > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 24px;
  border-bottom: 1px solid #dce6e0;
}

.operations-decision-modal > form {
  display: grid;
  gap: 16px;
  padding: 22px 24px 24px;
}

.operations-decision-modal label {
  display: grid;
  gap: 6px;
}

.operations-decision-modal select,
.operations-decision-modal textarea {
  width: 100%;
  border: 1px solid #cbd9d1;
  border-radius: 6px;
  font: inherit;
}

.operations-decision-modal select {
  min-height: 44px;
  padding: 0 12px;
}

.operations-decision-modal textarea {
  min-height: 100px;
  padding: 11px 12px;
}

@media (max-width: 900px) {
  .finance-request-line {
    grid-template-columns: 1fr 1fr 40px;
  }

  .finance-request-expense {
    grid-column: 1 / -1;
  }
}

@media (max-width: 580px) {
  .finance-request-line {
    grid-template-columns: 1fr 40px;
  }

  .finance-request-line label {
    grid-column: 1 / -1;
  }
}

/* Document Center workspaces */
.scholarship-document-mode {
  gap: 18px;
}

.scholarship-type-browser,
.document-type-workspace {
  border: 1px solid #d7e2dc;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(21, 63, 46, .05);
}

.scholarship-type-browser {
  display: grid;
  gap: 16px;
  padding: 22px 24px 24px;
}

.scholarship-type-browser-heading,
.document-type-workspace-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
}

.scholarship-type-browser-heading h3,
.document-type-workspace-heading h3 {
  margin: 3px 0 0;
  color: #1b365d;
  font-size: 21px;
}

.document-type-workspace-heading p:last-child {
  max-width: 720px;
  margin: 6px 0 0;
  color: #65766d;
  font-size: 12px;
  line-height: 1.5;
}

.scholarship-type-search {
  display: flex;
  width: min(100%, 340px);
  min-height: 44px;
  align-items: center;
  gap: 9px;
  padding: 0 13px;
  border: 1px solid #cbd8d1;
  border-radius: 9px;
  background: #fff;
}

.scholarship-type-search input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
}

.scholarship-type-search:focus-within,
.scholarship-document-search:focus-within {
  border-color: #245aa8;
  box-shadow: 0 0 0 3px rgba(18, 107, 69, .13);
}

.scholarship-type-groups {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.scholarship-type-groups button {
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid #d5e1da;
  border-radius: 999px;
  background: #f7faf8;
  color: #52645b;
  font: inherit;
  font-size: 12px;
  font-weight: 750;
  cursor: pointer;
}

.scholarship-type-groups button:hover,
.scholarship-type-groups button.active {
  border-color: #245aa8;
  background: #245aa8;
  color: #fff;
}

.scholarship-type-count {
  margin: -4px 0 0;
  color: #708078;
  font-size: 12px;
}

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

.scholarship-type-tile {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) 18px;
  min-height: 76px;
  align-items: center;
  gap: 11px;
  padding: 12px 13px;
  border: 1px solid #d9e3de;
  border-radius: 11px;
  background: #fff;
  color: #263b31;
  text-align: left;
  font: inherit;
  cursor: pointer;
  transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}

.scholarship-type-tile:hover {
  transform: translateY(-1px);
  border-color: #75aa8c;
  box-shadow: 0 7px 18px rgba(21, 63, 46, .07);
}

.scholarship-type-tile.active {
  border-color: #245aa8;
  background: #f1f8f4;
  box-shadow: inset 4px 0 #245aa8;
}

.scholarship-type-icon {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 10px;
  background: #e8f5ee;
  color: #245aa8;
}

.scholarship-type-icon.accent-red {
  background: #faecef;
  color: #9b1c31;
}

.scholarship-type-icon.accent-gold {
  background: #fff5d8;
  color: #8a6500;
}

.scholarship-type-icon.accent-navy {
  background: #eaf0f8;
  color: #1b365d;
}

.scholarship-type-icon svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
}

.scholarship-type-tile strong,
.scholarship-type-tile small {
  display: block;
}

.scholarship-type-tile strong {
  font-size: 13px;
  line-height: 1.3;
}

.scholarship-type-tile small {
  margin-top: 4px;
  color: #718078;
  font-size: 10px;
}

.scholarship-type-arrow {
  color: #7b8c83;
  font-size: 22px;
}

.scholarship-type-empty {
  padding: 22px;
  border: 1px dashed #bdcec5;
  border-radius: 10px;
  color: #66776e;
  text-align: center;
}

.document-type-workspace {
  display: grid;
  gap: 16px;
  padding: 22px 24px 24px;
  scroll-margin-top: 20px;
}

.document-type-workspace .document-center-tabs {
  margin-top: 2px;
}

.document-type-workspace .document-upload-section,
.document-type-workspace .document-library-section {
  box-shadow: none;
}

.scholarship-document-mode .document-upload-fields {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.scholarship-document-mode .document-upload-fields > label[hidden],
.scholarship-document-mode .document-filter-row > label[hidden] {
  display: none !important;
}

.scholarship-document-mode .document-filter-row {
  grid-template-columns: minmax(260px, 1fr) minmax(180px, .35fr) 42px;
}

.scholarship-type-groups button:focus-visible,
.scholarship-type-tile:focus-visible,
.scholarship-document-groups button:focus-visible,
.scholarship-document-card .action-button:focus-visible,
.document-center-tabs button:focus-visible {
  outline: 3px solid rgba(27, 54, 93, .35);
  outline-offset: 2px;
}

.document-center-tabs {
  display: inline-grid;
  grid-template-columns: repeat(2, minmax(160px, 1fr));
  width: min(100%, 430px);
  padding: 5px;
  border: 1px solid #cfddd5;
  border-radius: 8px 24px 8px 8px;
  background: #f5f9f7;
}

.document-center-tabs button {
  display: flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border: 0;
  border-radius: 6px 18px 6px 6px;
  background: transparent;
  color: #53655b;
  font: inherit;
  font-weight: 750;
  cursor: pointer;
}

.document-center-tabs button.active {
  background: #245aa8;
  color: #fff;
  box-shadow: 0 8px 20px rgba(18, 107, 69, .18);
}

.document-center-tabs svg,
.document-purpose-cards svg,
.document-retrieve-tools svg,
.document-workspace-modal svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
}

.document-purpose-cards {
  display: grid;
  grid-template-columns: repeat(5, minmax(130px, 1fr));
  gap: 10px;
  margin: 0 0 22px;
}

.document-purpose-cards button {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  min-height: 66px;
  padding: 11px 13px;
  border: 1px solid #d5e1da;
  border-radius: 7px 20px 7px 12px;
  background: #fbfdfc;
  color: #40564b;
  text-align: left;
  cursor: pointer;
  transition: transform .18s ease, border-color .18s ease, background .18s ease;
}

.document-purpose-cards button:hover,
.document-purpose-cards button.active {
  transform: translateY(-2px);
  border-color: #62a984;
  background: #eaf6ef;
  color: #0e6240;
}

.document-purpose-cards button > span {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 50%;
  background: #e2f1e8;
}

.document-purpose-cards strong {
  min-width: 0;
  font-size: 12px;
  line-height: 1.3;
}

.document-retrieve-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.document-retrieve-tools p {
  margin-right: 6px;
}

.document-filter-row {
  grid-template-columns: minmax(280px, 1fr) repeat(3, minmax(165px, .28fr)) 42px;
}

.document-workspace-modal {
  width: min(980px, calc(100vw - 36px));
  max-height: calc(100vh - 48px);
  overflow: auto;
}

.document-workspace-modal > header {
  position: sticky;
  top: 0;
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 22px 26px;
  border-bottom: 1px solid #dce6e0;
  background: rgba(255, 255, 255, .97);
}

.document-workspace-modal h2,
.document-workspace-modal p {
  margin: 0;
}

.document-workspace-modal-body {
  display: grid;
  gap: 24px;
  padding: 24px 26px 30px;
}

.document-workspace-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 16px;
  padding-bottom: 24px;
  border-bottom: 1px solid #dce6e0;
}

.document-workspace-form label {
  display: grid;
  gap: 6px;
  color: #5d6e64;
  font-size: 12px;
  font-weight: 750;
}

.document-workspace-form .wide {
  grid-column: 1 / -1;
}

.document-workspace-form input,
.document-workspace-form select,
.document-workspace-form textarea {
  width: 100%;
  border: 1px solid #cbd9d1;
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  font: inherit;
}

.document-workspace-form input,
.document-workspace-form select {
  min-height: 44px;
  padding: 0 12px;
}

.document-workspace-form textarea {
  padding: 11px 12px;
  resize: vertical;
}

.document-folder-list,
.document-case-list,
.document-template-list,
.document-history-list {
  display: grid;
  gap: 0;
}

.document-folder-list article,
.document-case-list article,
.document-template-list article,
.document-history-list article {
  display: flex;
  min-height: 66px;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 4px;
  border-bottom: 1px solid #e2ebe6;
}

.document-case-list article > div:first-child,
.document-template-list article > div:first-child,
.document-history-list article > div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.document-case-list article > div:first-child > span,
.document-template-list article > div:first-child > span {
  color: #16704a;
  font-size: 10px;
  font-weight: 850;
  text-transform: uppercase;
}

.document-folder-list small,
.document-case-list small,
.document-template-list small,
.document-history-list small,
.document-history-list p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.document-history-list article {
  justify-content: flex-start;
}

.document-history-list article > span {
  display: grid;
  flex: 0 0 38px;
  height: 38px;
  place-items: center;
  border-radius: 50%;
  background: #e7f4ec;
  color: #245aa8;
}

/* Linked beneficiary care records */
.nutrition-care-section {
  padding: 26px 28px 30px;
}

.nutrition-care-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 28px;
  margin-top: 20px;
}

.nutrition-care-grid > section {
  min-width: 0;
  padding-top: 14px;
  border-top: 3px solid #78af91;
}

.nutrition-care-grid h4 {
  margin: 0 0 12px;
  color: #155c3d;
  font-size: 16px;
}

.nutrition-care-modal {
  width: min(900px, calc(100vw - 36px));
  max-height: calc(100vh - 48px);
  overflow: auto;
}

.nutrition-care-modal > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 26px;
  border-bottom: 1px solid #dce6e0;
}

.nutrition-care-form,
.nutrition-care-modal > form {
  padding: 24px 26px;
}

.nutrition-batch-attendance-rows {
  min-height: 150px;
  padding: 0 26px 20px;
}

/* Math Tutorial analytics */
.math-analytics-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(320px, .75fr);
  gap: 18px;
}

.math-progress-chart {
  min-height: 330px;
}

.math-progress-chart svg {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  min-height: 245px;
  overflow: visible;
}

.math-chart-axis {
  stroke: #b8cfc2;
  stroke-width: 2;
}

.math-chart-line {
  fill: none;
  stroke: #245aa8;
  stroke-width: 5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.math-chart-point {
  fill: #f1c857;
  stroke: #245aa8;
  stroke-width: 3;
}

.math-progress-chart text {
  fill: #64766d;
  font-size: 12px;
  font-weight: 700;
}

.allocation-excess-note {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 12px;
  padding: 14px 16px;
  border-left: 4px solid #d3a61f;
  background: #fff8df;
  color: #6c5616;
}

#accountScholarProfileField small {
  color: var(--muted);
  font-weight: 500;
}

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

  .document-purpose-cards {
    grid-template-columns: repeat(3, minmax(150px, 1fr));
  }

  .document-filter-row {
    grid-template-columns: minmax(260px, 1fr) repeat(2, minmax(160px, .45fr)) 42px;
  }

  .document-filter-row > label:nth-of-type(4) {
    grid-column: 1 / 2;
  }

  .math-analytics-grid,
  .nutrition-care-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 680px) {
  .scholarship-type-browser,
  .document-type-workspace,
  .scholarship-document-browser {
    padding: 17px;
  }

  .scholarship-type-browser-heading,
  .document-type-workspace-heading,
  .scholarship-document-browser-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .scholarship-type-search,
  .scholarship-document-search {
    width: 100%;
  }

  .scholarship-type-grid,
  .scholarship-document-grid,
  .scholarship-document-mode .document-upload-fields {
    grid-template-columns: 1fr;
  }

  .document-center-tabs,
  .document-purpose-cards,
  .document-workspace-form {
    grid-template-columns: 1fr;
  }

  .document-workspace-form .wide,
  .document-filter-row > label:nth-of-type(4) {
    grid-column: auto;
  }

  .document-retrieve-tools {
    justify-content: flex-start;
  }

  .nutrition-care-section,
  .document-workspace-modal-body,
  .nutrition-care-form,
  .nutrition-care-modal > form {
    padding-inline: 18px;
  }
}
