#wave-closing {
  --wc-ink: #192f33;
  --wc-muted: #526764;
  --wc-green: #387e77;
  --wc-line: #dce5df;
  color: var(--wc-ink);
  font-family:
    ui-sans-serif,
    system-ui,
    -apple-system,
    "Segoe UI",
    sans-serif;
  background: #f3f6f0;
  border-radius: 16px;
  padding: 28px;
}
#wave-closing,
#wave-closing * {
  box-sizing: border-box;
}
#wave-closing h1,
#wave-closing h2,
#wave-closing h3 {
  font-family: inherit;
  letter-spacing: -0.025em;
  color: var(--wc-ink);
  margin: 0 0 12px;
}
#wave-closing h1 {
  font-size: clamp(28px, 3vw, 40px);
  font-weight: 600;
  line-height: 1.15;
}
#wave-closing h2 {
  font-size: 22px;
  font-weight: 600;
}
#wave-closing h3 {
  font-size: 17px;
  margin-top: 24px;
}
.wc-shell {
  max-width: 1100px;
  margin: 0 auto;
}
.wc-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin: 4px 0 28px;
}
.wc-heading p {
  max-width: 68ch;
  color: var(--wc-muted);
  font-size: 15px;
  line-height: 1.6;
  margin: 10px 0 0;
}
.wc-store {
  display: block;
  color: var(--wc-green);
  font-size: 13px;
  font-weight: 650;
  margin-bottom: 12px;
}
.wc-badge {
  display: inline-block;
  white-space: normal;
  border: 1px solid #b7d6cb;
  border-radius: 20px;
  padding: 7px 12px;
  font-size: 12px;
  font-weight: 600;
  color: #285c55;
  background: #edf8f1;
}
.wc-controls {
  display: flex;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 8px;
}
#wave-closing label {
  font-size: 13px;
  font-weight: 500;
  color: var(--wc-muted);
}
.wc-controls label {
  display: grid;
  gap: 7px;
  flex: 1;
  min-width: 160px;
}
#wave-closing input,
#wave-closing select,
#wave-closing textarea {
  border: 1px solid #bdccc6;
  border-radius: 8px;
  color: var(--wc-ink);
  background: #fff;
  padding: 10px 12px;
  min-height: 44px;
  min-width: 0;
  width: 100%;
  box-shadow: none;
  font-size: 15px;
}
#wave-closing input:disabled,
#wave-closing textarea:disabled {
  background: #f5f7f3;
  color: #526764;
  opacity: 1;
}
#wave-closing input[type="checkbox"] {
  width: 20px;
  min-height: 20px;
  height: 20px;
  accent-color: var(--wc-green);
  flex: none;
}
#wave-closing input[type="number"] {
  font-variant-numeric: tabular-nums;
}
#wave-closing button,
.wc-file {
  border: 1px solid #bdccc6;
  border-radius: 9px;
  background: #fff;
  color: #254f4b;
  padding: 11px 16px;
  min-height: 44px;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.3;
  box-shadow: none;
  transition: background-color 0.15s;
}
#wave-closing button:hover,
.wc-file:hover {
  background: #edf5ef;
}
#wave-closing .wc-primary {
  background: var(--wc-green);
  border-color: var(--wc-green);
  color: #fff;
}
#wave-closing .wc-primary:hover {
  background: #2d6b64;
}
#wave-closing button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
#wave-closing :focus-visible {
  outline: 3px solid #216d8a;
  outline-offset: 3px;
}
.wc-status {
  font-size: 14px;
  color: #7a3b27;
  min-height: 20px;
  margin: 12px 0;
}
.wc-steps {
  display: flex;
  border-bottom: 1px solid var(--wc-line);
  gap: 8px;
  padding-bottom: 16px;
  margin-bottom: 24px;
}
#wave-closing .wc-steps button {
  background: transparent;
  border-color: transparent;
  color: var(--wc-muted);
}
#wave-closing .wc-steps .active {
  background: #dceddf;
  color: #235a50;
}
.wc-panel {
  background: #fff;
  border: 1px solid var(--wc-line);
  border-radius: 14px;
  padding: 26px;
  margin-bottom: 24px;
}
.wc-panel > header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
}
.wc-panel > header h2 {
  margin: 0 !important;
}
.wc-panel > header > strong {
  font-size: 24px;
}
.wc-import-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.wc-import-grid > div {
  padding: 16px;
  background: #f5f8f3;
  border-radius: 8px;
}
.wc-import-grid span {
  display: block;
  font-size: 13px;
  color: var(--wc-muted);
  margin-bottom: 8px;
}
.wc-import-grid strong {
  font-size: 23px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.wc-context {
  border-top: 1px solid var(--wc-line);
  padding-top: 18px;
  margin-top: 22px;
}
.wc-context summary {
  font-size: 14px;
  cursor: pointer;
  font-weight: 600;
  padding: 6px 0;
  color: #315f57;
}
.wc-question {
  border: 0;
  padding: 0;
  margin: 0 0 22px;
}
.wc-question legend {
  font-size: 17px;
  font-weight: 600;
}
.wc-question p,
.wc-help {
  font-size: 13px;
  line-height: 1.6;
  color: var(--wc-muted);
  margin: 7px 0 16px;
}
.wc-question > div {
  display: flex;
  gap: 10px;
}
#wave-closing .wc-question button {
  min-width: 88px;
}
#wave-closing .wc-question [aria-pressed="true"] {
  background: var(--wc-green);
  border-color: var(--wc-green);
  color: #fff;
}
.wc-count-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 34px;
  align-items: start;
}
.wc-denominations {
  border-collapse: collapse;
  width: 100%;
  font-size: 14px;
  table-layout: auto;
}
.wc-denominations caption {
  text-align: left;
  font-size: 13px;
  font-weight: 650;
  color: var(--wc-muted);
  padding: 6px 0 12px;
}
.wc-denominations th,
.wc-denominations td {
  border-bottom: 1px solid #e5ece7;
  padding: 10px 6px;
  white-space: nowrap;
  text-align: right;
  font-weight: 500;
}
.wc-denominations thead th {
  font-size: 11px;
  color: var(--wc-muted);
}
.wc-denominations th:first-child {
  text-align: left;
}
.wc-counter {
  display: flex;
  justify-content: flex-end;
  gap: 4px;
  align-items: center;
}
#wave-closing .wc-counter input {
  width: 60px;
  padding: 6px;
  text-align: center;
  min-height: 38px;
  appearance: textfield;
  -moz-appearance: textfield;
}
#wave-closing .wc-counter input::-webkit-inner-spin-button {
  appearance: none;
}
#wave-closing .wc-counter button {
  padding: 4px;
  min-width: 30px;
  min-height: 38px;
  font-size: 18px;
  font-weight: 400;
}
.wc-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin: 18px 0;
}
.wc-field {
  display: grid;
  gap: 8px;
  margin-bottom: 18px;
}
.wc-fields label {
  display: grid;
  gap: 8px;
}
.wc-totals {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  padding: 22px 0;
  gap: 16px;
  border-top: 1px solid var(--wc-line);
  border-bottom: 1px solid var(--wc-line);
  margin: 20px 0;
}
.wc-totals span {
  display: block;
  font-size: 13px;
  color: var(--wc-muted);
  margin-bottom: 6px;
}
.wc-totals strong {
  font-size: 23px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.wc-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: flex-end;
  margin: 22px 0;
}
.wc-checks {
  display: grid;
  gap: 14px;
  margin: 22px 0;
}
.wc-checks label {
  display: flex;
  align-items: center;
  gap: 12px;
  line-height: 1.5;
  color: var(--wc-ink) !important;
}
.wc-source-row {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 14px 0;
  border-bottom: 1px solid var(--wc-line);
  font-size: 14px;
}
.wc-source-row span {
  overflow-wrap: anywhere;
}
.wc-source-row small,
.wc-event small,
.wc-history-row small {
  display: block;
  font-size: 12px;
  color: var(--wc-muted);
  margin-top: 6px;
}
.wc-notice {
  border: 1px solid #dfcba0;
  background: #fffaed;
  border-radius: 8px;
  color: #6a5222;
  font-size: 14px;
  padding: 15px;
  line-height: 1.6;
}
.wc-success {
  color: #285f4a;
  font-size: 14px;
  margin-bottom: 20px;
}
.wc-envelope {
  background: #eef7f0;
  border-radius: 10px;
  padding: 24px;
  margin: 24px 0;
}
.wc-envelope span {
  font-size: 15px;
}
.wc-envelope strong {
  display: block;
  font-size: 40px;
  letter-spacing: -0.03em;
  margin: 8px 0 12px;
  font-weight: 600;
}
.wc-envelope p {
  font-size: 13px;
  color: var(--wc-muted);
  margin: 0;
}
.wc-remaining {
  display: flex;
  justify-content: space-between;
  padding: 18px 0;
  border-bottom: 1px solid var(--wc-line);
  font-size: 14px;
  gap: 16px;
}
.wc-photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 150px));
  gap: 12px;
  margin: 14px 0;
}
.wc-photo-grid img {
  width: 100%;
  height: 120px;
  object-fit: cover;
  border-radius: 8px;
}
.wc-file {
  display: inline-flex;
  align-items: center;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}
.wc-file input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  width: 100%;
  height: 100%;
}
.wc-event {
  padding: 14px 0;
  border-bottom: 1px solid var(--wc-line);
  font-size: 14px;
}
.wc-event summary {
  cursor: pointer;
}
.wc-history-row {
  display: flex;
  justify-content: space-between;
  width: 100%;
  text-align: left;
  margin-top: 12px;
}
.wc-empty {
  padding: 50px 16px;
  text-align: center;
  color: var(--wc-muted);
}
@media (max-width: 900px) {
  #wave-closing {
    padding: 20px 16px;
  }
  .wc-import-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .wc-count-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .wc-heading {
    flex-direction: column;
    gap: 12px;
  }
  .wc-panel {
    padding: 20px;
  }
}
@media (max-width: 520px) {
  #wave-closing {
    padding: 16px 10px;
  }
  .wc-panel {
    padding: 18px 12px;
  }
  .wc-import-grid strong {
    font-size: 19px;
  }
  .wc-import-grid > div {
    padding: 12px;
  }
  .wc-totals {
    gap: 9px;
  }
  .wc-totals strong {
    font-size: 18px;
  }
  .wc-totals span {
    font-size: 11px;
  }
  .wc-steps {
    gap: 2px;
  }
  .wc-steps button {
    padding: 10px 7px !important;
    font-size: 12px !important;
    flex: 1;
  }
  .wc-fields {
    grid-template-columns: 1fr;
  }
  .wc-actions > * {
    flex: 1;
    text-align: center;
    justify-content: center;
  }
  .wc-panel > header {
    align-items: flex-start;
  }
  .wc-panel > header h2 {
    font-size: 19px !important;
  }
  .wc-controls > button {
    flex: 1;
  }
  .wc-controls label {
    min-width: 140px;
  }
  .wc-heading p {
    font-size: 14px;
  }
}
.wc-confirm {
  display: flex;
  gap: 12px;
  align-items: center;
  line-height: 1.5;
  margin: 20px 0;
}
.wc-step {
  border-top: 1px solid var(--wc-line);
  padding: 16px 0;
}
.wc-step summary {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  cursor: pointer;
  font-size: 15px;
  font-weight: 600;
  list-style: none;
}
.wc-step summary::after {
  content: "+";
  font-size: 20px;
  color: var(--wc-green);
}
.wc-step[open] summary::after {
  content: "−";
}
.wc-step small {
  display: block;
  font-size: 13px;
  color: var(--wc-muted);
  font-weight: 400;
  line-height: 1.5;
  margin-top: 5px;
}
.wc-step-body {
  padding: 18px 0 4px;
}
.wc-table-scroll {
  overflow-x: auto;
  margin: 16px 0;
}

/* Closing owns its business date. Keep only the shared store picker above it. */
body:has(#view-cash:not([hidden])) .toolbar > :not(.store-filter) {
  display: none;
}
body:has(#view-cash:not([hidden])) .toolbar {
  display: flex;
  min-height: 0;
  padding: 12px 16px;
  margin-bottom: 18px;
}
body:has(#view-cash:not([hidden])) .toolbar .store-filter {
  width: 100%;
  max-width: 480px;
  min-width: 0;
}
body:has(#view-cash:not([hidden])) #view-title {
  font-family: ui-sans-serif, system-ui, sans-serif;
  font-size: 24px;
  white-space: nowrap;
}
