:root {
  color-scheme: light;
  --ink: #152f32;
  --muted: #4b6162;
  --canvas: #f2f6f5;
  --paper: #fff;
  --line: #cbd9d7;
  --teal: #135c53;
  --focus: #006f75;
  --bar: #15383a;
  --done-bg: #e2f1e8;
  --done-fg: #174f39;
  --pending-bg: #f6edd6;
  --pending-fg: #684810;
  --radius: 8px;
  font: 15px/1.45 "Aptos", "Segoe UI", system-ui, sans-serif;
  background: var(--canvas);
  color: var(--ink);
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; }
[hidden] { display: none !important; }
a { color: var(--teal); text-underline-offset: .18em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: clamp(2rem, 4vw, 2.8rem); line-height: 1.1; letter-spacing: -.045em; overflow-wrap: anywhere; }
h2 { font-size: 1.25rem; line-height: 1.25; letter-spacing: -.02em; }
h3 { font-size: 1rem; }
.muted, .hint { color: var(--muted); }
.hint { display: block; font-size: .875rem; margin-top: 5px; }
.narrow { max-width: 36rem; }
.wide { grid-column: 1 / -1; }

.top { background: var(--bar); color: #fff; }
.top-inner {
  display: flex;
  align-items: center;
  gap: 2.5rem;
  width: min(100% - 3rem, 72rem);
  min-height: 64px;
  margin: auto;
}
.top-inner a { color: #f1fcf9; text-decoration: none; }
.top-inner a:hover { text-decoration: underline; }
.top-inner :focus-visible { outline-color: #b8f3de; }
.brand { display: inline-flex; align-items: center; gap: .55rem; font-size: 1.18rem; font-weight: 750; letter-spacing: -.025em; white-space: nowrap; }
.brand img { flex: none; padding: 3px; border-radius: 6px; background: #f3faf6; }
.brand b { color: #a9d7c7; font-weight: inherit; }
.top nav { display: flex; align-items: stretch; gap: 1.35rem; align-self: stretch; }
.top nav a { display: grid; align-content: center; border-bottom: 2px solid transparent; font-size: .95rem; }
.top nav a.current { border-color: #a9d7c7; }
.account { display: flex; align-items: center; min-width: 0; gap: 1rem; margin-left: auto; font-size: .9rem; }
.account a { max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.exit {
  border: 1px solid #8dadab;
  border-radius: 5px;
  background: transparent;
  color: #fff;
  padding: 4px 10px;
}
.exit:hover { background: #285053; }

.shell { width: min(100% - 3rem, 72rem); margin: 0 auto; padding: 2.6rem 0 4rem; }
.page-top { display: flex; justify-content: space-between; align-items: flex-end; gap: 1.25rem; margin: 0 0 1.5rem; }
.page-top h1 + p { margin-top: .55rem; }
.back { display: inline-block; margin-bottom: 1rem; font-size: .92rem; }
.record { margin: 0 0 .45rem; color: var(--muted); font-size: .94rem; font-weight: 650; overflow-wrap: anywhere; }
.group { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem; }
.card { padding: 1.4rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); min-width: 0; }
.card > h2 { margin-bottom: 1rem; }
.stack, .form-stack { display: grid; align-content: start; gap: 1rem; min-width: 0; }
.form-stack { max-width: 55rem; }
.section-top { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: .8rem; }
.record-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(15rem, .42fr); align-items: start; gap: 1.1rem; }
.step-record-grid { grid-template-columns: minmax(0, 1fr) minmax(11rem, .27fr); }
.empty { min-height: 12rem; display: grid; place-content: center; justify-items: center; text-align: center; }
.error-page { margin: 2rem auto; }
.error-page .alert { margin: 1rem 0; }

.analytics-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr)); gap: .8rem; }
.analytics-kpi { display: grid; align-content: start; gap: .4rem; padding: 1rem; border-top: 3px solid var(--teal); }
.analytics-kpi h2 { margin: 0; font-size: .92rem; font-weight: 650; }
.analytics-kpi strong { font-size: 1.75rem; font-variant-numeric: tabular-nums; }
.analytics-kpi .muted { font-size: .82rem; }
.analytics-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 24rem), 1fr)); gap: 1rem; }
.analytics-grid h2 { margin: 0; }
.analytics-meter { display: grid; grid-template-columns: minmax(7rem, 1fr) minmax(4rem, 2fr) auto; align-items: center; gap: .6rem; }
.analytics-meter meter { width: 100%; }
meter { accent-color: var(--teal); }
.analytics-table th[scope="row"] { background: transparent; }
.analytics-table :is(th, td) { padding: .65rem .8rem; }
.analytics-table meter { width: 4rem; vertical-align: middle; }
.analytics-personnel { margin-top: 1rem; }

button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
.button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-height: 42px;
  text-align: center;
  padding: .56rem .95rem;
  background: var(--teal);
  border: 1px solid var(--teal);
  border-radius: 6px;
  color: #fff;
  text-decoration: none;
  font-weight: 650;
  font-size: .94rem;
}
.button:hover { background: #0d4c45; text-decoration: none; }
.button.secondary { background: var(--paper); color: var(--teal); border-color: #8eb0a9; }
.button.secondary:hover { background: #e6f2ee; }
.button.small { min-height: 36px; padding: .38rem .7rem; font-size: .875rem; }
label, legend { font-size: .91rem; font-weight: 650; }
label:not(.check) { display: block; margin-bottom: .3rem; }
input:not([type="checkbox"]), textarea, select {
  width: 100%;
  min-width: 0;
  border: 1px solid #9eb4b0;
  border-radius: 5px;
  background: var(--paper);
  color: var(--ink);
  padding: .56rem .66rem;
}
input[type="file"] { font-size: .84rem; }
input[type="file"]::file-selector-button { border: 0; border-radius: 4px; padding: .25rem .5rem; margin-right: .5rem; background: #e4f1ec; color: var(--ink); cursor: pointer; }
input[type="checkbox"] { width: 1rem; height: 1rem; accent-color: var(--teal); flex: none; }
textarea { resize: vertical; display: block; }
.required { color: #8b381e; }
.fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .95rem 1rem; }
.options {
  display: flex;
  flex-wrap: wrap;
  gap: .45rem 1rem;
  min-width: 0;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: .55rem .72rem .7rem;
}
legend { padding: 0 .25rem; }
.check { display: inline-flex; align-items: center; gap: .25rem; font-weight: 500; }
.notify { padding: .85rem 1rem; border: 1px solid var(--line); border-radius: 6px; background: #ecf5f1; }
.notify p { font-size: .9rem; }
.email-fields > p { margin: .35rem 0 .65rem; }
.notice, .alert { padding: .7rem .95rem; border: 1px solid #a1cdb6; border-radius: 6px; background: var(--done-bg); color: var(--done-fg); }
.notice { margin-bottom: 1rem; }
.alert { background: #f9e8e2; color: #782e1d; border-color: #e8b7a9; }

.filters {
  display: grid;
  grid-template-columns: minmax(10rem, 2fr) auto;
  align-items: end;
  gap: .8rem;
  margin-bottom: 1rem;
  padding: .9rem 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #eaf1ef;
}
.process-filters {
  grid-template-columns: minmax(9rem, 2fr) repeat(4, minmax(6rem, 1fr)) max-content auto;
}
.analytics-filters { grid-template-columns: repeat(6, minmax(0, 1fr)) auto; }
.page-size select, .notify-choice { width: 5rem; }
.select-search { position: relative; display: flex; align-items: stretch; gap: .25rem; min-width: 0; }
.page-size .select-search { width: max-content; }
.select-search-trigger {
  display: grid;
  flex: 0 0 1.95rem;
  place-items: center;
  padding: 0;
  border: 1px solid #9eb4b0;
  border-radius: 5px;
  background: var(--paper);
  color: var(--teal);
}
.select-search-trigger::before {
  content: "";
  width: .64rem;
  height: .64rem;
  border: 1.5px solid currentColor;
  border-radius: 50%;
  transform: translate(-1px, -1px);
  grid-area: 1 / 1;
}
.select-search-trigger::after {
  content: "";
  width: .35rem;
  height: 1.5px;
  background: currentColor;
  transform: translate(4px, 4px) rotate(45deg);
  grid-area: 1 / 1;
}
.select-search-trigger:hover, .select-search-trigger[aria-expanded="true"] { background: #e4f1ec; }
.select-search-panel {
  position: absolute;
  z-index: 5;
  inset-block-start: calc(100% + .3rem);
  inset-inline-start: 0;
  width: max(100%, 12rem);
  max-width: calc(100vw - 3rem);
  padding: .45rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--paper);
  box-shadow: 0 8px 18px #15383a22;
}
.page-size .select-search-panel { inset-inline: auto 0; }
.select-search-results { display: grid; max-height: 12rem; margin-top: .3rem; overflow-y: auto; }
.select-search-results button {
  padding: .4rem .5rem;
  border: 0;
  border-radius: 3px;
  background: transparent;
  color: var(--ink);
  text-align: left;
  overflow-wrap: anywhere;
}
.select-search-results button:is(:hover, :focus-visible, .selected) { background: #e4f1ec; }
.select-search-results button:focus-visible { outline-offset: -2px; }
.select-search-results p { padding: .4rem .5rem; color: var(--muted); }
.filter-buttons { display: flex; gap: .65rem; align-items: center; }
.reset { font-size: .88rem; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); }
.register { border-collapse: collapse; min-width: 660px; width: 100%; }
.register th, .register td { padding: .85rem 1rem; border-bottom: 1px solid #dce7e4; text-align: left; vertical-align: middle; }
.register th { background: #e7f0ed; color: #2e4e4d; font-size: .86rem; }
.register tr:last-child td { border: 0; }
.register tbody tr:hover { background: #f7faf9; }
.row-title { font-weight: 700; overflow-wrap: anywhere; }
.row-meta { display: block; color: var(--muted); font-size: .83rem; }
.pill { display: inline-block; width: fit-content; padding: .2rem .54rem; border-radius: 5px; font-size: .8rem; font-weight: 650; white-space: nowrap; }
.pill.done { background: var(--done-bg); color: var(--done-fg); }
.pill.pending { background: var(--pending-bg); color: var(--pending-fg); }
.pages { display: flex; justify-content: center; gap: 1rem; margin-top: 1rem; }

.workflow-list { display: grid; max-width: 50rem; gap: .65rem; }
.workflow-choice {
  display: grid;
  grid-template-columns: minmax(8rem, .7fr) 1.6fr auto;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.15rem;
  border: 1px solid var(--line);
  border-left: 4px solid #357b6c;
  border-radius: var(--radius);
  background: var(--paper);
  text-decoration: none;
}
.workflow-choice:hover { background: #e8f4ee; }
.workflow-choice strong { font-size: 1.05rem; }
.workflow-choice span:nth-child(2) { color: var(--muted); font-size: .93rem; }
.history ol, .file-list { margin: 0; padding: 0; list-style: none; }
.step-register { min-width: 25rem; }
.step-register th, .step-register td { padding: .65rem .75rem; }
.step-detail-text { white-space: pre-wrap; overflow-wrap: anywhere; }
.history li { padding: .66rem 0 .66rem .8rem; border-left: 2px solid #b6d5c9; overflow-wrap: anywhere; font-size: .94rem; }
.history li > span { display: block; color: var(--muted); font-size: .82rem; }
.step-record-grid .history { font-size: .83rem; }
.step-record-grid .history h2 { font-size: 1rem; }
.step-record-grid .history li { padding: .45rem 0 .45rem .6rem; font-size: inherit; }
.step-record-grid .history li > span { font-size: .75rem; }
.facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .45rem 1rem; margin: .55rem 0 1rem; }
.facts div { border-top: 1px solid #dce7e4; padding: .48rem 0; min-width: 0; }
.facts dt { font-weight: 650; color: var(--muted); font-size: .85rem; }
.facts dd { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.file-list li { padding: .45rem 0; border-bottom: 1px solid #dce7e4; overflow-wrap: anywhere; }
.file-list li span { display: block; font-size: .82rem; color: var(--muted); }
.login-page {
  min-height: 100vh;
  background: radial-gradient(ellipse at 9% 4%, #fbfcfb 0, #e8ede9 58%, #e2e8e3 100%);
}
.login-shell {
  display: grid;
  align-items: center;
  min-height: 100vh;
  padding: clamp(1rem, 4.7vh, 2.25rem) clamp(1rem, 5vw, 4.5rem);
}
.login {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  width: min(100%, 594px);
  min-height: 310px;
  margin: 0 auto;
  overflow: hidden;
  border: 1px solid #fff;
  border-radius: 14px;
  background: white;
  box-shadow: 0 22px 58px #213b2d25;
}
.login-identity, .login-access { padding: 1.35rem 1.55rem; }
.login-identity { display: grid; grid-template-rows: auto 1fr auto; gap: .85rem; }
.login-eyebrow { color: #267344; font-size: .82rem; font-weight: 750; letter-spacing: .14em; line-height: 1.3; text-transform: uppercase; }
.login-identity-heading { position: relative; padding-bottom: .65rem; border-bottom: 1px solid #dbe3dd; }
.login-identity-heading::after { content: ""; position: absolute; bottom: -1px; left: 0; width: 2.5rem; height: 2px; background: #216447; border-radius: 2px; }
.login-lockup { display: grid; justify-items: center; align-self: center; text-align: center; }
.login-lockup img { display: block; width: 7rem; height: auto; }
.login-wordmark { margin-top: .25rem; color: #08482e; font-size: 1.95rem; font-weight: 800; letter-spacing: -.055em; line-height: 1.1; }
.login-wordmark span { color: #00823b; }
.login-signature { margin-top: .35rem; color: #18573c; font-size: .7rem; font-weight: 750; letter-spacing: .32em; text-transform: uppercase; }
.login-description { margin-top: .55rem; color: #285e48; font-size: .86rem; }
.login-environment { display: flex; align-items: center; gap: .5rem; color: #506459; font-size: .8rem; }
.login-indicator { width: .45rem; height: .45rem; border-radius: 50%; background: #3b8d50; box-shadow: 0 0 0 3px #e4f2e7; }
.login-access { display: grid; align-content: center; gap: .75rem; border-left: 1px solid #d7ded9; background: #f3f5f4; }
.login-subtitle { margin-top: .3rem; color: #506459; font-size: .87rem; }
.login-form { display: grid; gap: .55rem; }
.login-input { position: relative; }
.login-input input { height: 2.4rem; padding-inline: 2.35rem .65rem; border-color: #cbd9d7; border-radius: .45rem; background: #eef4fa; }
.login-icon { position: absolute; top: 50%; left: .6rem; width: 1.35rem; height: 1.35rem; transform: translateY(-50%) scale(.85); color: #576e66; pointer-events: none; }
.login-icon::before, .login-icon::after { content: ""; position: absolute; left: 50%; transform: translateX(-50%); border: 1.5px solid currentColor; }
.login-icon-user::before { top: 1px; width: .52rem; height: .52rem; border-radius: 50%; }
.login-icon-user::after { bottom: 1px; width: 1rem; height: .55rem; border-bottom: 0; border-radius: 1rem 1rem 0 0; }
.login-icon-lock::before { top: 1px; width: .59rem; height: .62rem; border-radius: .5rem .5rem 0 0; }
.login-icon-lock::after { bottom: 1px; width: .9rem; height: .78rem; border-radius: .2rem; background: #eef4fa; }
.login-password-toggle { gap: .55rem; color: #405b50; }
.login-password-toggle input { margin: 0; }
.login-submit { width: 100%; min-height: 2.55rem; justify-content: space-between; padding-inline: .8rem; border-radius: .45rem; background: linear-gradient(100deg, #23704e, #1d5345); font-size: .94rem; }
.login-submit:hover { background: #184c3d; }
.login-submit span { font-size: 1.3rem; line-height: 1; }
.login-help { padding-top: .6rem; border-top: 1px solid #cdd9d1; color: #51675b; font-size: .78rem; text-align: center; }

@media (max-width: 560px) {
  .login { grid-template-columns: 1fr; min-height: 0; }
  .login-access { border-left: 0; border-top: 1px solid #d7ded9; }
  .login-lockup img { width: 6rem; }
  .login-environment { display: none; }
}

@media (max-width: 760px) {
  .top-inner, .shell { width: calc(100% - 2rem); }
  .top-inner { gap: 1rem; }
  .top nav { gap: .7rem; }
  .account { gap: .5rem; }
  .account a { max-width: 7rem; }
  .page-top { align-items: flex-start; flex-direction: column; }
  .record-grid { grid-template-columns: 1fr; }
  .filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 480px) {
  .page-size .select-search-panel { inset-inline: 0 auto; }
  .top-inner { flex-wrap: wrap; padding: .7rem 0 0; gap: .4rem 1rem; }
  .top nav { order: 3; flex-basis: 100%; gap: .85rem; flex-wrap: wrap; }
  .top nav a { padding: .3rem 0; }
  .account { margin-left: auto; }
  .shell { padding-top: 1.5rem; }
  .filters, .fields, .facts { grid-template-columns: 1fr; }
  .workflow-choice { grid-template-columns: 1fr auto; gap: .3rem; }
  .workflow-choice span:nth-child(2) { grid-row: 2; }
  .workflow-choice span:last-child { grid-column: 2; grid-row: 1 / 3; }
  .card { padding: 1rem; }
}
