@font-face {
  font-family: "Noto Sans KR UI";
  src:
    local("Noto Sans CJK KR"),
    local("Noto Sans KR"),
    url("/fonts/noto-sans-kr-ui.woff2?v=1") format("woff2");
  font-style: normal;
  font-weight: 400;
  font-display: optional;
}

@font-face {
  font-family: "Noto Sans KR Full";
  src: url("/fonts/noto-sans-kr-regular.woff2?v=2.004") format("woff2");
  font-style: normal;
  font-weight: 400;
  font-display: optional;
}

:root {
  --app-max-width: 1920px;

  /* IBM Carbon Gray 10 theme roles */
  --bg: #f4f4f4;
  --surface: #ffffff;
  --surface-2: #f4f4f4;
  --layer-hover: #e5e5e5;
  --layer-selected: #d0e2ff;
  --layer-selected-hover: #a6c8ff;
  --line: #e0e0e0;
  --line-strong: #c6c6c6;
  --text: #161616;
  --text-secondary: #525252;
  --muted: #6f6f6f;
  --text-disabled: #a8a8a8;
  --text-on-color: #ffffff;
  --interactive: #0f62fe;
  --interactive-hover: #0353e9;
  --interactive-active: #002d9c;
  --link: #0f62fe;
  --link-hover: #0043ce;
  --focus-ring: rgba(15, 98, 254, 0.22);
  --interactive-subtle: rgba(15, 98, 254, 0.08);
  --green: #198038;
  --green-bg: #defbe6;
  --green-border: #42be65;
  --orange: #684e00;
  --orange-bg: #fcf4d6;
  --orange-border: #f1c21b;
  --red: #da1e28;
  --red-bg: #fff1f1;
  --red-border: #ffb3b8;
  --info: #0043ce;
  --info-bg: #edf5ff;
  --info-border: #a6c8ff;
  --inverse: #393939;
  --overlay: rgba(22, 22, 22, 0.5);
  --shadow: 0 10px 30px rgba(22, 22, 22, 0.08);

  /* Compatibility aliases for existing components */
  --teal: var(--interactive);
  --teal-dark: var(--link-hover);
  --blue: var(--info);
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

html {
  background: #f4f4f4;
}

html.fonts-loading body {
  visibility: hidden;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Noto Sans KR UI", "Noto Sans KR Full", sans-serif;
  font-size: 14px;
  font-synthesis: none;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--interactive);
  outline-offset: 2px;
}

h1,
h2,
h3,
h4,
h5,
h6,
b,
strong,
th {
  font-weight: 400;
}

button,
input,
select {
  font: inherit;
}

.auth-page {
  background: var(--surface-2);
}

.auth-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 32px;
}

.auth-panel {
  width: min(420px, 100%);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 28px;
  box-shadow: var(--shadow);
}

.brand-line {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-line h1,
.content-header h1 {
  margin: 0;
  font-size: 24px;
  line-height: 1.2;
}

.brand-line p,
.content-header p {
  margin: 4px 0 0;
  color: var(--muted);
}

.brand-mark {
  width: 40px;
  height: 40px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  align-items: end;
  gap: 4px;
  padding: 8px;
  border-radius: 4px;
  background: var(--teal);
}

.brand-mark span {
  display: block;
  border-radius: 1px;
  background: var(--surface);
}

.brand-mark span:nth-child(1) {
  height: 12px;
}

.brand-mark span:nth-child(2) {
  height: 18px;
}

.brand-mark span:nth-child(3) {
  height: 26px;
}

.app-shell {
  width: min(100%, var(--app-max-width));
  min-height: 100vh;
  margin: 0 auto;
  background: var(--bg);
}

.main-frame {
  min-width: 0;
  display: grid;
  grid-template-rows: 64px 1fr;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 4;
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 24px;
}

.topbar-leading,
.top-tabs,
.top-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex-wrap: wrap;
}

.mobile-menu-content {
  min-width: 0;
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.mobile-menu-toggle {
  display: none;
}

.mobile-header-primary-action {
  display: none;
}

.mobile-header-section-switch {
  display: none;
}

.mobile-menu-backdrop,
.mobile-menu-heading,
.mobile-menu-account {
  display: none;
}

.topbar-leading {
  align-self: stretch;
  gap: 24px;
  flex-wrap: nowrap;
}

.topbar-brand {
  min-width: 150px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 16px;
  line-height: 1.1;
}

.topbar-brand .brand-mark {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  padding: 7px;
}

.topbar-brand .brand-mark span:nth-child(1) {
  height: 9px;
}

.topbar-brand .brand-mark span:nth-child(2) {
  height: 14px;
}

.topbar-brand .brand-mark span:nth-child(3) {
  height: 20px;
}

.top-tab {
  height: 64px;
  display: inline-flex;
  align-items: center;
  border-bottom: 3px solid transparent;
  padding: 0 8px;
  color: var(--text);
  font-weight: 400;
  white-space: nowrap;
}

.top-tab.is-active {
  border-bottom-color: var(--teal);
  color: var(--teal-dark);
}

.user-chip {
  display: grid;
  gap: 2px;
  min-width: 160px;
  padding-left: 14px;
  border-left: 1px solid var(--line);
}

.user-chip span {
  font-weight: 400;
}

.user-chip small {
  color: var(--muted);
}

.content {
  min-width: 0;
  padding: 20px 24px 28px;
}

.content-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.content-header-status {
  display: grid;
  justify-items: end;
  gap: 6px;
}

.content-header-status small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 400;
}

.eyebrow {
  color: var(--teal);
  font-weight: 400;
}

.run-strip {
  min-height: 132px;
  display: grid;
  grid-template-columns: repeat(5, minmax(120px, 1fr));
  gap: 18px;
  align-items: stretch;
  padding: 22px 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.run-node {
  position: relative;
  display: grid;
  align-content: center;
  gap: 6px;
  padding-left: 22px;
}

.run-node::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  transform: translateY(-50%);
  background: var(--line-strong);
}

.run-node.success::before {
  background: var(--green);
}

.run-node.warning::before {
  background: var(--orange);
}

.run-node.danger::before {
  background: var(--red);
}

.run-node strong {
  font-size: 16px;
}

.run-node span {
  color: var(--muted);
}

.ops-status-strip {
  display: grid;
  grid-template-columns: minmax(320px, 1.45fr) repeat(3, minmax(170px, 1fr));
  margin-bottom: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  overflow: hidden;
}

.ops-status-primary,
.ops-status-cell {
  min-width: 0;
  min-height: 88px;
  display: grid;
  align-content: center;
  gap: 4px;
  padding: 14px 18px;
}

.ops-status-primary {
  border-left: 4px solid var(--green);
  background: var(--green-bg);
}

.ops-status-primary.has-issues {
  border-left-color: var(--red);
  background: var(--red-bg);
}

.ops-status-primary span,
.ops-status-cell span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 400;
}

.ops-status-primary strong {
  font-size: 22px;
}

.ops-status-primary.is-healthy strong {
  color: var(--green);
}

.ops-status-primary.has-issues strong {
  color: var(--red);
}

.ops-status-primary small {
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 400;
}

.ops-status-cell {
  border-left: 1px solid var(--line);
}

.ops-status-cell:hover {
  background: var(--layer-hover);
}

.ops-status-cell strong {
  font-size: 20px;
}

.ops-status-cell.has-issues {
  background: var(--orange-bg);
}

.ops-status-cell.has-issues strong {
  color: var(--orange);
}

.ops-action-panel > .panel-heading {
  min-height: 50px;
  padding: 12px 16px;
}

.ops-action-table {
  min-width: 760px;
}

.ops-action-table th:nth-child(1),
.ops-action-table td:nth-child(1) {
  width: 170px;
}

.ops-action-table th:nth-child(2),
.ops-action-table td:nth-child(2) {
  width: 180px;
}

.ops-action-table th:nth-child(4),
.ops-action-table td:nth-child(4) {
  width: 130px;
}

.ops-action-table .button {
  min-height: 32px;
}

.ops-empty {
  min-height: 260px;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 10px;
  padding: 32px;
  text-align: center;
}

.ops-empty strong {
  font-size: 18px;
}

.ops-empty p {
  margin: 0;
  color: var(--muted);
  font-weight: 400;
}

.toolbar {
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 14px;
  padding: 12px 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.toolbar-form {
  display: flex;
  align-items: end;
  gap: 10px;
  flex-wrap: wrap;
}

.toolbar label,
.management-form label,
.form-stack label {
  display: grid;
  gap: 7px;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 400;
}

input,
select {
  width: 100%;
  min-height: 38px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: var(--surface);
  color: var(--text);
  padding: 8px 10px;
}

input:focus,
select:focus {
  outline: 2px solid var(--focus-ring);
  border-color: var(--teal);
}

input[readonly] {
  background: var(--surface-2);
  color: var(--muted);
  cursor: not-allowed;
}

.assignment-select.is-unassigned {
  border-color: var(--orange-border);
  background: var(--orange-bg);
  color: var(--orange);
  font-weight: 400;
}

.assignment-select .unassigned-option {
  background: var(--orange-bg);
  color: var(--orange);
  font-weight: 400;
}

.toolbar input {
  width: 250px;
}

.toolbar select {
  width: 150px;
}

.button,
.icon-button {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: var(--surface);
  color: var(--text);
  padding: 0 14px;
  font-weight: 400;
  cursor: pointer;
}

.button:hover,
.icon-button:hover {
  border-color: var(--teal);
  color: var(--teal-dark);
}

.logout-button {
  width: 40px;
  padding: 0;
}

.logout-button svg {
  width: 18px;
  height: 18px;
}

.button-primary {
  border-color: var(--teal);
  background: var(--teal);
  color: var(--text-on-color);
}

.button-primary:hover {
  border-color: var(--interactive-hover);
  background: var(--interactive-hover);
  color: var(--text-on-color);
}

.button-primary:active {
  border-color: var(--interactive-active);
  background: var(--interactive-active);
}

.ledger-layout {
  display: grid;
  grid-template-columns: minmax(620px, 1fr) minmax(340px, 38%);
  gap: 0;
  margin-top: 14px;
}

.split-layout {
  display: grid;
  grid-template-columns: minmax(620px, 1fr) 360px;
  gap: 16px;
}

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

.management-column {
  min-width: 0;
  display: grid;
  align-content: start;
  gap: 8px;
}

.management-editor {
  height: 60px;
  align-self: start;
}

.management-form {
  height: 100%;
  min-height: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
}

.management-form-heading {
  min-width: 0;
  flex: 0 0 150px;
  align-self: stretch;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: nowrap;
  padding-right: 12px;
  border-right: 1px solid var(--line);
}

.management-form-heading h2 {
  margin: 0;
  font-size: 15px;
  white-space: nowrap;
}

.management-form > label {
  min-width: 0;
  flex: 1 1 0;
}

.management-form-actions {
  flex: 0 0 auto;
}

.management-form-actions .button {
  min-width: 82px;
}

.management-list {
  height: calc(100vh - 180px);
  min-height: 420px;
  display: flex;
  flex-direction: column;
}

.management-list > .table-scroll {
  min-height: 0;
  max-height: none;
  flex: 1 1 auto;
  overflow-y: auto;
  scrollbar-gutter: stable;
}

.management-list .data-table th {
  position: sticky;
  top: 0;
  z-index: 2;
}

.management-table th.column-filter-header {
  height: 52px;
  padding-top: 8px;
  padding-bottom: 8px;
  overflow: visible;
}

.column-filter-header input {
  min-height: 34px;
  padding: 5px 8px;
  font-size: 12px;
  font-weight: 400;
}

.management-table th:nth-child(1),
.management-table td:nth-child(1) {
  width: 27%;
}

.management-table .unassigned-row td {
  background: var(--orange-bg);
}

.management-table .unassigned-row:hover td,
.management-table .unassigned-row.is-selected td {
  background: var(--orange-bg);
}

.management-table th:nth-child(3),
.management-table td:nth-child(3) {
  width: 120px;
}

.user-table th:nth-child(1),
.user-table td:nth-child(1) {
  width: 23%;
}

.user-table th:nth-child(2),
.user-table td:nth-child(2) {
  width: 25%;
}

.user-table th:nth-child(3),
.user-table td:nth-child(3) {
  width: auto;
}

.user-table th:nth-child(4),
.user-table td:nth-child(4) {
  width: 120px;
}

.app-id-list {
  font-size: 12px;
}

.panel {
  min-width: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}

.ledger-panel {
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
}

.detail-panel {
  border-left: 0;
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
}

.side-panel {
  align-self: start;
}

.narrow-panel {
  max-width: 520px;
}

.panel-heading,
.detail-head {
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px;
  border-bottom: 1px solid var(--line);
}

.panel-heading.compact {
  min-height: 42px;
  padding-top: 10px;
  padding-bottom: 10px;
}

.panel-heading h2,
.panel-heading h3,
.detail-head h2 {
  margin: 0;
  font-size: 16px;
}

.detail-head p {
  margin: 6px 0 0;
  color: var(--muted);
}

.table-tabs,
.subtabs {
  display: flex;
  align-items: center;
  gap: 20px;
  min-height: 52px;
  padding: 0 16px;
  border-bottom: 1px solid var(--line);
}

.table-tab,
.subtab {
  height: 52px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-bottom: 2px solid transparent;
  color: var(--muted);
  font-weight: 400;
}

.table-tab.is-active,
.subtab.is-active {
  color: var(--teal-dark);
  border-bottom-color: var(--teal);
}

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

.data-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.data-table th,
.data-table td {
  height: 46px;
  padding: 0 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.data-table th {
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 400;
  background: var(--surface-2);
}

.data-table tr.is-selected td {
  background: var(--layer-selected);
}

.data-table tr:hover td {
  background: var(--layer-hover);
}

.data-table tr.is-selected:hover td {
  background: var(--layer-selected-hover);
}

.run-log-table th:nth-child(1),
.run-log-table td:nth-child(1) {
  width: 150px;
}

.run-log-table th:nth-child(2),
.run-log-table td:nth-child(2) {
  width: 90px;
}

.run-log-table th:nth-child(3),
.run-log-table td:nth-child(3) {
  width: auto;
}

.run-log-table th:nth-child(4),
.run-log-table td:nth-child(4) {
  width: 160px;
}

.run-log-table td:nth-child(3) {
  height: auto;
  padding-top: 10px;
  padding-bottom: 10px;
  line-height: 1.45;
  white-space: normal;
  overflow-wrap: anywhere;
  text-overflow: clip;
}

.compact-table th,
.compact-table td {
  height: 38px;
  padding: 0 12px;
  font-size: 13px;
}

.numeric {
  text-align: right;
}

.identifier-text {
  color: var(--link);
}

.app-id-text {
  font-family: inherit;
  color: var(--link);
  font-weight: 400;
  letter-spacing: 0;
}

.app-total-row.is-selected .app-id-text {
  color: var(--teal-dark);
}

.link {
  color: var(--link);
  font-weight: 400;
}

.status-pill {
  min-height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line-strong);
  border-radius: 5px;
  padding: 2px 8px;
  font-size: 12px;
  font-weight: 400;
  white-space: nowrap;
}

.status-pill.success {
  color: var(--green);
  background: var(--green-bg);
  border-color: var(--green-border);
}

.status-pill.warning {
  color: var(--orange);
  background: var(--orange-bg);
  border-color: var(--orange-border);
}

.status-pill.danger {
  color: var(--red);
  background: var(--red-bg);
  border-color: var(--red-border);
}

.status-pill.info {
  color: var(--blue);
  background: var(--info-bg);
  border-color: var(--info-border);
}

.status-pill.muted {
  color: var(--muted);
  background: var(--surface-2);
}

.detail-list {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 12px 16px;
}

.detail-list div {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 12px;
  min-height: 34px;
  align-items: center;
}

.detail-list dt {
  color: var(--muted);
  font-weight: 400;
}

.detail-list dd {
  margin: 0;
}

.form-stack {
  display: grid;
  gap: 14px;
  padding: 16px;
}

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

.form-actions .button {
  flex: 1 1 0;
}

.table-actions {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
}

.row-primary-action {
  min-height: 30px;
  padding: 0 10px;
  font-size: 12px;
}

.inline-action-form {
  display: inline-flex;
  margin: 0;
}

.row-delete-action {
  min-height: 30px;
  border-color: var(--red-border);
  color: var(--red);
  padding: 0 10px;
  font-size: 12px;
}

.row-delete-action:hover {
  border-color: var(--red);
  background: var(--red-bg);
  color: var(--red);
}

.row-delete-action:disabled {
  border-color: var(--line);
  background: var(--surface-2);
  color: var(--text-disabled);
}

.mapping-editor.is-editing {
  border-color: var(--info-border);
  box-shadow: 0 8px 22px rgba(22, 22, 22, 0.1);
}

.user-editor.is-editing {
  border-color: var(--info-border);
  box-shadow: 0 8px 22px rgba(22, 22, 22, 0.1);
}

.user-editor.is-editing .management-form-heading,
.mapping-editor.is-editing .management-form-heading {
  background: var(--layer-selected);
  border-right-color: var(--info-border);
}

.check-row {
  display: flex !important;
  align-items: center;
  gap: 8px !important;
}

.check-row input {
  width: 16px;
  min-height: 16px;
}

.queue-list {
  display: grid;
  gap: 0;
  border-top: 1px solid var(--line);
}

.queue-list a,
.queue-list p {
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0;
  padding: 0 16px;
  border-bottom: 1px solid var(--line);
}

.queue-list small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
}

.excel-download-button {
  width: 40px;
  min-width: 40px;
  padding: 0;
  border-color: var(--green-border);
  color: var(--green);
  background: var(--green-bg);
}

.excel-download-button svg {
  width: 20px;
  height: 20px;
}

.excel-download-button:hover {
  border-color: var(--green);
  background: var(--green);
  color: var(--text-on-color);
}

.merchant-filter {
  position: relative;
  margin-bottom: 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  overflow: visible;
}

.merchant-filter.is-loading {
  opacity: 0.65;
  pointer-events: none;
}

.merchant-filter > input[type="hidden"] {
  display: none;
}

.ledger-search-row {
  min-height: 54px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 12px;
  padding: 8px 10px;
}

.ledger-search-fields {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.ledger-date-fields {
  display: flex;
  align-items: center;
  gap: 6px;
}

.ledger-field-label {
  color: var(--text-secondary);
  font-size: 12px;
  white-space: nowrap;
}

.ledger-date-fields input {
  width: 142px;
  cursor: pointer;
}

.ledger-date-separator {
  color: var(--muted);
}

.ledger-search-meta {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}

.ledger-inline-result-count {
  white-space: nowrap;
}

.ledger-search-input {
  min-width: 0;
}

.ledger-search-input input {
  width: 260px;
}

.date-filter-row {
  min-height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding: 8px 10px;
}

.date-filter-fields,
.date-presets {
  display: flex;
  align-items: flex-end;
  gap: 8px;
}

.date-filter-fields {
  flex-wrap: wrap;
}

.date-filter-fields label {
  display: grid;
  gap: 3px;
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 400;
}

.date-filter-fields input {
  width: 150px;
}

.date-presets .button.is-active {
  border-color: var(--teal);
  color: var(--teal-dark);
  background: var(--layer-selected);
}

.app-filter-toggle {
  width: auto;
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: var(--surface);
  color: var(--text);
  padding: 0 10px;
  cursor: pointer;
}

.app-filter-toggle:hover {
  background: var(--layer-selected);
}

.app-filter-toggle.is-open {
  border-color: var(--teal);
  background: var(--layer-selected);
  color: var(--teal-dark);
  box-shadow: inset 0 0 0 1px var(--interactive-subtle);
}

.app-filter-toggle:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: -2px;
}

.app-filter-toggle strong {
  font-size: 13px;
}

.app-filter-toggle span {
  margin-left: 0;
  color: var(--teal-dark);
  font-size: 12px;
  font-weight: 400;
}

.app-filter-toggle [data-app-filter-toggle-label] {
  color: var(--muted);
}

.app-filter-toggle i {
  width: 8px;
  height: 8px;
  margin: 0 5px 4px 2px;
  border-right: 2px solid var(--teal-dark);
  border-bottom: 2px solid var(--teal-dark);
  transform: rotate(45deg);
  transition: transform 150ms ease;
}

.app-filter-toggle.is-open i {
  margin-bottom: -4px;
  transform: rotate(225deg);
}

.filter-all {
  min-height: 38px;
  padding: 0;
  color: var(--text-secondary);
  font-weight: 400;
}

.app-filter-content-layout {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  z-index: 8;
  display: grid;
  grid-template-columns: 160px minmax(0, 1fr);
  border: 1px solid var(--line-strong);
  border-top: 3px solid var(--teal);
  border-radius: 6px;
  background: var(--surface);
  box-shadow:
    0 18px 38px rgba(22, 22, 22, 0.22),
    0 4px 10px rgba(22, 22, 22, 0.12);
  overflow: hidden;
}

.app-filter-content-layout[hidden] {
  display: none;
}

.app-filter-control-panel {
  display: grid;
  align-content: start;
  justify-items: start;
  gap: 8px;
  padding: 12px 14px;
  border-right: 1px solid var(--line);
  background: var(--surface-2);
}

.app-filter-control-panel > strong {
  color: var(--text-secondary);
  font-size: 13px;
}

.merchant-filter-options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 8px;
  padding: 12px 14px;
}

.merchant-filter-option {
  min-width: 0;
  min-height: 52px;
  display: flex;
  align-items: center;
  gap: 9px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 7px 10px;
  cursor: pointer;
}

.merchant-filter-option:has(input:checked) {
  border-color: var(--teal);
  background: var(--layer-selected);
}

.merchant-filter-option input,
.filter-all input {
  width: 16px;
  min-width: 16px;
  min-height: 16px;
  margin: 0;
}

.merchant-filter-option span {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.merchant-filter-option strong {
  overflow: hidden;
  color: var(--teal-dark);
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.merchant-filter-option small {
  color: var(--muted);
  font-size: 12px;
}

.table-scroll {
  width: 100%;
  overflow-x: auto;
}

.transaction-table {
  width: 100%;
  min-width: 960px;
  table-layout: fixed;
}

.transaction-table th:nth-child(1),
.transaction-table td:nth-child(1) {
  width: 256px;
}

.transaction-table th:nth-child(2),
.transaction-table td:nth-child(2) {
  width: 205px;
}

.transaction-table th:nth-child(3),
.transaction-table td:nth-child(3) {
  width: 166px;
}

.transaction-table th:nth-child(4),
.transaction-table td:nth-child(4) {
  width: 128px;
}

.transaction-table th:nth-child(5),
.transaction-table td:nth-child(5) {
  width: 128px;
}

.transaction-table th:nth-child(6),
.transaction-table td:nth-child(6) {
  width: 112px;
}

.transaction-table th:nth-child(7),
.transaction-table td:nth-child(7) {
  width: 179px;
}

.transaction-table th:nth-child(8),
.transaction-table td:nth-child(8) {
  width: 218px;
}

.transaction-table th.transaction-fill-cell,
.transaction-table td.transaction-fill-cell {
  width: auto;
  padding: 0;
}

.transaction-table .amount {
  font-weight: 400;
}

.transaction-table th.numeric,
.transaction-table td.amount {
  text-align: right;
}

.transaction-table .amount-positive {
  color: var(--green);
}

.transaction-table .amount-negative {
  color: var(--red);
}

.transaction-table .amount-zero {
  color: var(--muted);
}

@media (max-width: 1320px) {
  .transaction-table th:nth-child(1),
  .transaction-table td:nth-child(1) {
    width: 18%;
  }

  .transaction-table th:nth-child(2),
  .transaction-table td:nth-child(2) {
    width: 15%;
  }

  .transaction-table th:nth-child(3),
  .transaction-table td:nth-child(3) {
    width: 12%;
  }

  .transaction-table th:nth-child(4),
  .transaction-table td:nth-child(4) {
    width: 9%;
  }

  .transaction-table th:nth-child(5),
  .transaction-table td:nth-child(5) {
    width: 9%;
  }

  .transaction-table th:nth-child(6),
  .transaction-table td:nth-child(6) {
    width: 8%;
  }

  .transaction-table th:nth-child(7),
  .transaction-table td:nth-child(7) {
    width: 13%;
  }

  .transaction-table th:nth-child(8),
  .transaction-table td:nth-child(8) {
    width: 17%;
  }

  .transaction-table th.transaction-fill-cell,
  .transaction-table td.transaction-fill-cell {
    width: 0;
  }
}

.data-notice {
  margin-bottom: 16px;
  border: 1px solid var(--line-strong);
  border-left: 4px solid var(--teal);
  border-radius: 6px;
  padding: 11px 14px;
  background: var(--surface-2);
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 1.55;
}

.ledger-pagination {
  min-height: 62px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 10px 14px;
  border-top: 1px solid var(--line);
}

.ledger-page-numbers {
  display: flex;
  align-items: center;
  gap: 4px;
}

.compact-label {
  display: none;
}

.page-number {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: 6px;
  color: var(--muted);
  font-weight: 400;
}

.page-number:hover,
.page-number.is-active {
  border-color: var(--teal);
  color: var(--teal-dark);
  background: var(--layer-selected);
}

.button.is-disabled {
  opacity: 0.45;
  pointer-events: none;
}

.button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.notice-modal-layer {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 20px;
}

.notice-modal-layer[hidden] {
  display: none;
}

.notice-modal-backdrop {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  background: var(--overlay);
  cursor: default;
}

.notice-modal {
  position: relative;
  z-index: 1;
  width: min(420px, 100%);
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-top: 4px solid var(--teal);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 18px 48px rgba(22, 22, 22, 0.2);
}

.notice-modal-success {
  border-top-color: var(--green);
}

.notice-modal-danger {
  border-top-color: var(--red);
}

.notice-modal-header {
  min-height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px 10px 18px;
  border-bottom: 1px solid var(--line);
}

.notice-modal-header h2 {
  margin: 0;
  font-size: 16px;
}

.notice-modal-success .notice-modal-header h2 {
  color: var(--green);
}

.notice-modal-danger .notice-modal-header h2 {
  color: var(--red);
}

.notice-modal-close {
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: var(--muted);
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}

.notice-modal-close:hover {
  background: var(--surface-2);
  color: var(--text);
}

.notice-modal p {
  margin: 0;
  padding: 22px 18px;
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.6;
  overflow-wrap: anywhere;
}

.notice-modal-actions {
  display: flex;
  justify-content: flex-end;
  padding: 0 18px 18px;
}

.notice-modal-actions .button {
  min-width: 88px;
}

.confirm-modal-actions {
  gap: 8px;
}

.confirm-verification {
  display: grid;
  gap: 7px;
  padding: 0 18px 18px;
  color: var(--text-secondary);
  font-size: 13px;
}

.confirm-verification[hidden] {
  display: none;
}

.confirm-verification input {
  width: 100%;
  min-height: 40px;
}

.result-count,
.empty-text,
.empty-cell {
  color: var(--muted);
  font-weight: 400;
}

.empty-cell {
  text-align: center !important;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  clip-path: inset(50%);
}

.merchant-dashboard-toolbar {
  min-height: 54px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  margin-bottom: 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 8px 10px;
  background: var(--surface);
}

.merchant-dashboard-toolbar.is-dashboard-loading,
.merchant-dashboard-grid.is-dashboard-loading {
  opacity: 0.55;
  pointer-events: none;
  transition: opacity 120ms ease;
}

.dashboard-period-controls,
.dashboard-toolbar-actions {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.dashboard-period-controls > strong {
  min-width: 104px;
  text-align: center;
  font-size: 15px;
}

.dashboard-nav-button {
  width: 38px;
  min-width: 38px;
  padding: 0;
  font-size: 22px;
  line-height: 1;
}

.segmented-control {
  display: inline-flex;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: var(--surface);
}

.segmented-control a {
  min-width: 64px;
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-right: 1px solid var(--line-strong);
  padding: 0 12px;
  color: var(--muted);
  font-weight: 400;
}

.segmented-control a:last-child {
  border-right: 0;
}

.segmented-control a.is-active {
  background: var(--teal);
  color: var(--text-on-color);
}

.dashboard-toolbar-actions {
  justify-content: flex-end;
}

.dashboard-data-context {
  min-width: 0;
  display: flex;
  align-items: center;
  white-space: nowrap;
}

.dashboard-latest-status {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--green-border);
  border-radius: 6px;
  padding: 5px 8px;
  background: var(--green-bg);
}

.dashboard-status-indicator {
  width: 8px;
  height: 8px;
  flex: 0 0 8px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 3px rgba(25, 128, 56, 0.12);
}

.dashboard-status-copy {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.dashboard-status-copy small {
  color: var(--text-secondary);
  font-size: 11px;
  font-weight: 400;
}

.dashboard-status-copy strong {
  overflow: hidden;
  color: var(--green);
  font-size: 11px;
  text-overflow: ellipsis;
}

.dashboard-status-help {
  position: relative;
  width: 28px;
  height: 28px;
  display: grid;
  place-content: center;
  flex: 0 0 28px;
  border-radius: 4px;
  color: var(--text-secondary);
  cursor: help;
}

.dashboard-status-help:hover,
.dashboard-status-help:focus-visible {
  background: var(--green-bg);
  color: var(--green);
  outline: none;
}

.dashboard-status-help svg {
  width: 16px;
  height: 16px;
}

.dashboard-status-tooltip {
  position: absolute;
  top: calc(100% + 7px);
  right: 0;
  z-index: 10;
  width: 230px;
  border-radius: 4px;
  padding: 8px 10px;
  background: var(--inverse);
  box-shadow: 0 8px 22px rgba(22, 22, 22, 0.18);
  color: var(--text-on-color);
  font-size: 11px;
  font-weight: 400;
  line-height: 1.45;
  white-space: normal;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(-3px);
  transition: opacity 120ms ease, transform 120ms ease, visibility 120ms step-end;
}

.dashboard-status-help:hover .dashboard-status-tooltip,
.dashboard-status-help:focus-visible .dashboard-status-tooltip {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  transition: opacity 120ms ease, transform 120ms ease;
}

.merchant-dashboard-grid {
  --dashboard-data-row-height: 44px;
  --dashboard-week-row-height: 88px;
  --dashboard-year-row-height: calc(
    var(--dashboard-data-row-height) +
    var(--dashboard-data-row-height) +
    var(--dashboard-data-row-height)
  );
  --dashboard-year-grid-height: calc(
    var(--dashboard-year-row-height) +
    var(--dashboard-year-row-height) +
    var(--dashboard-year-row-height)
  );
  height: calc(100vh - 156px);
  min-height: 650px;
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.dashboard-column {
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
}

.dashboard-column-overview {
  min-width: 0;
  height: 40px;
  display: flex;
  align-items: stretch;
  flex: 0 0 40px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-2);
}

.calendar-period-total {
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 12px;
}

.calendar-period-total span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 400;
}

.calendar-period-total strong {
  min-width: 0;
  overflow: hidden;
  font-size: 15px;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-calendar {
  min-height: 0;
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
}

.month-calendar-frame {
  position: relative;
  min-width: 0;
  min-height: 0;
  display: flex;
  flex: 1 1 auto;
  overflow: hidden;
}

.month-calendar-frame .month-calendar {
  width: 100%;
  min-width: 0;
}

.calendar-weekdays,
.calendar-days {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
}

.calendar-weekdays {
  min-height: var(--dashboard-data-row-height);
  flex: 0 0 var(--dashboard-data-row-height);
  border-bottom: 1px solid var(--line);
  background: var(--surface-2);
}

.calendar-weekdays span {
  display: grid;
  place-items: center;
  border-right: 1px solid var(--line);
  font-size: 14px;
  font-weight: 400;
}

.calendar-weekdays span:last-child {
  border-right: 0;
}

.calendar-days {
  min-height: 0;
  flex: 1 1 auto;
  grid-template-rows: repeat(6, var(--dashboard-week-row-height));
}

.calendar-day {
  position: relative;
  min-width: 0;
  display: grid;
  align-content: start;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 7px;
  color: var(--text);
}

.calendar-day:nth-child(7n) {
  border-right: 0;
}

.calendar-day:nth-last-child(-n + 7) {
  border-bottom: 0;
}

.calendar-day:not(.is-outside):hover {
  background: var(--layer-hover);
}

.calendar-day.is-selected {
  position: relative;
  z-index: 1;
  background: var(--interactive-subtle);
}

.calendar-day.is-outside {
  background: var(--surface-2);
}

.calendar-date {
  position: absolute;
  top: 7px;
  left: 7px;
  z-index: 0;
  color: var(--line-strong);
  font-size: 34px;
  font-weight: 400;
  line-height: 1;
}

.calendar-day-metrics {
  position: relative;
  z-index: 1;
  min-width: 0;
  display: grid;
  grid-template-rows: 28px auto auto;
  align-content: start;
  gap: 3px;
  padding-top: 4px;
  color: var(--text);
}

.calendar-day-metrics > span,
.calendar-day-metrics > b,
.calendar-day-metrics > small {
  min-width: 0;
  overflow: hidden;
  font-size: 13px;
  line-height: 1.3;
  text-overflow: ellipsis;
  text-align: right;
  white-space: nowrap;
}

.calendar-day-metrics > b {
  font-size: 14px;
  font-weight: 400;
}

.calendar-day-metrics > small {
  color: var(--text);
  font-size: 12px;
}

.calendar-day-metrics > small.settlement-today {
  color: var(--red);
}

.calendar-day-metrics > small.settlement-completed {
  color: var(--muted);
}

.is-sunday,
.calendar-day.is-sunday .calendar-date {
  color: var(--red);
}

.is-saturday,
.calendar-day.is-saturday .calendar-date {
  color: var(--blue);
}

.calendar-day.is-sunday .calendar-date {
  color: var(--red-border);
}

.calendar-day.is-saturday .calendar-date {
  color: var(--info-border);
}

.calendar-day.is-selected .calendar-date {
  color: var(--text-secondary);
}

.year-calendar {
  min-height: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-template-rows: repeat(3, var(--dashboard-year-row-height));
  flex: 0 0 var(--dashboard-year-grid-height);
}

.year-month {
  min-width: 0;
  display: grid;
  align-content: center;
  gap: 8px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 14px;
}

.year-month:nth-child(4n) {
  border-right: 0;
}

.year-month:nth-last-child(-n + 4) {
  border-bottom: 0;
}

.year-month:hover {
  background: var(--layer-hover);
}

.year-month.is-selected {
  background: var(--layer-selected);
  box-shadow: inset 0 0 0 2px var(--teal);
}

.year-month strong {
  font-size: 16px;
}

.year-month span {
  color: var(--muted);
  font-weight: 400;
  text-align: right;
}

.year-month b {
  font-size: 15px;
  text-align: right;
}

.app-total-header,
.app-total-row {
  display: grid;
  grid-template-columns: minmax(130px, 4fr) 72px minmax(170px, 6fr);
  align-items: center;
  gap: 10px;
}

.app-total-header span:nth-child(n + 2),
.app-total-row span,
.app-total-row b {
  text-align: right;
}

.app-total-header {
  min-height: 40px;
  flex: 0 0 auto;
  padding: 4px 14px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--muted);
  font-size: 11px;
  font-weight: 400;
}

.app-total-sort {
  min-width: 0;
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  border: 0;
  background: transparent;
  color: var(--muted);
  padding: 0;
  font-size: 11px;
  font-weight: 400;
  cursor: pointer;
  white-space: nowrap;
}

.app-total-sort.app-id-sort {
  justify-content: flex-start;
}

.app-total-sort:hover,
.app-total-sort.is-active {
  color: var(--teal-dark);
}

.app-total-sort [data-sort-indicator] {
  width: 12px;
  display: inline-block;
  font-size: 13px;
  text-align: center;
}

.app-total-list {
  min-height: 0;
  flex: 1 1 auto;
  overflow-y: auto;
  scrollbar-gutter: stable;
}

.app-total-row {
  position: relative;
  height: var(--dashboard-data-row-height);
  min-height: var(--dashboard-data-row-height);
  padding: 6px 14px;
  border-bottom: 1px solid var(--line);
}

.app-total-row:hover {
  background: var(--layer-hover);
}

.app-total-row.is-selected {
  background: var(--layer-selected);
  color: var(--teal-dark);
}

.app-total-row.is-selected::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: var(--teal);
}

.app-total-row strong,
.app-total-row b {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.app-transaction-list {
  min-height: 0;
  flex: 1 1 auto;
  overflow-y: auto;
  scrollbar-gutter: stable;
}

.app-transaction-header,
.app-transaction-row {
  display: grid;
  grid-template-columns: 72px minmax(92px, 0.9fr) 64px 58px 64px minmax(150px, 1.4fr);
  align-items: center;
  gap: 8px;
}

.app-transaction-header {
  position: sticky;
  top: 0;
  z-index: 1;
  min-height: 40px;
  padding: 0 14px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--muted);
  font-size: 11px;
  font-weight: 400;
}

.app-transaction-header span:last-child,
.app-transaction-row > strong {
  text-align: right;
}

.app-transaction-row {
  min-height: var(--dashboard-data-row-height);
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
}

.app-transaction-row time {
  font-size: 12px;
  font-weight: 400;
}

.app-transaction-row > span,
.app-transaction-row > strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.app-transaction-row > strong {
  font-size: 14px;
}

.dashboard-empty {
  margin: 0;
  padding: 28px 14px;
  text-align: center;
}

.amount-positive {
  color: var(--green);
}

.amount-negative {
  color: var(--red);
}

.amount-zero {
  color: var(--muted);
}

@media (max-width: 1120px) {
  .main-frame,
  .topbar {
    width: 100%;
    min-width: 0;
    max-width: 100%;
  }

  .ledger-layout,
  .split-layout,
  .management-layout,
  .merchant-dashboard-grid {
    grid-template-columns: 1fr;
  }

  .merchant-dashboard-grid {
    height: auto;
  }

  .dashboard-column {
    min-height: 620px;
  }

  .app-total-column,
  .app-detail-column {
    min-height: 520px;
  }

  .ledger-panel,
  .detail-panel {
    border-radius: 8px;
    border-left: 1px solid var(--line);
  }

  .detail-panel {
    margin-top: 14px;
  }

  .ops-status-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ops-status-primary {
    grid-column: span 2;
  }
}

@media (max-width: 760px) {
  .app-page {
    overflow-x: hidden;
  }

  .main-frame {
    grid-template-rows: auto 1fr;
  }

  .topbar {
    position: sticky;
    top: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    height: auto;
    min-height: 64px;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
  }

  .topbar-leading {
    width: auto;
    align-self: auto;
    display: flex;
    align-items: center;
    flex-direction: row;
  }

  .topbar-brand {
    min-width: 0;
    min-height: 38px;
  }

  .mobile-header-section-switch {
    height: 38px;
    display: inline-flex;
    align-items: stretch;
    overflow: hidden;
    border: 1px solid var(--line-strong);
    border-radius: 6px;
    background: var(--surface);
  }

  .mobile-header-section-switch a {
    min-width: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-right: 1px solid var(--line-strong);
    padding: 0 8px;
    color: var(--text-secondary);
    font-size: 12px;
    white-space: nowrap;
  }

  .mobile-header-section-switch a:last-child {
    border-right: 0;
  }

  .mobile-header-section-switch a.is-active {
    background: var(--teal);
    color: var(--text-on-color);
  }

  .mobile-header-primary-action {
    display: block;
  }

  .mobile-header-primary-action .primary-action,
  .mobile-header-primary-action .button {
    min-height: 38px;
    white-space: nowrap;
  }

  .mobile-header-primary-action .button {
    padding: 0 10px;
    font-size: 12px;
  }

  .mobile-menu-toggle {
    width: 38px;
    height: 38px;
    display: grid;
    place-content: center;
    gap: 4px;
    border: 1px solid var(--line-strong);
    border-radius: 6px;
    background: var(--surface);
    cursor: pointer;
  }

  .mobile-menu-toggle span {
    width: 18px;
    height: 2px;
    display: block;
    border-radius: 2px;
    background: var(--text);
    transition: transform 150ms ease, opacity 150ms ease;
  }

  .topbar.is-mobile-menu-open .mobile-menu-toggle span:nth-child(1) {
    transform: translateY(6px) rotate(45deg);
  }

  .topbar.is-mobile-menu-open .mobile-menu-toggle span:nth-child(2) {
    opacity: 0;
  }

  .topbar.is-mobile-menu-open .mobile-menu-toggle span:nth-child(3) {
    transform: translateY(-6px) rotate(-45deg);
  }

  .mobile-menu-content {
    position: fixed;
    inset: 0 0 0 auto;
    z-index: 7;
    width: min(320px, 86vw);
    min-width: 0;
    display: flex;
    align-items: stretch;
    flex-direction: column;
    justify-content: flex-start;
    gap: 0;
    padding: 0;
    border: 0;
    background: var(--surface);
    box-shadow: -18px 0 40px rgba(22, 22, 22, 0.2);
    visibility: hidden;
    transform: translateX(100%);
    transition:
      transform 180ms ease,
      visibility 180ms step-end;
    overflow-y: auto;
  }

  .topbar.is-mobile-menu-open .mobile-menu-content {
    visibility: visible;
    transform: translateX(0);
    transition: transform 180ms ease;
  }

  .mobile-menu-backdrop {
    position: fixed;
    inset: 0;
    z-index: 6;
    display: block;
    border: 0;
    background: var(--overlay);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition:
      opacity 180ms ease,
      visibility 180ms step-end;
  }

  .topbar.is-mobile-menu-open .mobile-menu-backdrop {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transition: opacity 180ms ease;
  }

  .mobile-menu-heading {
    min-height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 14px 0 18px;
    border-bottom: 1px solid var(--line);
    font-size: 16px;
  }

  .mobile-menu-account {
    display: grid;
    gap: 3px;
    padding: 18px 20px;
    border-bottom: 1px solid var(--line);
    background: var(--surface-2);
  }

  .mobile-menu-account span {
    overflow: hidden;
    font-weight: 400;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .mobile-menu-account small {
    overflow: hidden;
    color: var(--muted);
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .mobile-menu-close {
    width: 38px;
    height: 38px;
    display: grid;
    place-content: center;
    border: 1px solid var(--line-strong);
    border-radius: 6px;
    background: var(--surface);
    color: var(--text);
    font-size: 25px;
    line-height: 1;
    cursor: pointer;
  }

  body.is-mobile-menu-active {
    overflow: hidden;
  }

  .mobile-menu-content .top-tabs {
    width: 100%;
    max-width: 100%;
    display: flex;
    align-items: stretch;
    flex-direction: column;
    gap: 0;
    padding: 8px;
    border-bottom: 1px solid var(--line);
    overflow: visible;
  }

  .mobile-menu-content .top-tab {
    width: auto;
    height: 44px;
    justify-content: flex-start;
    padding: 0 12px;
    border-bottom: 0;
    border-radius: 4px;
  }

  .mobile-menu-content .top-tab.is-active {
    border-bottom-color: transparent;
    background: var(--layer-selected);
    color: var(--teal-dark);
  }

  .mobile-menu-content .top-actions,
  .mobile-menu-content .top-actions:has(.primary-action) {
    width: 100%;
    display: flex;
    align-items: stretch;
    flex-direction: column;
    justify-content: flex-start;
    flex: 1 1 auto;
    gap: 8px;
    padding: 14px 18px 18px;
  }

  .mobile-menu-content .top-actions .user-chip,
  .mobile-menu-content .top-actions:has(.primary-action) .user-chip {
    display: none;
  }

  .mobile-menu-content .primary-action {
    display: none !important;
  }

  .mobile-menu-content .top-actions .button,
  .mobile-menu-content .top-actions .icon-button,
  .mobile-menu-content .top-actions:has(.primary-action) .primary-action,
  .mobile-menu-content .top-actions:has(.primary-action) .password-action {
    width: 100%;
    min-height: 42px;
    flex: 0 0 auto;
    grid-column: auto;
    grid-row: auto;
    padding-right: 12px;
    padding-left: 12px;
    font-size: 13px;
  }

  .mobile-menu-content .top-actions .password-action {
    margin-top: auto;
  }

  .mobile-menu-content .top-actions .logout-form,
  .mobile-menu-content .top-actions:has(.primary-action) .logout-form {
    width: auto;
    align-self: flex-end;
    padding-top: 2px;
    border-top: 0;
  }

  .mobile-menu-content .top-actions .logout-button {
    width: 42px;
    padding: 0;
    border-color: transparent;
    background: transparent;
    color: var(--muted);
    font-weight: 400;
  }

  .mobile-menu-content .top-actions .logout-button:hover {
    border-color: var(--red-border);
    background: var(--red-bg);
    color: var(--red);
  }

  .content {
    padding: 14px;
  }

  .merchant-dashboard-toolbar {
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 8px 10px;
  }

  .dashboard-period-controls,
  .dashboard-toolbar-actions {
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .dashboard-period-controls {
    width: 100%;
    flex-wrap: nowrap;
    gap: 4px;
  }

  .dashboard-period-controls > strong {
    min-width: 0;
    flex: 1 1 auto;
    white-space: nowrap;
  }

  .dashboard-period-controls .button {
    min-width: 44px;
    flex: 0 0 auto;
    padding-right: 8px;
    padding-left: 8px;
  }

  .dashboard-nav-button {
    width: 30px;
    min-width: 30px;
  }

  .segmented-control a {
    min-width: 42px;
    padding-right: 6px;
    padding-left: 6px;
  }

  .dashboard-toolbar-actions {
    width: 100%;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-items: center;
  }

  .dashboard-toolbar-actions .excel-download-button {
    display: none;
  }

  .dashboard-data-context {
    width: 100%;
    display: flex;
    white-space: nowrap;
  }

  .dashboard-latest-status {
    width: 100%;
  }

  .dashboard-status-copy {
    flex: 1 1 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    white-space: nowrap;
  }

  .dashboard-status-copy small {
    font-size: 11px;
  }

  .dashboard-status-copy strong {
    font-size: 11px;
  }

  .dashboard-column-overview {
    height: auto;
    display: block;
    flex: 0 0 auto;
    border-bottom: 0;
  }

  .dashboard-column-overview.calendar-period-total {
    height: 40px;
    display: flex;
    flex: 0 0 40px;
    border-bottom: 1px solid var(--line);
  }

  .dashboard-status-tooltip {
    right: -44px;
    width: min(230px, calc(100vw - 48px));
  }

  .calendar-days {
    grid-template-rows: repeat(6, var(--dashboard-week-row-height));
  }

  .month-calendar {
    overflow-x: auto;
    overflow-y: hidden;
    overscroll-behavior-inline: contain;
    scrollbar-color: var(--line-strong) transparent;
    scrollbar-width: thin;
  }

  .month-calendar .calendar-weekdays,
  .month-calendar .calendar-days {
    width: 205.882%;
    min-width: 205.882%;
  }

  .month-calendar:focus-visible {
    outline: 2px solid var(--teal);
    outline-offset: -2px;
  }

  .calendar-day {
    padding: 7px;
  }

  .calendar-day-metrics {
    grid-template-rows: 28px auto auto;
    gap: 3px;
    padding-top: 4px;
  }

  .calendar-date {
    top: 7px;
    left: 7px;
    font-size: 34px;
  }

  .calendar-day-metrics > b {
    font-size: 14px;
    font-weight: 400;
  }

  .calendar-day-metrics > small {
    font-size: 12px;
  }

  .year-calendar {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-template-rows: repeat(4, minmax(100px, 1fr));
    flex: 0 0 auto;
  }

  .year-month b {
    text-align: right;
  }

  .year-month:nth-child(n) {
    border-right: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
  }

  .year-month:nth-child(3n) {
    border-right: 0;
  }

  .year-month:nth-last-child(-n + 3) {
    border-bottom: 0;
  }

  .app-total-column,
  .app-detail-column {
    scroll-margin-top: 78px;
  }

  .app-total-header,
  .app-total-row {
    grid-template-columns: minmax(88px, 4fr) 42px minmax(124px, 6fr);
    gap: 6px;
    padding-right: 8px;
    padding-left: 8px;
  }

  .app-total-list {
    overflow-x: hidden;
  }

  .app-transaction-header,
  .app-transaction-row {
    grid-template-columns: 34px 68px 34px 38px 42px minmax(100px, 1fr);
    gap: 6px;
    padding-right: 8px;
    padding-left: 8px;
  }

  .app-card-number-heading {
    font-size: 0;
  }

  .app-card-number-heading::after {
    content: "카드";
    font-size: 11px;
  }

  .management-form {
    height: auto;
    align-items: stretch;
    flex-direction: column;
  }

  .management-editor {
    height: auto;
  }

  .management-form-heading {
    width: 100%;
    flex-basis: auto;
    min-height: 34px;
    justify-content: flex-start;
    padding: 0 0 10px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .management-form-actions {
    display: flex;
  }

  .management-list > .table-scroll {
    max-height: none;
    min-height: 0;
    overflow-y: visible;
    scrollbar-gutter: auto;
  }

  .management-list {
    height: auto;
    min-height: 0;
    display: block;
  }

  .run-strip {
    grid-template-columns: 1fr;
  }

  .ops-status-cell:last-child {
    grid-column: span 2;
  }

  .ops-status-primary,
  .ops-status-cell {
    min-height: 78px;
    padding: 12px 14px;
  }

  .ops-empty {
    min-height: 220px;
    padding: 24px 16px;
  }

  .toolbar,
  .toolbar-form {
    align-items: stretch;
    flex-direction: column;
  }

  .toolbar input,
  .toolbar select {
    width: 100%;
  }

  .merchant-filter-head {
    align-items: center;
    flex-direction: row;
    flex-wrap: wrap;
  }

  .merchant-filter-options {
    grid-template-columns: 1fr;
  }

  .app-filter-content-layout {
    position: static;
    grid-template-columns: 1fr;
    margin: 0 10px 10px;
    box-shadow: none;
  }

  .app-filter-control-panel {
    grid-template-columns: auto auto;
    align-items: center;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .date-filter-row,
  .date-filter-fields {
    align-items: stretch;
    flex-direction: column;
  }

  .ledger-search-row {
    align-items: stretch;
    flex-direction: column;
    gap: 8px;
  }

  .ledger-search-fields {
    width: 100%;
    flex-wrap: wrap;
  }

  .ledger-date-fields {
    width: 100%;
  }

  .ledger-date-fields label {
    min-width: 0;
    flex: 1 1 0;
  }

  .ledger-date-fields input {
    width: 100%;
  }

  .ledger-search-meta {
    width: 100%;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 40px;
    gap: 8px;
    margin-left: 0;
  }

  .ledger-inline-result-count {
    grid-column: 1;
    grid-row: 2;
    align-self: center;
  }

  .ledger-search-meta > .excel-download-button {
    grid-column: 2;
    grid-row: 2;
  }

  .ledger-search-input {
    flex: 1 1 auto;
  }

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

  .ledger-search-fields > .button {
    min-width: 58px;
    flex: 0 0 auto;
    padding-right: 10px;
    padding-left: 10px;
    white-space: nowrap;
  }

  .ledger-data-status {
    width: 100%;
    grid-column: 1 / -1;
    grid-row: 1;
  }

  .ledger-data-status .dashboard-status-help {
    width: 28px;
    height: 28px;
  }

  .ledger-data-status .dashboard-status-tooltip {
    right: 0;
  }

  .date-presets {
    align-items: stretch;
    flex-wrap: wrap;
  }

  .date-filter-fields input {
    width: 100%;
  }

  .ledger-pagination {
    gap: 4px;
    padding-right: 4px;
    padding-left: 4px;
  }

  .ledger-pagination .pagination-nav,
  .ledger-pagination .page-number {
    width: 36px;
    min-width: 36px;
    padding: 0;
  }

  .ledger-pagination .wide-label {
    display: none;
  }

  .ledger-pagination .compact-label {
    display: inline;
    font-size: 20px;
    line-height: 1;
  }

  .transaction-table {
    min-width: 840px;
  }

  .transaction-table th,
  .transaction-table td {
    padding-right: 10px;
    padding-left: 10px;
  }

  .transaction-table th:nth-child(1),
  .transaction-table td:nth-child(1) {
    width: 18%;
  }

  .transaction-table th:nth-child(2),
  .transaction-table td:nth-child(2) {
    width: 14%;
  }

  .transaction-table th:nth-child(3),
  .transaction-table td:nth-child(3) {
    width: 11%;
  }

  .transaction-table th:nth-child(4),
  .transaction-table td:nth-child(4),
  .transaction-table th:nth-child(5),
  .transaction-table td:nth-child(5) {
    width: 9%;
  }

  .transaction-table th:nth-child(6),
  .transaction-table td:nth-child(6) {
    width: 8%;
  }

  .transaction-table th:nth-child(7),
  .transaction-table td:nth-child(7) {
    width: 15%;
  }

  .transaction-table th:nth-child(8),
  .transaction-table td:nth-child(8) {
    width: 16%;
  }
}
