:root {
  --paper: #edefea;
  --sheet: #ffffff;
  --sheet-2: #f5f6f3;
  --ink: #18231f;
  --ink-2: #46534e;
  --ink-3: #636e69;
  --line: #d6dbd5;
  --line-strong: #b4bcb6;
  --pine: #1f4d3f;
  --pine-deep: #163a30;
  --pine-ink: #e6efea;
  --pine-soft: #dfeae4;
  --signal: #e8a317;
  --signal-soft: #fcf0d2;
  --signal-ink: #6f4a00;
  --steel: #2f5f8a;
  --steel-soft: #e1eaf3;
  --steel-ink: #244b6e;
  --leaf: #2f8a5f;
  --leaf-soft: #ddf0e5;
  --leaf-ink: #1c6141;
  --alert: #b3261e;
  --alert-soft: #f8e2df;
  --alert-ink: #8e1e18;
  --focus: #2f5f8a;
  --font: 'Archivo', 'Segoe UI', system-ui, -apple-system, sans-serif;
  --narrow: 74%;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
p,
dl,
dd {
  margin: 0;
}

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

button {
  cursor: pointer;
}

:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

.hidden {
  display: none !important;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.num {
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.icon {
  display: inline-flex;
  flex: none;
  width: 18px;
  height: 18px;
}

.icon svg {
  width: 100%;
  height: 100%;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.tone-signal { --tone: var(--signal); --tone-soft: var(--signal-soft); --tone-ink: var(--signal-ink); }
.tone-steel { --tone: var(--steel); --tone-soft: var(--steel-soft); --tone-ink: var(--steel-ink); }
.tone-leaf { --tone: var(--leaf); --tone-soft: var(--leaf-soft); --tone-ink: var(--leaf-ink); }
.tone-pine { --tone: var(--pine); --tone-soft: var(--pine-soft); --tone-ink: var(--pine); }
.tone-alert { --tone: var(--alert); --tone-soft: var(--alert-soft); --tone-ink: var(--alert-ink); }

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

.rail {
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  height: 100vh;
  padding: 22px 14px 16px;
  background: var(--pine-deep);
  color: var(--pine-ink);
}

.rail-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 8px 26px;
}

.rail-brand strong,
.portal-brand strong {
  display: block;
  font-size: 15px;
  font-weight: 650;
  line-height: 1.25;
}

.rail-brand div span {
  display: block;
  font-size: 12.5px;
  color: rgba(230, 239, 234, 0.72);
}

.rail-mark {
  display: grid;
  flex: none;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 8px;
  background: var(--signal);
  color: var(--pine-deep);
  font-size: 16px;
  font-weight: 800;
  font-stretch: var(--narrow);
  letter-spacing: 0.02em;
}

.rail-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.rail-link {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 42px;
  padding: 0 12px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: rgba(230, 239, 234, 0.8);
  font-size: 15px;
  text-align: left;
  white-space: nowrap;
}

.rail-link:hover {
  background: rgba(255, 255, 255, 0.07);
  color: #fff;
}

.rail-link.active {
  background: rgba(255, 255, 255, 0.11);
  box-shadow: inset 3px 0 0 var(--signal);
  color: #fff;
  font-weight: 600;
}

.rail-count {
  margin-left: auto;
  padding: 1px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.13);
  font-size: 12.5px;
  font-variant-numeric: tabular-nums;
}

.rail-foot {
  display: grid;
  gap: 4px;
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.netsis-status,
.rail-user {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px;
}

.netsis-status strong,
.rail-user strong {
  display: block;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.3;
}

.netsis-status div span,
.rail-user div span {
  display: block;
  font-size: 12.5px;
  color: rgba(230, 239, 234, 0.72);
}

.netsis-dot {
  display: inline-block;
  flex: none;
  width: 9px;
  height: 9px;
  margin: 0 6px;
  border-radius: 50%;
  background: #4fc985;
  box-shadow: 0 0 0 4px rgba(79, 201, 133, 0.22);
}

.avatar {
  display: grid;
  flex: none;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--pine-soft);
  color: var(--pine);
  font-size: 12.5px;
  font-weight: 700;
}

.avatar.sm {
  width: 28px;
  height: 28px;
  font-size: 11.5px;
}

.main {
  min-width: 0;
  padding: 44px 48px 72px;
}

.page {
  max-width: 1200px;
  margin: 0 auto;
}

.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 28px;
}

.page-head h1 {
  font-size: 46px;
  font-weight: 700;
  font-stretch: var(--narrow);
  line-height: 1;
  letter-spacing: -0.01em;
}

.page-head p {
  max-width: 72ch;
  margin-top: 10px;
  color: var(--ink-2);
  font-size: 16px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  white-space: nowrap;
  transition: background-color 0.15s, border-color 0.15s;
}

.btn-primary {
  background: var(--pine);
  color: #fff;
}

.btn-primary:hover {
  background: var(--pine-deep);
}

.btn-quiet {
  border-color: var(--line);
  background: var(--sheet);
  color: var(--ink);
}

.btn-quiet:hover {
  border-color: var(--line-strong);
  background: var(--sheet-2);
}

.btn-danger {
  border-color: #e3b6b1;
  background: var(--sheet);
  color: var(--alert);
}

.btn-danger:hover {
  background: var(--alert-soft);
}

.btn-block {
  width: 100%;
}

.btn-link {
  padding: 0;
  border: 0;
  background: none;
  color: var(--pine);
  font-size: 14.5px;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.btn-link:hover {
  color: var(--pine-deep);
}

.icon-btn {
  display: grid;
  flex: none;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--ink-2);
}

.icon-btn:hover {
  background: var(--sheet-2);
  color: var(--ink);
}

.flow {
  overflow: hidden;
  margin-bottom: 24px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--sheet);
}

.flow-track {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 0;
  padding: 0;
  list-style: none;
}

.flow-stage + .flow-stage {
  border-left: 1px solid var(--line);
}

.flow-stage button {
  display: grid;
  align-content: start;
  width: 100%;
  height: 100%;
  padding: 22px 24px;
  border: 0;
  background: transparent;
  text-align: left;
  transition: background-color 0.15s;
}

.flow-stage button:hover {
  background: var(--sheet-2);
}

.flow-stage.is-active button {
  background: var(--tone-soft);
  box-shadow: inset 0 -4px 0 var(--tone);
}

.flow-step {
  display: flex;
  align-items: center;
  margin: 0 -24px 14px 0;
}

.flow-step b {
  display: grid;
  flex: none;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 2px solid var(--tone);
  border-radius: 50%;
  background: var(--tone);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
}

.flow-stage.is-empty .flow-step b {
  border-color: var(--line-strong);
  background: var(--sheet);
  color: var(--ink-3);
}

.flow-step::after {
  content: '';
  flex: 1;
  height: 2px;
  margin-left: 10px;
  background: var(--line);
}

.flow-stage:last-child .flow-step::after {
  background: linear-gradient(90deg, var(--line), transparent);
}

.flow-name {
  font-size: 16px;
  font-weight: 650;
}

.flow-count {
  margin: 4px 0 2px;
  font-size: 68px;
  font-weight: 650;
  font-stretch: 62%;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  letter-spacing: -0.02em;
}

.flow-stage.is-empty .flow-count {
  color: var(--line-strong);
}

.flow-sum {
  font-size: 15.5px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.flow-stage.is-empty .flow-sum {
  color: var(--ink-3);
  font-weight: 500;
}

.flow-hint {
  margin-top: 2px;
  color: var(--ink-3);
  font-size: 13.5px;
}

.flow-branch {
  border-top: 1px dashed var(--line-strong);
}

.flow-revision {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 14px 24px;
  border: 0;
  background: transparent;
  color: var(--ink);
  text-align: left;
}

.flow-revision:hover {
  background: var(--sheet-2);
}

.flow-revision .icon {
  width: 20px;
  height: 20px;
  color: var(--alert);
}

.flow-revision.is-empty .icon {
  color: var(--ink-3);
}

.flow-revision.is-active {
  background: var(--alert-soft);
  box-shadow: inset 4px 0 0 var(--alert);
}

.flow-revision-text strong {
  margin-right: 10px;
  font-weight: 650;
}

.flow-revision-text span {
  color: var(--ink-2);
  font-size: 14px;
}

.ledger {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--sheet);
}

.ledger-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 24px;
}

.ledger-head h2 {
  font-size: 22px;
  font-weight: 700;
  font-stretch: var(--narrow);
}

.ledger-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.search {
  position: relative;
  display: block;
}

.search .icon {
  position: absolute;
  top: 12px;
  left: 12px;
  color: var(--ink-3);
  pointer-events: none;
}

.search input {
  width: 300px;
  height: 42px;
  padding: 0 12px 0 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--sheet);
  font-size: 15px;
}

.search input::placeholder,
.field input::placeholder,
.field textarea::placeholder {
  color: #87908b;
}

.search input:focus,
.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--pine);
  outline: none;
  box-shadow: 0 0 0 3px rgba(31, 77, 63, 0.16);
}

.ledger-filter {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 14px;
  padding: 10px 24px;
  border-top: 1px solid var(--line);
  background: var(--sheet-2);
  color: var(--ink-2);
  font-size: 14.5px;
}

.ledger-filter strong {
  color: var(--ink);
}

.ledger-table,
.plain-table {
  width: 100%;
  border-collapse: collapse;
}

.ledger-table th,
.plain-table th {
  padding: 10px 16px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--sheet-2);
  color: var(--ink-3);
  font-size: 13px;
  font-weight: 600;
  text-align: left;
  white-space: nowrap;
}

.ledger-table td,
.plain-table td {
  padding: 16px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}

.ledger-table th:first-child,
.ledger-table td:first-child,
.plain-table th:first-child,
.plain-table td:first-child {
  padding-left: 24px;
}

.ledger-table th:last-child,
.ledger-table td:last-child,
.plain-table th:last-child,
.plain-table td:last-child {
  padding-right: 24px;
}

.ledger-table th.num,
.plain-table th.num {
  text-align: right;
}

.ledger-table tbody tr:last-child td,
.plain-table tbody tr:last-child td {
  border-bottom: 0;
}

.ledger-table tbody tr {
  cursor: pointer;
  transition: background-color 0.12s;
}

.ledger-table tbody tr:hover {
  background: #f3f5f1;
}

.ledger-table tbody tr:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: -2px;
}

.q-id {
  display: block;
  font-size: 15px;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
}

.q-subject {
  display: block;
  max-width: 36ch;
  color: var(--ink-2);
  font-size: 13.5px;
  line-height: 1.4;
}

.q-customer {
  font-weight: 550;
}

.q-date {
  color: var(--ink-2);
  white-space: nowrap;
}

.q-amount {
  font-size: 15.5px;
  font-weight: 650;
}

.person {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
}

.stage {
  display: inline-grid;
  gap: 6px;
}

.meter {
  display: flex;
  gap: 3px;
}

.meter i {
  width: 18px;
  height: 5px;
  border-radius: 2px;
  background: var(--line);
}

.meter i.on {
  background: var(--tone);
}

.tone-alert .meter i.on {
  background: var(--line-strong);
}

.meter i.stop {
  background: var(--alert);
}

.stage-label {
  color: var(--tone-ink);
  font-size: 13.5px;
  font-weight: 600;
  white-space: nowrap;
}

.empty {
  display: grid;
  justify-items: start;
  gap: 8px;
  padding: 40px 24px 44px;
  border-top: 1px solid var(--line);
}

.empty h3 {
  font-size: 18px;
  font-weight: 650;
}

.empty p {
  margin-bottom: 8px;
  color: var(--ink-2);
}

.scrim,
.modal-scrim,
.portal-scrim {
  position: fixed;
  inset: 0;
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.2s, visibility 0.2s;
}

.scrim {
  z-index: 40;
  background: rgba(16, 28, 24, 0.42);
}

.scrim.open,
.modal-scrim.open,
.portal-scrim.open {
  visibility: visible;
  opacity: 1;
}

.drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 50;
  display: flex;
  flex-direction: column;
  width: min(540px, 100%);
  background: var(--sheet);
  box-shadow: -24px 0 48px -24px rgba(16, 28, 24, 0.35);
  visibility: hidden;
  transform: translateX(100%);
  transition: transform 0.28s cubic-bezier(0.2, 0.8, 0.2, 1), visibility 0.28s;
}

.drawer.open {
  visibility: visible;
  transform: none;
}

.drawer-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 28px 18px;
  border-bottom: 1px solid var(--line);
}

.drawer-kicker {
  display: block;
  color: var(--ink-3);
  font-size: 13.5px;
}

.drawer-head h2 {
  font-size: 30px;
  font-weight: 700;
  font-stretch: var(--narrow);
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}

.drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 24px 28px 32px;
}

.drawer-foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
  padding: 16px 28px;
  border-top: 1px solid var(--line);
  background: var(--sheet);
}

.d-summary {
  display: grid;
  gap: 4px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--line);
}

.d-customer {
  font-size: 20px;
  font-weight: 650;
  line-height: 1.3;
}

.d-subject {
  color: var(--ink-2);
}

.d-total {
  display: grid;
  margin: 14px 0 12px;
}

.d-total strong {
  font-size: 44px;
  font-weight: 700;
  font-stretch: var(--narrow);
  font-variant-numeric: tabular-nums;
  line-height: 1;
  letter-spacing: -0.01em;
}

.d-total span {
  margin-top: 6px;
  color: var(--ink-3);
  font-size: 14px;
}

.d-block {
  padding: 24px 0 0;
}

.d-block h3 {
  margin-bottom: 14px;
  font-size: 17px;
  font-weight: 650;
}

.steps {
  display: grid;
  margin: 0;
  padding: 0;
  list-style: none;
}

.step {
  position: relative;
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  gap: 14px;
  padding-bottom: 18px;
}

.step:last-child {
  padding-bottom: 0;
}

.step:not(:last-child)::before {
  content: '';
  position: absolute;
  top: 26px;
  bottom: 2px;
  left: 11px;
  width: 2px;
  background: var(--line);
}

.step.is-done:not(:last-child)::before {
  background: var(--pine);
}

.step-mark {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border: 2px solid var(--line-strong);
  border-radius: 50%;
  background: var(--sheet);
  color: #fff;
}

.step-mark .icon {
  width: 14px;
  height: 14px;
}

.step-mark .icon svg {
  stroke-width: 2.6;
}

.step.is-done .step-mark {
  border-color: var(--pine);
  background: var(--pine);
}

.step.is-current .step-mark {
  border-color: var(--signal);
  background: var(--signal-soft);
  box-shadow: 0 0 0 4px rgba(232, 163, 23, 0.18);
}

.step.is-blocked .step-mark {
  border-color: var(--alert);
  background: var(--alert);
}

.step strong {
  display: block;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.5;
}

.step span:not(.step-mark):not(.icon) {
  display: block;
  color: var(--ink-2);
  font-size: 14px;
}

.step.is-todo strong {
  color: var(--ink-3);
  font-weight: 500;
}

.step.is-current span:not(.step-mark):not(.icon) {
  color: var(--signal-ink);
  font-weight: 600;
}

.step.is-blocked span:not(.step-mark):not(.icon) {
  color: var(--alert-ink);
  font-weight: 600;
}

.items {
  width: 100%;
  border-collapse: collapse;
  font-size: 14.5px;
}

.items th {
  padding: 0 0 8px;
  border-bottom: 1px solid var(--line);
  color: var(--ink-3);
  font-size: 13px;
  font-weight: 600;
  text-align: left;
}

.items th.num {
  text-align: right;
}

.items td {
  padding: 11px 12px 11px 0;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

.items td:nth-child(2) {
  color: var(--ink-2);
  white-space: nowrap;
}

.items td.num {
  padding-right: 0;
}

.items tfoot th,
.items tfoot td {
  padding-top: 12px;
  border-top: 2px solid var(--ink);
  border-bottom: 0;
  color: var(--ink);
  font-size: 16px;
  font-weight: 700;
}

.d-note {
  padding: 12px 14px;
  border-left: 3px solid var(--signal);
  border-radius: 0 8px 8px 0;
  background: #fbf6e6;
}

.d-meta {
  margin-top: 8px;
  color: var(--ink-3);
  font-size: 13.5px;
}

.modal-scrim {
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 16px;
  background: rgba(16, 28, 24, 0.5);
}

.modal {
  width: min(580px, 100%);
  max-height: calc(100vh - 32px);
  overflow-y: auto;
  padding: 24px 28px 28px;
  border-radius: 14px;
  background: var(--sheet);
  box-shadow: 0 30px 60px -20px rgba(16, 28, 24, 0.4);
  transform: translateY(8px);
  transition: transform 0.2s;
}

.modal-scrim.open .modal {
  transform: none;
}

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.modal-head h2,
.sms h2 {
  font-size: 28px;
  font-weight: 700;
  font-stretch: var(--narrow);
}

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

.field {
  display: grid;
  gap: 6px;
}

.field.full {
  grid-column: 1 / -1;
}

.field > span {
  color: var(--ink-2);
  font-size: 14px;
  font-weight: 600;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--sheet);
  font-size: 15px;
}

.field textarea {
  padding: 10px 12px;
  resize: vertical;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 24px;
}

.sms {
  position: relative;
  width: min(440px, 100%);
  text-align: center;
}

.sms-close {
  position: absolute;
  top: 14px;
  right: 14px;
}

.sms h2 {
  margin: 12px 0 8px;
}

.sms > p {
  color: var(--ink-2);
}

.otp {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
  margin: 24px 0 8px;
}

.otp input {
  width: 100%;
  height: 58px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--sheet);
  font-size: 26px;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
  text-align: center;
}

.otp input:focus {
  border-color: var(--pine);
  outline: none;
  box-shadow: 0 0 0 3px rgba(31, 77, 63, 0.16);
}

.otp input.error {
  border-color: var(--alert);
  background: var(--alert-soft);
}

.otp-error {
  min-height: 22px;
  color: var(--alert-ink);
  font-size: 14px;
  font-weight: 600;
}

.sms .demo-code {
  margin: 8px 0 18px;
  padding: 8px 12px;
  border-radius: 8px;
  background: var(--sheet-2);
  color: var(--ink-2);
  font-size: 14px;
}

.demo-code strong {
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.08em;
}

.sms .btn-link {
  margin-top: 14px;
}

.portal-scrim {
  z-index: 70;
  overflow-y: auto;
  background: var(--paper);
}

.portal {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px 48px;
}

.portal-bar {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}

.portal-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.portal-brand div span {
  display: block;
  color: var(--ink-3);
  font-size: 13px;
}

.portal-secure {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
  color: var(--leaf-ink);
  font-size: 14px;
  font-weight: 600;
}

.portal-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  align-items: start;
  gap: 28px;
  margin-top: 32px;
}

.sheet {
  padding: 40px 44px 36px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--sheet);
  box-shadow: 0 18px 40px -26px rgba(16, 28, 24, 0.35);
}

.sheet-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  padding-bottom: 20px;
  border-bottom: 2px solid var(--ink);
}

.sheet-label {
  display: block;
  color: var(--ink-3);
  font-size: 14px;
}

.sheet-head h1 {
  font-size: 42px;
  font-weight: 700;
  font-stretch: var(--narrow);
  font-variant-numeric: tabular-nums;
  line-height: 1.05;
}

.sheet-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 28px;
}

.sheet-facts dt,
.facts dt {
  color: var(--ink-3);
  font-size: 13px;
}

.sheet-facts dd {
  font-size: 15px;
  font-weight: 600;
}

.sheet-to {
  margin: 28px 0 24px;
}

.sheet-to span {
  display: block;
  color: var(--ink-3);
  font-size: 14px;
}

.sheet-to strong {
  display: block;
  font-size: 22px;
  font-weight: 650;
}

.sheet-to p {
  margin-top: 4px;
  color: var(--ink-2);
}

.sheet .items tfoot td {
  font-size: 22px;
}

.sheet-terms {
  margin-top: 22px;
  color: var(--ink-3);
  font-size: 13.5px;
}

.decision {
  position: sticky;
  top: 24px;
  display: grid;
  gap: 12px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--sheet);
}

.decision h2 {
  font-size: 24px;
  font-weight: 700;
  font-stretch: var(--narrow);
  line-height: 1.15;
}

.decision p {
  margin-bottom: 6px;
  color: var(--ink-2);
}

.seal {
  display: grid;
  justify-items: center;
  gap: 2px;
  justify-self: start;
  padding: 14px 22px 12px;
  border: 3px solid var(--leaf);
  border-radius: 10px;
  color: var(--leaf-ink);
  transform: rotate(-3deg);
  animation: stamp 0.42s cubic-bezier(0.2, 0.9, 0.3, 1.2) both;
}

.seal .icon {
  width: 28px;
  height: 28px;
}

.seal .icon svg {
  stroke-width: 2.6;
}

.seal strong {
  font-size: 30px;
  font-weight: 800;
  font-stretch: var(--narrow);
  line-height: 1;
}

.seal span:not(.icon) {
  font-size: 13px;
  font-weight: 600;
}

@keyframes stamp {
  from {
    opacity: 0;
    transform: rotate(-3deg) scale(1.35);
  }
  to {
    opacity: 1;
    transform: rotate(-3deg) scale(1);
  }
}

.portal-foot {
  margin-top: 28px;
  color: var(--ink-3);
  font-size: 13.5px;
}

.toasts {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 90;
  display: grid;
  gap: 10px;
}

.toast {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  width: min(380px, calc(100vw - 40px));
  padding: 14px 16px;
  border-radius: 10px;
  background: var(--pine-deep);
  color: #fff;
  box-shadow: 0 20px 40px -20px rgba(16, 28, 24, 0.6);
  animation: toast-in 0.2s ease-out both;
  transition: opacity 0.25s, transform 0.25s;
}

.toast.leaving {
  opacity: 0;
  transform: translateY(6px);
}

.toast .icon {
  margin-top: 1px;
  color: #7fd8a6;
}

.toast.info .icon {
  color: var(--signal);
}

.toast strong {
  display: block;
  font-size: 15px;
  font-weight: 650;
}

.toast div span {
  display: block;
  color: rgba(255, 255, 255, 0.82);
  font-size: 14px;
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
}

.tiles {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: start;
  gap: 16px;
}

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

.tile {
  display: flex;
  flex-direction: column;
  padding: 22px 24px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--sheet);
}

.tile h2 {
  color: var(--ink-2);
  font-size: 15px;
  font-weight: 600;
}

.tile-value {
  margin: 6px 0 2px;
  font-size: 44px;
  font-weight: 700;
  font-stretch: var(--narrow);
  font-variant-numeric: tabular-nums;
  line-height: 1.05;
}

.tile p {
  color: var(--ink-3);
  font-size: 14px;
}

.bars {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  height: 120px;
  margin-top: auto;
  padding-top: 18px;
}

.bar {
  display: flex;
  flex: 1;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  gap: 6px;
  height: 100%;
}

.bar i {
  width: 100%;
  border-radius: 3px 3px 0 0;
  background: var(--pine);
}

.bar:last-child i {
  background: var(--signal);
}

.bar span {
  color: var(--ink-3);
  font-size: 12.5px;
}

.gauge {
  height: 8px;
  margin-top: auto;
  border-radius: 4px;
  background: var(--line);
}

.tile p + .gauge {
  margin-top: 18px;
}

.gauge i {
  display: block;
  height: 100%;
  border-radius: 4px;
  background: var(--pine);
}

.panel {
  overflow: hidden;
  margin-top: 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--sheet);
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 24px;
  border-bottom: 1px solid var(--line);
}

.panel-head h2 {
  font-size: 20px;
  font-weight: 700;
  font-stretch: var(--narrow);
}

.panel > .plain-table th {
  border-top: 0;
}

.task-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.task-list li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 190px 120px;
  align-items: center;
  gap: 24px;
  padding: 14px 24px;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
}

.task-list li:last-child {
  border-bottom: 0;
}

.task-list li:hover {
  background: #f3f5f1;
}

.task-list strong {
  display: block;
  font-weight: 650;
}

.task-list div span {
  color: var(--ink-2);
  font-size: 14px;
}

.hbars {
  display: grid;
  gap: 14px;
  margin: 18px 0;
}

.hbars div {
  display: grid;
  grid-template-columns: 130px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
}

.hbars dt {
  color: var(--ink-2);
  font-size: 14px;
}

.hbars dd {
  display: flex;
  align-items: center;
  gap: 12px;
}

.hbars dd span {
  flex: 1;
  height: 8px;
  border-radius: 4px;
  background: var(--line);
}

.hbars dd i {
  display: block;
  height: 100%;
  border-radius: 4px;
  background: var(--steel);
}

.hbars dd b {
  width: 64px;
  font-size: 14px;
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.switch-row {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
}

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

.switch-row strong {
  display: block;
  font-weight: 600;
}

.switch-row small {
  display: block;
  color: var(--ink-3);
  font-size: 13.5px;
}

.switch-row input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.switch-row i {
  position: relative;
  flex: none;
  width: 42px;
  height: 24px;
  border-radius: 12px;
  background: var(--line-strong);
  transition: background-color 0.15s;
}

.switch-row i::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  transition: transform 0.15s;
}

.switch-row input:checked + i {
  background: var(--pine);
}

.switch-row input:checked + i::after {
  transform: translateX(18px);
}

.switch-row input:focus-visible + i {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

.tile h2 + .switch-row {
  margin-top: 6px;
}

.facts {
  display: grid;
  margin: 10px 0 18px;
}

.facts div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

.facts dd {
  display: flex;
  align-items: center;
  font-size: 14.5px;
  font-weight: 600;
  text-align: right;
}

.facts .netsis-dot {
  margin-left: 0;
}

.tile .btn {
  align-self: flex-start;
}

.intro {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 24px;
  background: var(--pine-deep);
  color: var(--pine-ink);
  animation: intro-failsafe 0.01s linear 6s forwards;
}

.intro-inner {
  width: min(620px, 100%);
}

.intro-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  animation: intro-fade 0.4s ease-out both;
}

.intro-brand strong {
  display: block;
  font-size: 17px;
  font-weight: 650;
  line-height: 1.25;
}

.intro-brand div span {
  display: block;
  color: rgba(230, 239, 234, 0.7);
  font-size: 14px;
}

.intro-track {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 44px 0 28px;
  padding: 0;
  list-style: none;
}

.intro-track::before,
.intro-track::after {
  content: '';
  position: absolute;
  top: 16px;
  right: 12.5%;
  left: 12.5%;
  height: 2px;
  background: rgba(230, 239, 234, 0.16);
}

.intro-track::after {
  background: var(--pine-ink);
  transform: scaleX(0);
  transform-origin: left center;
  animation: intro-line 1.1s cubic-bezier(0.6, 0, 0.3, 1) 0.25s forwards;
}

.intro-track li {
  position: relative;
  z-index: 1;
  display: grid;
  justify-items: center;
  gap: 10px;
  text-align: center;
}

.intro-track b {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 2px solid rgba(230, 239, 234, 0.3);
  border-radius: 50%;
  background: var(--pine-deep);
  color: rgba(230, 239, 234, 0.5);
  font-size: 14px;
  font-weight: 700;
  animation: intro-step 0.35s cubic-bezier(0.2, 0.9, 0.3, 1.3) forwards;
}

.intro-track li.tone-pine {
  --tone: var(--pine-ink);
}

.intro-track li.tone-pine b {
  --step-ink: var(--pine-deep);
}

.intro-track span {
  color: rgba(230, 239, 234, 0.45);
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.3;
  animation: intro-label 0.3s ease-out forwards;
}

.intro-track li:nth-child(1) b,
.intro-track li:nth-child(1) span {
  animation-delay: 0.25s;
}

.intro-track li:nth-child(2) b,
.intro-track li:nth-child(2) span {
  animation-delay: 0.6s;
}

.intro-track li:nth-child(3) b,
.intro-track li:nth-child(3) span {
  animation-delay: 0.95s;
}

.intro-track li:nth-child(4) b,
.intro-track li:nth-child(4) span {
  animation-delay: 1.3s;
}

.intro-status {
  color: rgba(230, 239, 234, 0.7);
  font-size: 14.5px;
  animation: intro-fade 0.4s ease-out 0.2s both;
}

.intro-status::after {
  content: '';
  display: inline-block;
  width: 1.2em;
  text-align: left;
  animation: intro-dots 1.2s steps(4, end) infinite;
}

body.is-loading .app {
  opacity: 0;
  animation: intro-failsafe-app 0.01s linear 6s forwards;
}

body.is-ready .intro {
  transform: translateY(-100%);
  transition: transform 0.65s cubic-bezier(0.7, 0, 0.25, 1);
}

body.is-ready .app {
  animation: app-in 0.5s ease-out 0.3s both;
}

@keyframes intro-fade {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
}

@keyframes intro-line {
  to {
    transform: scaleX(1);
  }
}

@keyframes intro-step {
  from {
    transform: scale(0.7);
  }
  to {
    border-color: var(--tone);
    background: var(--tone);
    color: var(--step-ink, #fff);
    transform: scale(1);
  }
}

@keyframes intro-label {
  to {
    color: var(--pine-ink);
  }
}

@keyframes intro-dots {
  0% { content: ''; }
  25% { content: '.'; }
  50% { content: '..'; }
  75% { content: '...'; }
}

@keyframes intro-failsafe {
  to {
    visibility: hidden;
    opacity: 0;
  }
}

@keyframes intro-failsafe-app {
  to {
    opacity: 1;
  }
}

@keyframes app-in {
  from {
    opacity: 0;
  }
}

@media (max-width: 1180px) {
  .ledger-table th:nth-child(4),
  .ledger-table td:nth-child(4) {
    display: none;
  }

  .flow-count {
    font-size: 56px;
  }

  .search input {
    width: 240px;
  }
}

@media (max-width: 900px) {
  .app {
    grid-template-columns: minmax(0, 1fr);
  }

  .rail {
    position: fixed;
    top: auto;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 30;
    flex-direction: row;
    height: auto;
    padding: 4px 4px calc(4px + env(safe-area-inset-bottom));
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 -12px 24px -16px rgba(16, 28, 24, 0.5);
  }

  .rail-brand,
  .rail-foot {
    display: none;
  }

  .rail-nav {
    flex: 1;
    flex-direction: row;
    gap: 2px;
  }

  .rail-link {
    position: relative;
    flex: 1 1 0;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    min-width: 0;
    height: 58px;
    padding: 0 2px;
    font-size: 11.5px;
    line-height: 1.1;
    text-align: center;
  }

  .rail-label {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .rail-link.active {
    background: rgba(255, 255, 255, 0.08);
    box-shadow: inset 0 3px 0 var(--signal);
  }

  .rail-count {
    position: absolute;
    top: 5px;
    left: calc(50% + 5px);
    margin: 0;
    padding: 0 5px;
    background: var(--signal);
    color: var(--pine-deep);
    font-size: 10.5px;
    font-weight: 700;
    line-height: 16px;
  }

  .main {
    padding: 28px 20px calc(96px + env(safe-area-inset-bottom));
  }

  .toasts {
    right: 12px;
    bottom: calc(76px + env(safe-area-inset-bottom));
    left: 12px;
  }

  .toast {
    width: 100%;
  }

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

  .flow-stage:nth-child(3) {
    border-left: 0;
  }

  .flow-stage:nth-child(n + 3) {
    border-top: 1px solid var(--line);
  }

  .flow-stage:nth-child(2) .flow-step::after {
    background: linear-gradient(90deg, var(--line), transparent);
  }

  .portal-body {
    grid-template-columns: minmax(0, 1fr);
  }

  .decision {
    position: static;
  }

  .tiles,
  .tiles.two {
    grid-template-columns: minmax(0, 1fr);
  }

  .task-list li {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .task-list li .stage {
    display: none;
  }
}

@media (max-width: 640px) {
  body {
    font-size: 15px;
  }

  .rail-link {
    font-size: 11px;
  }

  .page-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .page-head h1 {
    font-size: 38px;
  }

  .flow-stage button {
    padding: 18px 16px;
  }

  .flow-step {
    margin-right: -16px;
  }

  .flow-count {
    font-size: 48px;
  }

  .flow-hint {
    display: none;
  }

  .flow-revision {
    padding: 14px 16px;
  }

  .flow-revision-text strong {
    display: block;
  }

  .ledger-head {
    padding: 16px;
  }

  .ledger-tools,
  .search,
  .search input {
    width: 100%;
  }

  .ledger-filter {
    padding: 10px 16px;
  }

  .ledger-table thead,
  .plain-table thead {
    display: none;
  }

  .ledger-table tbody tr {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 6px 12px;
    padding: 16px;
    border-top: 1px solid var(--line);
  }

  .ledger-table td,
  .ledger-table td:first-child,
  .ledger-table td:last-child {
    padding: 0;
    border: 0;
  }

  .ledger-table td:nth-child(2) {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .ledger-table td:nth-child(3) {
    display: none;
  }

  .ledger-table td:nth-child(5) {
    grid-column: 2;
    grid-row: 1;
  }

  .ledger-table td:nth-child(6) {
    grid-column: 1 / -1;
    grid-row: 3;
    margin-top: 4px;
  }

  .plain-table tr {
    display: grid;
    gap: 2px;
    padding: 14px 16px;
    border-bottom: 1px solid var(--line);
  }

  .plain-table td,
  .plain-table td:first-child,
  .plain-table td:last-child {
    padding: 0;
    border: 0;
    text-align: left;
  }

  .plain-table td::before {
    content: attr(data-label) ': ';
    color: var(--ink-3);
    font-size: 13px;
  }

  .plain-table td:first-child::before {
    content: none;
  }

  .drawer-head,
  .drawer-body,
  .drawer-foot {
    padding-right: 18px;
    padding-left: 18px;
  }

  .drawer-foot .btn {
    flex: 1;
  }

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

  .modal {
    padding: 20px;
  }

  .portal {
    padding: 0 12px 40px;
  }

  .portal-secure {
    display: none;
  }

  .portal-bar .icon-btn {
    margin-left: auto;
  }

  .sheet {
    padding: 24px 18px;
  }

  .sheet-head h1 {
    font-size: 34px;
  }

  .hbars div {
    grid-template-columns: minmax(0, 1fr);
    gap: 4px;
  }
}

@media (max-width: 640px) {
  .intro-track span {
    font-size: 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .intro {
    display: none;
  }

  body.is-loading .app {
    opacity: 1;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

.cari-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  overflow: hidden;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--sheet);
}

.cari-stats div {
  display: grid;
  gap: 2px;
  padding: 16px 20px;
  border-left: 1px solid var(--line);
}

.cari-stats div:first-child {
  border-left: 0;
}

.cari-stats dt {
  color: var(--ink-3);
  font-size: 13px;
}

.cari-stats dd {
  font-size: 26px;
  font-weight: 700;
  font-stretch: var(--narrow);
  font-variant-numeric: tabular-nums;
  line-height: 1.15;
}

.cari-stats .is-warn dd {
  color: var(--tone-ink);
}

.cari-head {
  flex-wrap: wrap;
}

.cari-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.cari-tools .search input {
  width: 260px;
}

.select-filter {
  height: 42px;
  padding: 0 34px 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--sheet);
  font-size: 14.5px;
}

.select-filter:focus {
  border-color: var(--pine);
  outline: none;
  box-shadow: 0 0 0 3px rgba(31, 77, 63, 0.16);
}

.table-scroll {
  overflow-x: auto;
}

.cari-table th {
  border-top: 0;
}

.cari-table td {
  padding-top: 13px;
  padding-bottom: 13px;
}

.cari-table tbody tr[data-customer-kod] {
  cursor: pointer;
  transition: background-color 0.12s;
}

.cari-table tbody tr[data-customer-kod]:hover {
  background: #f3f5f1;
}

.cari-table tbody tr[data-customer-kod]:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: -2px;
}

.cari-kod,
.col-name,
.code-chip,
input.mono {
  font-family: 'Cascadia Mono', 'Consolas', ui-monospace, monospace;
}

.cari-kod {
  display: block;
  color: var(--ink-3);
  font-size: 12.5px;
  letter-spacing: 0.02em;
}

.cari-isim {
  display: block;
  font-weight: 600;
  line-height: 1.35;
}

.cari-sub {
  display: block;
  color: var(--ink-3);
  font-size: 13px;
}

.cari-none {
  color: var(--ink-3);
}

.code-chip {
  display: inline-block;
  padding: 2px 7px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--sheet-2);
  color: var(--ink-2);
  font-size: 12px;
}

.cari-bakiye {
  font-weight: 600;
}

.bakiye-yon {
  margin-left: 5px;
  color: var(--ink-3);
  font-size: 11.5px;
  font-weight: 700;
}

.risk {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 130px;
}

.risk-bar {
  position: relative;
  flex: 1;
  min-width: 70px;
  height: 6px;
  overflow: hidden;
  border-radius: 3px;
  background: var(--sheet-2);
  box-shadow: inset 0 0 0 1px var(--line);
}

.risk-bar i {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  border-radius: 3px;
  background: var(--tone);
}

.risk b {
  min-width: 4ch;
  color: var(--tone-ink);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.cari-empty td {
  padding: 32px 24px;
  color: var(--ink-3);
  text-align: center;
}

.cari-risk {
  display: grid;
  gap: 6px;
  margin-top: 4px;
}

.cari-risk .risk {
  max-width: 320px;
}

.cari-risk > span:last-child {
  color: var(--ink-3);
  font-size: 13.5px;
}

.cari-form .form-grid {
  gap: 14px;
}

.cari-form .field > span {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

.col-name {
  color: var(--ink-3);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.02em;
  opacity: 0.8;
}

.req {
  color: var(--alert);
  font-style: normal;
}

.cari-form .field input[readonly] {
  background: var(--sheet-2);
  color: var(--ink-2);
  cursor: default;
}

.cari-form .field textarea {
  min-height: 64px;
}

.cari-form .field.changed input,
.cari-form .field.changed select,
.cari-form .field.changed textarea {
  border-color: var(--signal);
  background: #fffaf0;
}

.cari-form .field.invalid input,
.cari-form .field.invalid select,
.cari-form .field.invalid textarea {
  border-color: var(--alert);
  background: var(--alert-soft);
}

.d-ro {
  margin-left: 6px;
  color: var(--ink-3);
  font-size: 12.5px;
  font-weight: 500;
}

.cari-facts {
  margin: 0;
}

.cari-facts dt {
  display: flex;
  align-items: baseline;
  gap: 8px;
  color: var(--ink-2);
  font-size: 14px;
}

.cari-facts .is-neg {
  color: var(--alert-ink);
}

.cari-quotes {
  margin: 0 -28px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.cari-quotes li {
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 4px 16px;
  padding: 12px 28px;
}

.cari-quotes li .stage {
  grid-column: 1;
  grid-row: 2;
}

.cari-quotes li .num {
  grid-column: 2;
  grid-row: 1;
  font-weight: 650;
}

.cari-quotes li div span {
  display: block;
  font-size: 13.5px;
}

.cari-audit {
  margin-top: 24px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.cari-dirty {
  margin-right: auto;
  align-self: center;
  color: var(--signal-ink);
  font-size: 13.5px;
  font-weight: 600;
}

.drawer-foot .btn:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

@media (max-width: 1180px) {
  .cari-table .col-md {
    display: none;
  }
}

@media (max-width: 900px) {
  .cari-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .cari-stats div:nth-child(3) {
    border-left: 0;
  }

  .cari-stats div:nth-child(n + 3) {
    border-top: 1px solid var(--line);
  }
}

@media (max-width: 640px) {
  .cari-stats div {
    padding: 12px 14px;
  }

  .cari-stats dd {
    font-size: 21px;
  }

  .cari-head {
    padding: 16px;
  }

  .cari-tools,
  .cari-tools .search,
  .cari-tools .search input,
  .select-wrap,
  .select-filter {
    width: 100%;
  }

  .cari-table .col-md {
    display: grid;
  }

  .cari-table tr[data-customer-kod] {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 4px 12px;
  }

  .cari-table td {
    padding: 0;
  }

  .cari-table td:first-child {
    grid-column: 1 / -1;
    margin-bottom: 4px;
  }

  .cari-table td.num {
    text-align: left;
  }

  .cari-table .cari-sub {
    display: inline;
    margin-left: 6px;
  }

  .cari-table td.col-md {
    display: block;
  }

  .cari-table td[data-label="Risk kullanımı"] {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    gap: 8px;
  }

  .cari-table td[data-label="Risk kullanımı"] .risk {
    flex: 1;
  }

  .cari-empty td::before {
    content: none;
  }

  .cari-quotes {
    margin: 0 -18px;
  }

  .cari-quotes li {
    padding: 12px 18px;
  }

  .cari-dirty {
    flex-basis: 100%;
  }
}

.flow-branch {
  display: flex;
  align-items: stretch;
}

.flow-branch .flow-revision {
  flex: 1;
  min-width: 0;
}

.flow-auto {
  display: flex;
  flex: none;
  align-items: center;
  gap: 12px;
  max-width: 46%;
  padding: 14px 24px;
  border: 0;
  border-left: 1px dashed var(--line-strong);
  background: transparent;
  color: var(--ink);
  text-align: left;
}

.flow-auto:hover {
  background: var(--sheet-2);
}

.flow-auto > i {
  flex: none;
  width: 10px;
  height: 10px;
  border: 2px solid var(--ink-3);
  border-radius: 50%;
}

.flow-auto.is-on > i {
  border-color: var(--leaf);
  background: var(--leaf);
  box-shadow: 0 0 0 4px var(--leaf-soft);
}

.flow-auto strong {
  display: block;
  font-size: 14.5px;
  font-weight: 650;
}

.flow-auto span span {
  display: block;
  color: var(--ink-2);
  font-size: 13.5px;
}

.flow-auto:not(.is-on) span span {
  color: var(--pine);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.auto-order {
  margin-bottom: 16px;
  padding: 6px 24px 20px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--sheet);
}

.auto-order.is-on {
  border-color: #b6d9c4;
  box-shadow: inset 4px 0 0 var(--leaf);
}

.auto-order-switch {
  border-bottom: 0;
}

.auto-order-switch strong {
  font-size: 18px;
  font-weight: 700;
  font-stretch: var(--narrow);
}

.auto-order-switch small {
  max-width: 68ch;
  margin-top: 2px;
  font-size: 14px;
}

.auto-order.is-on .auto-order-switch input:checked + i {
  background: var(--leaf);
}

.auto-order-path {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 4px 0 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

.auto-order-path li {
  position: relative;
  padding: 30px 12px 0 0;
  color: var(--ink-3);
  font-size: 13.5px;
  line-height: 1.35;
  counter-increment: step;
}

.auto-order-path li::before {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border: 1.5px solid var(--line-strong);
  border-radius: 50%;
  background: var(--sheet);
  color: var(--ink-3);
  font-size: 12px;
  font-weight: 700;
  content: counter(step);
}

.auto-order-path li::after {
  position: absolute;
  top: 11px;
  right: 0;
  left: 22px;
  border-top: 1.5px dashed var(--line-strong);
  content: '';
}

.auto-order-path li:last-child::after {
  content: none;
}

.auto-order.is-on .auto-order-path li {
  color: var(--ink);
}

.auto-order.is-on .auto-order-path li::before {
  border-color: var(--leaf);
  background: var(--leaf);
  color: #fff;
}

.auto-order.is-on .auto-order-path li::after {
  border-top-style: solid;
  border-top-color: var(--leaf);
}

.auto-order-note {
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  color: var(--ink-2);
  font-size: 14px;
}

.order-auto {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 6px;
  background: var(--leaf-soft);
  color: var(--leaf-ink);
  font-size: 13px;
  font-weight: 650;
}

@media (max-width: 900px) {
  .flow-branch {
    flex-direction: column;
  }

  .flow-auto {
    max-width: none;
    padding: 14px 16px;
    border-top: 1px dashed var(--line-strong);
    border-left: 0;
  }
}

@media (max-width: 640px) {
  .auto-order {
    padding: 4px 16px 16px;
  }

  .auto-order-switch {
    align-items: flex-start;
  }

  .auto-order-switch strong {
    font-size: 16.5px;
  }

  .auto-order-path {
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
  }

  .auto-order-path li {
    min-height: 22px;
    padding: 2px 0 0 34px;
  }

  .auto-order-path li::after {
    top: 22px;
    bottom: -10px;
    left: 10px;
    right: auto;
    border-top: 0;
    border-left: 1.5px dashed var(--line-strong);
  }

  .auto-order.is-on .auto-order-path li::after {
    border-left-style: solid;
    border-left-color: var(--leaf);
  }
}

.demo-credit {
  margin-top: 32px;
  color: var(--ink-3);
  font-size: 13.5px;
}

.demo-credit a {
  color: inherit;
  font-weight: 650;
}

.noscript {
  max-width: 640px;
  margin: 48px auto;
  padding: 0 16px;
  font-family: system-ui, sans-serif;
  line-height: 1.6;
}

.rail-credit {
  display: block;
  margin-top: 10px;
  padding: 0 8px;
  color: rgba(230, 239, 234, 0.6);
  font-size: 12.5px;
  text-decoration: none;
}

.rail-credit:hover {
  color: #fff;
  text-decoration: underline;
}
