:root {
  --sidebar: #160523;
  --sidebar-soft: #2b173a;
  --purple: #3d0b5f;
  --purple-strong: #2f074d;
  --bg: #f4f4f6;
  --card: #ffffff;
  --text: #20242d;
  --muted: #747684;
  --line: #e7e7ec;
  --header: #f1f1f4;
  --green: #20bf6b;
  --red: #ef3f63;
  --amber: #b66a00;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  min-width: 1280px;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

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

.mobile-nav-toggle,
.sidebar-backdrop {
  display: none;
}

.inline-status-select {
  min-width: 84px;
  height: 36px;
  padding: 0 28px 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--text);
}

button {
  cursor: pointer;
}

.shell {
  display: grid;
  grid-template-columns: 265px 1fr;
  min-height: 100vh;
}

.shell.shell-locked {
  filter: blur(4px);
  pointer-events: none;
  user-select: none;
}

.login-overlay {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(15, 8, 24, 0.34);
  backdrop-filter: blur(10px);
}

.login-card {
  width: min(460px, calc(100vw - 32px));
  display: grid;
  gap: 16px;
  padding: 28px;
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 26px 80px rgba(27, 14, 39, 0.18);
}

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

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

.login-brand span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}

.login-grid {
  display: grid;
  gap: 14px;
}

.login-grid label {
  display: grid;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
}

.login-grid input {
  height: 46px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0 14px;
  background: #fff;
}

.login-error {
  min-height: 20px;
  color: var(--red);
  font-size: 13px;
}

.login-actions {
  display: flex;
  justify-content: flex-end;
}

.sidebar {
  padding: 22px 20px;
  color: #fff;
  background: var(--sidebar);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 54px;
  margin-bottom: 18px;
}

.brand-logo {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 7px;
  color: var(--sidebar);
  background: #fff;
  font-weight: 800;
}

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

.brand span {
  margin-top: 3px;
  color: rgba(255, 255, 255, 0.54);
  font-size: 12px;
}

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

.nav-item,
.nav-leaf {
  width: 100%;
  min-height: 44px;
  border: 0;
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.88);
  background: transparent;
  text-align: left;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 14px;
  font-weight: 700;
}

.nav-leaf {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-left: 55px;
  padding-right: 14px;
  color: rgba(255, 255, 255, 0.68);
}

.nav-notice {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  min-width: 19px;
  height: 19px;
  margin-left: auto;
  padding: 0 4px;
  border: 1px solid rgba(255, 255, 255, 0.92);
  border-radius: 999px;
  color: #160523;
  background: #fff;
  box-shadow: none;
  font-size: 11px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  text-rendering: auto;
}

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

.nav-item.active,
.nav-item:hover,
.nav-leaf.active,
.nav-leaf:hover {
  color: #fff;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0.05));
  box-shadow: inset 1px 0 0 rgba(255, 255, 255, 0.54);
}

.nav-icon {
  width: 22px;
  color: rgba(255, 255, 255, 0.72);
}

.nav-sub {
  display: grid;
  gap: 2px;
  margin: -2px 0 8px;
  border-left: 1px solid rgba(255, 255, 255, 0.12);
  margin-left: 27px;
}

.main {
  overflow: hidden;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 62px;
  padding: 0 28px;
  background: #fff;
  border-bottom: 1px solid var(--line);
}

.userbar {
  display: flex;
  align-items: center;
  margin-left: auto;
  gap: 12px;
  color: var(--muted);
  flex-wrap: wrap;
}

.top-icon,
.primary,
.ghost,
.text-btn,
.close-btn {
  border: 0;
  border-radius: 8px;
}

.top-icon,
.ghost {
  min-height: 36px;
  padding: 0 14px;
  color: var(--text);
  background: #fff;
  border: 1px solid var(--line);
}

.primary {
  min-height: 42px;
  padding: 0 20px;
  color: #fff;
  background: var(--purple);
  font-weight: 700;
}

.primary:hover {
  background: var(--purple-strong);
}

.text-btn {
  color: var(--purple);
  background: transparent;
}

.mobile-nav-toggle {
  align-items: center;
  gap: 8px;
  font-weight: 700;
}

.mobile-nav-toggle-icon {
  font-size: 16px;
  line-height: 1;
}

.view {
  display: none;
  padding: 28px;
}

.view.active {
  display: block;
}

.page-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 22px;
}

.page-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-size: 24px;
  letter-spacing: 0;
}

h2 {
  font-size: 17px;
}

.page-head p,
.table-bar span,
.metric span,
.metric em,
.wallet-row span,
.task-row em {
  color: var(--muted);
}

.page-head p {
  margin-top: 7px;
  font-size: 14px;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.metric-grid.small {
  margin-bottom: 18px;
}

.metric-grid.small#walletMetricGrid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.employee-dashboard {
  margin: 2px 0 20px;
}

.employee-dashboard-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}

.employee-dashboard-head p {
  margin-top: 6px;
  color: var(--muted);
  font-size: 13px;
}

.employee-dashboard-filter {
  display: grid;
  grid-template-columns: auto minmax(160px, 220px);
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.employee-dashboard-filter select {
  min-width: 0;
  height: 40px;
}

.employee-dashboard-scope {
  color: var(--text);
  font-size: 14px;
  font-weight: 800;
}

.employee-metric-grid {
  margin-bottom: 0;
}

.employee-metric {
  min-height: 104px;
}

.employee-metric strong {
  font-size: 26px;
}

.wallet-filter-card {
  margin-bottom: 18px;
}

.metric {
  min-height: 118px;
  padding: 18px;
  border-radius: 12px;
  background: #fff;
  border: 1px solid var(--line);
}

.metric strong {
  display: block;
  margin: 10px 0 8px;
  font-size: 30px;
  letter-spacing: 0;
}

.metric em {
  font-style: normal;
}

.wallet-summary-metric {
  min-height: 106px;
}

.wallet-summary-metric strong {
  font-size: 22px;
}

.metric.warn strong {
  color: var(--amber);
}

.metric.danger strong {
  color: var(--red);
}

.grid.two {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 18px;
}

.grid.one {
  display: grid;
  grid-template-columns: 1fr;
}

.panel,
.table-card,
.filter-card,
.form-panel,
.balance-panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
}

.panel,
.form-panel,
.balance-panel {
  padding: 20px;
}

.panel-head,
.table-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.task-list,
.wallet-list {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.task-row,
.wallet-row {
  display: grid;
  align-items: center;
  gap: 12px;
  min-height: 54px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
}

.task-row {
  grid-template-columns: 78px 1fr 80px;
}

.task-row span,
.status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 26px;
  border-radius: 999px;
  color: var(--purple);
  background: #f2eaf7;
  font-size: 13px;
}

.wallet-row {
  grid-template-columns: 1fr auto;
}

.wallet-row strong,
.wallet-row span {
  display: block;
}

.filter-card {
  display: grid;
  grid-template-columns: 1.15fr repeat(4, minmax(150px, 1fr)) auto;
  gap: 14px;
  align-items: end;
  padding: 22px;
  margin-bottom: 18px;
}

.compact-filter {
  grid-template-columns: repeat(4, minmax(170px, 1fr)) auto;
}

.report-filter-card {
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

.entry-filter {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.entry-filter-actions {
  display: flex;
  gap: 10px;
  align-items: end;
  min-width: 180px;
}

.sync-note {
  margin-bottom: 18px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--muted);
  background: #fff;
  font-size: 14px;
}

.sync-note.good {
  color: #0f8f4f;
  background: #e9f8f0;
  border-color: #cdeedc;
}

.sync-note.bad {
  color: var(--red);
  background: #fff0f3;
  border-color: #ffd4dc;
}

#accountsView .page-actions {
  flex-wrap: wrap;
}

label {
  display: grid;
  gap: 8px;
  color: var(--text);
  font-weight: 700;
  font-size: 14px;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid #dddde5;
  border-radius: 9px;
  color: var(--text);
  background: #fff;
}

input,
select {
  height: 44px;
  padding: 0 14px;
}

textarea {
  min-height: 96px;
  resize: vertical;
  padding: 12px 14px;
  line-height: 1.55;
}

.field-help {
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.45;
}

.table-card {
  overflow: hidden;
}

.table-bar {
  height: 62px;
  padding: 0 22px;
}

.table-bar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.recharge-ledger-table-bar {
  height: auto;
  min-height: 62px;
  padding-top: 10px;
  padding-bottom: 10px;
  flex-wrap: wrap;
}

.recharge-ledger-table-bar > div:first-child {
  flex: 1 1 360px;
  min-width: 260px;
}

.recharge-ledger-account-search,
.recharge-ledger-work-order-search {
  display: grid;
  grid-template-columns: auto minmax(150px, 1fr) auto 36px;
  align-items: center;
  gap: 8px;
  flex: 0 1 330px;
  min-width: 280px;
}

.recharge-ledger-account-search > span,
.recharge-ledger-work-order-search > span {
  color: var(--text);
  font-weight: 700;
  white-space: nowrap;
}

.recharge-ledger-account-search input,
.recharge-ledger-work-order-search input {
  min-width: 0;
  height: 36px;
}

.recharge-ledger-account-search .ghost,
.recharge-ledger-work-order-search .ghost {
  min-height: 36px;
  padding: 0 12px;
}

.recharge-ledger-account-search .recharge-ledger-search-clear,
.recharge-ledger-work-order-search .recharge-ledger-search-clear {
  width: 36px;
  min-width: 36px;
  padding: 0;
  font-size: 18px;
}

.recharge-ledger-table-bar .table-bar-actions {
  flex: 1 1 620px;
}

.entry-records-table-bar {
  height: auto;
  min-height: 62px;
  padding-top: 10px;
  padding-bottom: 10px;
  flex-wrap: wrap;
}

.entry-records-table-bar > strong {
  flex: 1 1 180px;
}

.entry-work-order-search {
  display: grid;
  grid-template-columns: auto minmax(170px, 1fr) auto 36px;
  align-items: center;
  gap: 8px;
  flex: 0 1 360px;
  min-width: 300px;
}

.entry-work-order-search > span {
  font-weight: 700;
  white-space: nowrap;
}

.entry-work-order-search input {
  min-width: 0;
  height: 36px;
}

.entry-work-order-search .entry-work-order-clear {
  width: 36px;
  min-width: 36px;
  min-height: 34px;
  padding: 0;
  font-size: 18px;
}

.entry-records-table-bar .table-bar-actions {
  flex: 1 1 260px;
}

.refresh-table-btn {
  min-width: 42px;
  height: 36px;
  padding: 0 12px;
  font-size: 18px;
  line-height: 1;
}

.refresh-table-btn:disabled {
  min-width: 72px;
  font-size: 13px;
}

.table-wrap {
  overflow: auto;
  padding: 0 16px 16px;
  max-height: calc(100vh - 260px);
}

table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  min-width: 1080px;
  font-size: 14px;
}

#accountTable {
  min-width: 1034px;
  table-layout: fixed;
}

#accountsView .filter-card {
  grid-template-columns: 1.2fr repeat(3, minmax(140px, 1fr)) auto;
}

#accountTable th,
#accountTable td {
  overflow: hidden;
  padding: 12px 10px;
  text-overflow: ellipsis;
}

#accountTable th:nth-child(1),
#accountTable td:nth-child(1) { width: 126px; }
#accountTable th:nth-child(2),
#accountTable td:nth-child(2) { width: 92px; }
#accountTable th:nth-child(3),
#accountTable td:nth-child(3) { width: 104px; }
#accountTable th:nth-child(4),
#accountTable td:nth-child(4) { width: 122px; }
#accountTable th:nth-child(5),
#accountTable td:nth-child(5) { width: 112px; }
#accountTable th:nth-child(6),
#accountTable td:nth-child(6) { width: 88px; }
#accountTable th:nth-child(7),
#accountTable td:nth-child(7) { width: 88px; }
#accountTable th:nth-child(8),
#accountTable td:nth-child(8),
#accountTable th:nth-child(9),
#accountTable td:nth-child(9) { width: 96px; }
#accountTable th:nth-child(10),
#accountTable td:nth-child(10) { width: 110px; }

th,
td {
  min-height: 52px;
  padding: 14px 16px;
  border-bottom: 1px solid #efeff3;
  text-align: left;
  white-space: nowrap;
}

.compact-info-cell {
  max-width: 180px;
}

.compact-cell {
  display: inline-block;
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: middle;
  white-space: nowrap;
}

.multi-compact-cell {
  display: inline-flex;
  align-items: center;
  max-width: 220px;
  gap: 6px;
  vertical-align: middle;
}

.multi-compact-cell span {
  display: inline-block;
  max-width: 92px;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mini-link-btn {
  flex: 0 0 auto;
  padding: 2px 7px;
  border: 0;
  border-radius: 999px;
  background: #f3eefb;
  color: var(--primary);
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
}

.mini-link-btn:hover {
  background: #eadff9;
}

.multi-value-dialog {
  width: min(680px, calc(100vw - 32px));
}

.multi-value-list {
  display: grid;
  gap: 8px;
  max-height: min(62vh, 560px);
  overflow: auto;
  padding: 4px 2px;
}

.multi-value-row {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}

.multi-value-row span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.multi-value-row strong {
  min-width: 0;
  overflow-wrap: anywhere;
  color: var(--text);
  font-size: 15px;
}

.multi-value-empty {
  padding: 18px;
  color: var(--muted);
}

.supplier-effective-date {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  white-space: nowrap;
}

.supplier-effective-date em,
.supplier-fee-history-date span {
  padding: 2px 6px;
  border-radius: 6px;
  color: #23764a;
  background: #e8f7ef;
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
}

.supplier-effective-date.pending em,
.supplier-fee-history-date span.pending {
  color: #8a5a00;
  background: #fff3cd;
}

.supplier-fee-history-dialog {
  width: min(880px, calc(100vw - 32px));
}

.supplier-fee-history-summary {
  display: grid;
  grid-template-columns: auto minmax(120px, max-content) minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fafafa;
}

.supplier-fee-history-summary span,
.supplier-fee-history-summary em,
.supplier-fee-history-row span,
.supplier-fee-history-row time {
  color: var(--muted);
  font-size: 13px;
  font-style: normal;
}

.supplier-fee-history-summary strong {
  color: var(--text);
  font-size: 15px;
}

.supplier-fee-history-list {
  display: grid;
  gap: 8px;
  max-height: min(58vh, 520px);
  margin-top: 12px;
  overflow: auto;
}

.supplier-fee-history-row {
  display: grid;
  grid-template-columns: 130px minmax(220px, 1fr) 190px;
  gap: 14px;
  align-items: center;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.supplier-fee-history-date,
.supplier-fee-history-change,
.supplier-fee-history-actor {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.supplier-fee-history-date span {
  width: max-content;
}

.supplier-fee-history-change strong,
.supplier-fee-history-actor span {
  overflow-wrap: anywhere;
}

.supplier-fee-history-actor {
  text-align: right;
}

#entryFields [hidden] {
  display: none !important;
}

.material-mode-control {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
  padding: 0;
  border: 0;
}

.material-mode-control legend {
  grid-column: 1 / -1;
  margin-bottom: 6px;
  color: var(--text);
  font-size: 13px;
  font-weight: 800;
}

.material-mode-control label {
  position: relative;
  cursor: pointer;
}

.material-mode-control input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.material-mode-control span {
  display: grid;
  min-height: 42px;
  place-items: center;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
}

.material-mode-control input:checked + span {
  border-color: var(--primary);
  color: var(--primary);
  background: #f7f1fb;
  box-shadow: inset 0 0 0 1px var(--primary);
}

.material-mode-control input:focus-visible + span {
  outline: 2px solid rgba(80, 19, 117, 0.25);
  outline-offset: 2px;
}

.compact-pill {
  display: inline-flex;
  align-items: center;
  max-width: 170px;
  min-height: 28px;
  padding: 0 10px;
  overflow: hidden;
  border: 1px solid #eee7f6;
  border-radius: 999px;
  color: var(--purple);
  background: #faf7ff;
  font-size: 13px;
  font-weight: 700;
  text-overflow: ellipsis;
  vertical-align: middle;
  white-space: nowrap;
}

.new-accounting-badge {
  display: inline-flex;
  align-items: center;
  margin-left: 8px;
  padding: 2px 8px;
  border-radius: 999px;
  background: #dcfce7;
  color: #15803d;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.workflow-lane-bar {
  display: flex;
  align-items: stretch;
  gap: 10px;
  margin: 12px 0;
  overflow-x: auto;
  padding-bottom: 2px;
}

.workflow-lane-bar button {
  min-width: 150px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  padding: 10px 12px;
  color: var(--text);
  text-align: left;
  cursor: pointer;
}

.workflow-lane-bar button.active {
  border-color: var(--purple);
  background: #f5f0ff;
  box-shadow: inset 0 0 0 1px var(--purple);
}

.workflow-lane-bar button span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.workflow-lane-bar button strong {
  display: block;
  margin-top: 4px;
  font-size: 20px;
}

.workflow-lane-bar em {
  align-self: center;
  min-width: 260px;
  color: var(--muted);
  font-size: 13px;
  font-style: normal;
}

th {
  position: sticky;
  top: 0;
  z-index: 5;
  color: #282b34;
  background: var(--header);
  font-weight: 800;
  box-shadow: 0 1px 0 #efeff3;
}

th:first-child {
  border-radius: 8px 0 0 8px;
}

th:last-child {
  border-radius: 0 8px 8px 0;
}

tbody tr.selected-confirm-row td {
  background: #f4ecff;
  border-bottom-color: #dcc8f6;
  box-shadow: inset 0 1px 0 #eadbff, inset 0 -1px 0 #eadbff;
}

tbody tr.selected-confirm-row td:first-child {
  box-shadow: inset 4px 0 0 var(--purple), inset 0 1px 0 #eadbff, inset 0 -1px 0 #eadbff;
}

tbody tr.selected-confirm-row:hover td {
  background: #efe2ff;
}

tbody tr.new-accounting-row td {
  background: #f0fdf4;
}

tbody tr.new-accounting-row:hover td {
  background: #dcfce7;
}

tbody tr.selected-row td {
  background: #eef6ff;
  border-bottom-color: #cde3ff;
}

tbody tr.selected-row td:first-child {
  box-shadow: inset 4px 0 0 #2f7dd1;
}

tbody tr.selected-row:hover td {
  background: #e4f0ff;
}

.history-warning-list,
.history-result-grid {
  display: grid;
  gap: 8px;
  padding: 16px;
}

.history-warning-list span,
.history-result-grid div {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 12px;
  background: #fafafb;
  color: var(--muted);
  font-size: 13px;
}

.history-result-grid {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.history-result-grid strong {
  display: block;
  margin-bottom: 4px;
  color: var(--text);
}

#accountTable th,
#accountTable td {
  background-clip: padding-box;
}

#accountTable td {
  background: #fff;
}

#accountTable .sticky-col,
#accountTable .sticky-col-right {
  position: sticky;
  z-index: 3;
}

#accountTable th.sticky-col,
#accountTable th.sticky-col-right {
  z-index: 8;
  background: var(--header);
}

#accountTable .sticky-col {
  box-shadow: 1px 0 0 #efeff3;
}

#accountTable .sticky-col-right {
  right: 0;
  box-shadow: -1px 0 0 #efeff3;
}

#accountTable .sticky-account-select {
  left: 0;
  min-width: 56px;
  width: 56px;
}

#accountTable .sticky-account-platform {
  left: 56px;
  min-width: 92px;
  width: 92px;
}

#accountTable .sticky-account-product {
  left: 148px;
  min-width: 108px;
  width: 108px;
}

#accountTable .sticky-account-name {
  left: 256px;
  min-width: 236px;
  max-width: 236px;
}

#accountTable .sticky-account-id {
  left: 492px;
  min-width: 188px;
  max-width: 188px;
}

#accountTable .sticky-account-actions {
  min-width: 110px;
  width: 110px;
}

#accountTable .sticky-account-name span,
#accountTable .sticky-account-id span {
  display: inline-block;
  overflow: hidden;
  max-width: 100%;
  text-overflow: ellipsis;
  vertical-align: middle;
}

.good,
.bad,
.submitted {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 9px;
  border-radius: 999px;
}

.good {
  color: #0f8f4f;
  background: #e9f8f0;
}

.bad {
  color: var(--red);
  background: #fff0f3;
}

.submitted {
  color: #8a5a00;
  background: #fff1b8;
}

#rechargeReportTable {
  min-width: 1540px;
}

#rechargeReportTable th:last-child,
#rechargeReportTable .row-actions-cell {
  width: 270px;
  min-width: 270px;
  max-width: 270px;
  text-align: left;
}

#rechargeReportTable .row-actions-cell .row-btn {
  margin-right: 6px;
}

.account-openings-table {
  min-width: 1980px;
}

.opening-table-title-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.opening-table-title-actions .small {
  min-height: 34px;
}

.account-openings-table .opening-multi-cell {
  width: 170px;
  min-width: 170px;
  max-width: 170px;
}

.account-openings-table .opening-notes-cell {
  width: 120px;
  min-width: 120px;
  max-width: 120px;
  text-align: center;
}

.account-openings-table .opening-status-cell,
.account-openings-table .compact-info-cell {
  width: 92px;
  min-width: 92px;
  max-width: 92px;
}

.account-openings-table .opening-actions-cell {
  width: 240px;
  min-width: 240px;
  max-width: 240px;
}

.account-openings-table .opening-actions-cell .row-btn + .row-btn {
  margin-left: 6px;
}

.text-detail-btn {
  min-height: 30px;
  padding: 0;
  border: 0;
  color: var(--purple);
  background: transparent;
  font-size: 13px;
  font-weight: 700;
}

.text-detail-btn:hover {
  text-decoration: underline;
}

.long-text-detail {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8f9fc;
  line-height: 1.7;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.work-order-cell {
  min-width: 178px;
  color: #344054;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
}

#notificationBotsForm {
  padding: 0 16px 24px;
}

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

.notification-bot-card {
  display: grid;
  gap: 14px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.notification-bot-card > label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.notification-bot-card > label input {
  width: 100%;
  min-width: 0;
  height: 44px;
  padding: 0 12px;
  border: 1px solid #d8dce8;
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  font-size: 15px;
}

.notification-bot-head,
.notification-bot-actions,
.notification-bot-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.notification-bot-head strong,
.notification-bot-head span {
  display: block;
}

.notification-bot-head strong {
  font-size: 16px;
}

.notification-bot-head span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.bot-enable-toggle,
.bot-clear-key {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
}

.bot-enable-toggle input,
.bot-clear-key input {
  width: 17px;
  height: 17px;
  accent-color: var(--purple);
}

.notification-bot-footer {
  margin-top: 16px;
  padding: 16px 0 0;
  border-top: 1px solid var(--line);
}

#notificationBotStatus {
  min-height: 20px;
  color: var(--muted);
  font-size: 13px;
}

#notificationBotStatus.good-text {
  color: #14804a;
}

#notificationBotStatus.bad-text {
  color: var(--red);
}

.recharge-layout {
  display: block;
  margin-bottom: 18px;
}

.recharge-workbench {
  padding: 18px 18px 16px;
}

.recharge-top-tabs {
  display: flex;
  gap: 20px;
  padding: 2px 2px 14px;
  border-bottom: 1px solid var(--line);
}

.recharge-page-tab {
  min-height: 34px;
  padding: 0;
  border: 0;
  color: var(--muted);
  background: transparent;
  font-weight: 700;
}

.recharge-page-tab.active {
  color: var(--purple);
}

.recharge-entry-switch {
  display: flex;
  gap: 8px;
  margin-top: 16px;
}

.entry-switch-btn,
.mode-chip {
  min-height: 38px;
  padding: 0 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  background: #fff;
  font-weight: 700;
}

.entry-switch-btn.active,
.mode-chip.active {
  color: #fff;
  background: var(--purple);
  border-color: var(--purple);
}

.recharge-layout-main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 290px;
  gap: 16px;
  margin-top: 14px;
  align-items: start;
}

.recharge-editor-column {
  min-width: 0;
}

.recharge-entry-card,
.recharge-sheet-panel,
.recharge-report-shell {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}

.recharge-entry-card {
  padding: 14px;
}

.recharge-card-head h3 {
  margin: 0;
  font-size: 16px;
}

.recharge-card-head p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.recognize-workspace {
  margin-top: 12px;
}

.recognize-workspace textarea {
  min-height: 132px;
}

.manual-entry-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 14px;
}

.recharge-side-panel {
  padding: 16px;
}

.compact-panel-head {
  margin-bottom: 12px;
}

.icon-refresh {
  min-width: 34px;
  min-height: 34px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  background: #fff;
}

.recharge-sheet-panel {
  margin-top: 14px;
  padding: 16px;
}

.recharge-sheet-head {
  margin-bottom: 10px;
}

.recharge-sheet-head h3 {
  font-size: 20px;
}

.recharge-sheet-head p {
  margin-top: 6px;
  font-size: 13px;
  color: var(--muted);
}

.sheet-toolbar {
  display: flex;
  gap: 14px;
  margin: 14px 0 6px;
  color: var(--muted);
  font-size: 13px;
}

.recharge-batch-defaults {
  display: grid;
  gap: 12px;
  margin-top: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fafafd;
}

.recharge-batch-defaults strong {
  font-size: 14px;
}

.recharge-batch-defaults-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px 14px;
}

.recharge-batch-defaults-grid label {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.recharge-batch-defaults-grid span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.recharge-batch-defaults-grid input,
.recharge-batch-defaults-grid select {
  width: 100%;
  min-width: 0;
  height: 42px;
  padding: 8px 12px;
  border: 1px solid #d8dce8;
  border-radius: 8px;
  background: #fff;
  font-size: 14px;
}

.recharge-batch-default-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.sheet-tool {
  min-height: 28px;
  padding: 0;
  border: 0;
  color: inherit;
  background: transparent;
}

.sheet-tool.active {
  color: var(--purple);
  font-weight: 700;
}

.recharge-sheet-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 12px;
  flex-wrap: wrap;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.sheet-footer-total {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 13px;
}

.sheet-footer-total strong {
  color: var(--text);
  font-size: 14px;
}

.recharge-submit-row {
  margin-top: 0;
  margin-left: auto;
}

.save-inline-status {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  max-width: 420px;
  padding: 6px 10px;
  border-radius: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.35;
  background: #f7f7fa;
}

.save-inline-status.bad-text {
  color: var(--red);
  background: rgba(239, 63, 99, 0.08);
}

.save-inline-status.good-text {
  color: var(--green);
  background: rgba(32, 191, 107, 0.08);
}

.input-attention {
  border-color: var(--red) !important;
  box-shadow: 0 0 0 3px rgba(239, 63, 99, 0.14) !important;
}

.recharge-report-shell {
  padding: 16px;
}

.recharge-metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(180px, 1fr));
  gap: 10px;
}

.recharge-metric.compact {
  min-height: 132px;
  border-color: rgba(61, 11, 95, 0.18);
  box-shadow: inset 3px 0 0 rgba(61, 11, 95, 0.24);
}

.recharge-metric-lines {
  display: grid;
  gap: 8px;
  margin-top: 8px;
}

.recharge-metric-lines strong {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  font-size: 22px;
  line-height: 1.15;
}

.recharge-metric-lines strong.current {
  color: var(--purple);
}

.recharge-metric-lines em {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 13px;
  font-style: normal;
  font-weight: 800;
}

.recharge-metric.compact small {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.recharge-report-filter-grid {
  grid-template-columns: minmax(500px, 1.45fr) repeat(3, minmax(220px, 1fr));
  margin-top: 14px;
  margin-bottom: 0;
}

#rechargeReportKeywordFilter {
  min-height: 84px;
  resize: vertical;
  line-height: 1.45;
}

.bulk-search-field {
  align-content: start;
}

.bulk-search-field .small {
  width: fit-content;
  min-width: 120px;
  height: 34px;
  padding: 0 14px;
}

.recharge-keyword-dialog {
  width: min(920px, calc(100vw - 48px));
}

#rechargeKeywordLargeInput {
  min-height: 420px;
  font-size: 16px;
  line-height: 1.6;
  white-space: pre-wrap;
}

.batch-clear-dialog {
  width: min(1180px, calc(100vw - 48px));
}

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

#batchClearAmountText {
  min-height: 280px;
  font-size: 16px;
  line-height: 1.55;
  resize: vertical;
}

.batch-clear-side {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fafafd;
}

.batch-clear-side p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.batch-clear-preview-wrap {
  max-height: 360px;
  margin-top: 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
}

.batch-clear-preview-wrap table {
  min-width: 1040px;
}

.batch-clear-amount-input {
  width: 150px;
  min-width: 150px;
  height: 38px;
  padding: 6px 10px;
  border: 1px solid #d8dce8;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 800;
}

.recharge-confirm-clear-section:not([hidden]) {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid #f0c96a;
  border-radius: 8px;
  background: #fffaf0;
}

.recharge-confirm-clear-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.recharge-confirm-clear-head span,
.recharge-confirm-clear-record span {
  color: var(--muted);
  font-size: 13px;
}

.recharge-confirm-clear-list {
  display: grid;
  gap: 8px;
  max-height: 260px;
  overflow-y: auto;
}

.recharge-confirm-clear-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 180px;
  gap: 12px;
  align-items: center;
}

.recharge-confirm-clear-record {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.recharge-confirm-clear-record strong,
.recharge-confirm-clear-record span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#batchOpeningAssetDialog {
  width: min(1840px, calc(100vw - 24px));
  max-width: none;
  max-height: calc(100vh - 24px);
}

.batch-opening-dialog {
  width: auto;
  max-width: none;
  padding: 18px 20px;
}

.batch-opening-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}

#batchOpeningAssetText {
  min-height: 260px;
  font-size: 13px;
  line-height: 1.45;
  resize: vertical;
}

.batch-opening-side {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fafafd;
}

.batch-opening-side button {
  width: 100%;
}

.batch-opening-side p {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.batch-opening-preview-wrap {
  max-height: calc(100vh - 300px);
  margin-top: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 12px;
  background: #fff;
}

.batch-opening-card-list {
  display: grid;
  gap: 10px;
}

.batch-opening-card {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  background: #fafafd;
  display: grid;
  gap: 10px;
}

.batch-opening-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.batch-opening-card-head strong {
  font-size: 14px;
}

.batch-opening-card-head span {
  color: var(--muted);
  font-size: 12px;
}

.batch-opening-info-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.batch-opening-info-item {
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 8px 10px;
  border: 1px solid #ece7f5;
  border-radius: 8px;
  background: #fff;
}

.batch-opening-info-item span {
  color: var(--muted);
  font-size: 11px;
}

.batch-opening-info-item strong {
  font-size: 12px;
  line-height: 1.35;
  word-break: break-word;
  font-weight: 600;
}

.batch-opening-info-item-wide {
  grid-column: 1 / -1;
}

.batch-opening-edit-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.batch-opening-edit-grid label {
  min-width: 0;
  font-size: 12px;
}

.batch-opening-edit-grid label:first-child {
  grid-column: 1 / -1;
}

.batch-opening-edit-grid input {
  height: 38px;
  font-size: 13px;
  padding: 0 12px;
}

.batch-opening-dialog .dialog-head h2 {
  font-size: 16px;
}

.batch-opening-dialog .dialog-head p {
  font-size: 12px;
  line-height: 1.4;
}

.batch-opening-dialog .dialog-actions {
  margin-top: 12px;
}

.batch-opening-dialog .ghost,
.batch-opening-dialog .primary {
  min-height: 36px;
  font-size: 13px;
  padding: 0 14px;
}

.table-subtext {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 400;
}

.date-range-inline {
  display: grid;
  grid-template-columns: minmax(210px, 1fr) 24px minmax(210px, 1fr);
  gap: 14px;
  align-items: center;
}

.date-range-inline input {
  min-width: 210px;
  height: 56px;
  font-size: 18px;
}

.report-filter-actions {
  display: flex;
  gap: 12px;
  align-items: end;
}

.icon-only {
  min-width: 42px;
  padding: 0 12px;
}

.report-filter-actions button {
  min-width: 108px;
}

.recharge-report-tabs {
  margin: 16px 0;
}

.report-summary-card {
  margin: 0;
}

.compact-summary-wrap {
  max-height: 320px;
  overflow: auto;
}

.compact-summary-wrap table {
  min-width: 760px;
}

.form-grid,
.dialog-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 16px;
}

.account-opening-record-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

#accountOpeningRecordStatus {
  min-height: 20px;
  margin: 12px 0 0;
}

.entry-grid {
  align-items: start;
}

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

.entry-summary-card {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f8f7fb;
}

.entry-summary-card span {
  display: block;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}

.entry-summary-card strong {
  display: block;
  margin-top: 6px;
  font-size: 24px;
  line-height: 1.2;
}

.entry-summary-card em {
  grid-column: 1 / -1;
  color: var(--muted);
  font-style: normal;
  font-size: 13px;
}

.voucher-upload-field {
  display: grid;
  gap: 8px;
}

.voucher-upload-field > span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.voucher-upload-box {
  display: grid;
  gap: 8px;
}

.voucher-upload-box input[type="file"] {
  height: auto;
  padding: 10px 12px;
}

.voucher-upload-preview {
  min-height: 34px;
  display: flex;
  align-items: center;
  color: var(--muted);
  font-size: 13px;
}

.voucher-upload-preview a,
.voucher-link {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border: 1px solid #eadcf8;
  border-radius: 999px;
  color: var(--purple);
  background: #fbf7ff;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
}

.voucher-link {
  max-width: 124px;
}

.voucher-link-name {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.voucher-upload-preview em {
  color: var(--muted);
  font-style: normal;
}

.summary-edit-field {
  gap: 8px;
}

.summary-edit-field input {
  height: 42px;
}

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

.entry-grid-accountOpenings,
.entry-grid-adAccounts {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px 18px;
}

#accountOpeningDialog {
  width: min(1120px, calc(100vw - 32px));
  max-height: calc(100vh - 40px);
}

.account-opening-dialog {
  width: 100%;
  max-width: none;
  overflow: auto;
  overflow-x: hidden;
}

.account-opening-layout {
  display: block;
  margin-top: 16px;
  min-width: 0;
}

.account-opening-main {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.account-opening-block {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fafafd;
  min-width: 0;
}

.account-opening-block.compact {
  padding: 12px;
}

.account-opening-block h3,
.account-opening-toolbar h3 {
  margin: 0;
  font-size: 16px;
}

.account-opening-block-head,
.account-opening-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.account-opening-toolbar {
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.account-opening-top-actions {
  align-items: center;
  justify-content: flex-end;
  width: 100%;
}

.account-opening-top-actions input {
  width: min(320px, 100%);
}

.account-opening-toolbar p {
  margin-top: 6px;
  color: var(--muted);
  font-size: 13px;
}

.account-opening-toolbar .page-actions[hidden] {
  display: none;
}

.account-opening-base-grid,
.account-opening-rate-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.account-opening-inline-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 12px;
}

.opening-recognize-text {
  min-height: 170px;
  max-height: 320px;
  resize: vertical;
  line-height: 1.55;
}

.account-opening-inline-panels {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  min-width: 0;
}

.account-opening-customer-stack {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.opening-create-customer-toggle {
  margin-top: 0;
}

.account-opening-draft-block {
  min-height: 280px;
}

.account-opening-asset-edit .account-opening-main {
  gap: 12px;
}

.account-opening-asset-edit .account-opening-base-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.account-opening-asset-edit .account-opening-inline-panels {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.account-opening-asset-edit .account-opening-draft-block {
  min-height: 0;
}

.account-opening-asset-edit .account-opening-rows-wrap {
  max-height: none;
  overflow: visible;
}

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

.multi-input-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  min-width: 0;
}

.account-opening-rows-wrap {
  max-height: 430px;
  overflow: auto;
  overflow-x: hidden;
}

.account-opening-generate-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f5f7fb;
  min-width: 0;
}

.account-opening-generate-note {
  flex: 1 1 320px;
  color: var(--muted);
  font-size: 13px;
}

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

.opening-row-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 12px;
}

.opening-row-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.opening-row-head strong {
  font-size: 14px;
}

.opening-row-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.opening-row-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 12px;
}

.opening-row-grid label {
  min-width: 0;
}

.opening-row-grid .wide-field {
  grid-column: span 2;
}

.opening-row-product {
  display: grid;
  gap: 6px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8f9fc;
}

.opening-row-product span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.opening-row-product strong {
  color: var(--text);
  font-size: 15px;
  line-height: 1.5;
  word-break: break-word;
}

.opening-row-defaults {
  display: grid;
  gap: 6px;
  padding: 10px 12px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: #faf7fd;
}

.opening-row-defaults span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.opening-row-defaults em {
  color: var(--text);
  font-style: normal;
  font-size: 13px;
  line-height: 1.5;
}

.opening-row-grid textarea {
  min-height: 92px;
  resize: vertical;
}

.opening-empty-state {
  padding: 26px 18px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: #fff;
  text-align: center;
  color: var(--muted);
}

.opening-empty-state strong {
  display: block;
  margin-bottom: 8px;
  color: var(--text);
}

#accountOpeningForm,
#accountOpeningForm > * {
  min-width: 0;
}

#accountOpeningForm .dialog-head > div {
  min-width: 0;
}

#accountOpeningForm input,
#accountOpeningForm select,
#accountOpeningForm textarea,
#accountOpeningForm .search-select,
#accountOpeningForm .search-select-label {
  min-width: 0;
  max-width: 100%;
}

.entry-grid-payouts label {
  gap: 10px;
}

.payout-summary-card {
  margin-top: 2px;
}

.recognize-bar {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: stretch;
  margin-top: 16px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fbfbfd;
}

.recognize-actions {
  display: grid;
  grid-template-rows: repeat(3, minmax(42px, auto));
  gap: 8px;
  min-width: 132px;
}

.single-entry-panel,
.batch-entry-panel {
  margin-top: 16px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fcfcfe;
}

.section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.section-head h3 {
  margin: 0;
  font-size: 16px;
}

.section-head p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.batch-head-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.batch-defaults-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.batch-entry-list {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

.recharge-draft-strip {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.recharge-finance-panel {
  margin-top: 14px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}

.recharge-finance-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 14px;
}

.recharge-finance-head strong {
  font-size: 16px;
}

.recharge-finance-head p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.recharge-finance-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.finance-payout-fields {
  display: contents;
}

.finance-linked-fields {
  display: contents;
}

.finance-payout-fields[hidden],
.finance-linked-fields[hidden] {
  display: none !important;
}

.recharge-finance-grid label {
  display: grid;
  gap: 7px;
  min-width: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.recharge-finance-grid input,
.recharge-finance-grid select {
  width: 100%;
  min-width: 0;
  height: 44px;
  padding: 9px 12px;
  border: 1px solid #d8dce8;
  border-radius: 10px;
  background: #fff;
  color: var(--text);
  font-size: 15px;
}

.recharge-finance-grid .check-card {
  align-content: center;
  grid-template-columns: auto 1fr;
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid #d8dce8;
  border-radius: 10px;
  background: #f8fafc;
  color: var(--text);
}

.recharge-finance-grid .check-card input {
  width: 18px;
  height: 18px;
  padding: 0;
}

.payout-summary-grid {
  margin-bottom: 14px;
}

.payout-summary-table,
.supplier-summary-table {
  margin-bottom: 14px;
}

.supplier-summary-grid {
  margin-bottom: 14px;
}

.supplier-summary-table .table-wrap {
  max-height: 520px;
}

.entry-pagination {
  border-top: 1px solid var(--line);
}

.entry-table-wrap {
  margin-top: 14px;
  overflow: visible;
  border: 0;
  background: transparent;
}

.recharge-entry-workspace {
  overflow: visible;
}

.recharge-entry-cards {
  display: grid;
  gap: 16px;
}

.recharge-entry-empty {
  padding: 28px 22px;
  border: 1px dashed var(--line);
  border-radius: 12px;
  background: #fff;
  color: var(--muted);
  text-align: center;
}

.recharge-entry-card-item {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
}

.recharge-entry-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.recharge-entry-card-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.recharge-entry-card-meta strong {
  font-size: 17px;
}

.recharge-entry-card-meta span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  background: #f3f0f8;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.recharge-entry-main-grid,
.recharge-entry-detail-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px 16px;
}

.recharge-entry-detail-grid {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.recharge-entry-main-grid label,
.recharge-entry-detail-grid label {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.recharge-entry-main-grid span,
.recharge-entry-detail-grid span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.recharge-entry-main-grid input,
.recharge-entry-main-grid select,
.recharge-entry-detail-grid input,
.recharge-entry-detail-grid select {
  width: 100%;
  min-width: 0;
  height: 50px;
  padding: 10px 14px;
  border: 1px solid #d8dce8;
  border-radius: 10px;
  background: #fff;
  font-size: 18px;
}

.recharge-entry-main-grid .small-check-card {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 50px;
  padding: 10px 12px;
  border: 1px solid #d8dce8;
  border-radius: 10px;
  background: #f8f9fc;
}

.recharge-entry-main-grid .small-check-card input {
  width: 18px;
  height: 18px;
  padding: 0;
}

.recharge-entry-main-grid .small-check-card span {
  color: var(--text);
  font-size: 13px;
}

.entry-span-2,
.entry-note-wide {
  grid-column: span 2;
}

.percent-input-wrap {
  position: relative;
}

.percent-input-wrap input {
  padding-right: 28px !important;
}

.percent-input-wrap em {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  font-style: normal;
  font-size: 13px;
  font-weight: 700;
}

.detail-money {
  display: block;
  min-height: 50px;
  padding: 12px 14px;
  border: 1px solid #d8dce8;
  border-radius: 10px;
  background: #fff;
  font-size: 18px;
  line-height: 24px;
}

.good-text {
  color: #14804a;
}

.danger-row {
  background: #fffafa;
}

.good-tag {
  color: #14804a;
  background: #e9f8f0;
}

.danger-tag {
  color: var(--red);
  background: #fff0f3;
}

.entry-field-stack {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.entry-field-stack label,
.entry-inline-label {
  display: block;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.2;
}

.entry-summary-box {
  display: grid;
  gap: 6px;
  min-width: 112px;
  padding: 8px 10px;
  border: 1px solid #ece7f5;
  border-radius: 8px;
  background: #fff;
}

.entry-summary-box strong {
  font-size: 20px;
  line-height: 1;
}

.entry-summary-box.negative strong {
  color: var(--red);
}

.entry-note {
  min-height: 40px;
  resize: vertical;
}

.entry-index {
  width: 40px;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}

.entry-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: stretch;
  min-width: 82px;
}

.entry-actions .ghost {
  width: 100%;
  min-height: 34px;
  padding: 0 10px;
}

.entry-primary-row {
  display: grid;
  grid-template-columns: 40px minmax(170px, 1.25fr) minmax(170px, 1.15fr) minmax(130px, 0.9fr) minmax(170px, 1.15fr) minmax(130px, 0.9fr) minmax(96px, 0.7fr) minmax(120px, 0.9fr) 90px;
  gap: 10px;
  align-items: start;
}

.entry-secondary-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
  align-items: start;
}

.entry-secondary-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(116px, 0.8fr));
  gap: 10px;
}

.row-actions-cell {
  text-align: right;
}

#accountTable .account-actions-cell .row-btn {
  width: 100%;
  min-height: 32px;
  padding: 0 8px;
  font-size: 12px;
}

#accountTable .account-actions-cell {
  display: grid;
  grid-template-columns: 1fr;
  justify-items: stretch;
  gap: 6px;
  text-align: right;
}

.checkbox-column {
  width: 56px;
  min-width: 56px;
  text-align: center;
}

.checkbox-column input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--purple);
  cursor: pointer;
}

.empty-inline-text {
  display: inline-block;
  padding: 16px 8px;
  color: var(--muted);
}

.recharge-guide-card .form-actions {
  margin-top: 0;
}

.table-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 16px 6px;
  flex-wrap: wrap;
}

.pagination-size,
.pagination-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.ghost.small {
  min-height: 34px;
  padding: 0 12px;
  font-size: 13px;
}

.batch-card {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}

.batch-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.batch-card-head strong {
  display: block;
  font-size: 14px;
}

.batch-card-head span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}

.batch-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.batch-grid .wide-field {
  grid-column: 1 / -1;
}

.recognize-result {
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 9px;
  color: var(--muted);
  background: #f6f3f8;
  font-size: 14px;
  line-height: 1.6;
  white-space: normal;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.recognize-result.bad-result {
  color: var(--red);
  background: #fff0f3;
}

.wide-field {
  grid-column: span 2;
}

.calc-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-top: 18px;
}

.calc-strip div,
.balance-card {
  padding: 16px;
  border-radius: 10px;
  background: #f7f7fa;
}

.calc-strip span,
.balance-card span {
  display: block;
  color: var(--muted);
  font-size: 13px;
}

.calc-strip strong,
.balance-card strong {
  display: block;
  margin-top: 6px;
  font-size: 23px;
}

.balance-panel h2 {
  margin-bottom: 14px;
}

.balance-row {
  display: flex;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.balance-result {
  margin-top: 14px;
  padding: 14px;
  border-radius: 10px;
  color: #0f8f4f;
  background: #e9f8f0;
  font-weight: 800;
}

.balance-result.bad-result {
  color: var(--red);
  background: #fff0f3;
}

.form-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 18px;
}

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

.bad-text {
  color: var(--red) !important;
}

.search-select-label {
  position: relative;
}

.search-select {
  position: relative;
}

.search-select input {
  height: 44px;
  padding-right: 44px;
}

.search-select-toggle {
  position: absolute;
  right: 6px;
  top: 6px;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 7px;
  color: var(--muted);
  background: transparent;
  font-size: 20px;
}

.search-select-toggle:hover {
  color: var(--text);
  background: #f4f4f7;
}

.search-options {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 6px);
  z-index: 20;
  display: none;
  max-height: 260px;
  overflow: auto;
  padding: 6px;
  border: 1px solid #d9d9e3;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 14px 32px rgba(24, 18, 32, 0.16);
}

.search-options.open {
  display: grid;
  gap: 4px;
}

.search-options::after {
  content: attr(data-empty);
  display: none;
  padding: 12px;
  color: var(--muted);
}

.search-options[data-empty]:not([data-empty=""])::after {
  display: block;
}

.search-options button {
  display: grid;
  gap: 2px;
  width: 100%;
  min-height: 42px;
  padding: 7px 10px;
  border: 0;
  border-radius: 7px;
  color: var(--text);
  background: transparent;
  text-align: left;
}

.search-options button[hidden] {
  display: none;
}

.search-options button:hover,
.search-options button:focus {
  outline: none;
  background: #f5f1f8;
}

.search-options button span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
}

.report-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 18px;
}

.report-tabs button {
  min-height: 38px;
  padding: 0 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  background: #fff;
}

.report-tabs button.active {
  color: #fff;
  background: var(--purple);
  border-color: var(--purple);
}

.row-btn {
  min-height: 30px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--purple);
  background: #fff;
  font-weight: 700;
}

.row-btn + .row-btn {
  margin-left: 8px;
}

.primary-row-btn {
  color: #fff;
  border-color: var(--purple);
  background: var(--purple);
}

.primary-row-btn:hover {
  background: var(--purple-strong);
  border-color: var(--purple-strong);
}

.row-lock-text {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 10px;
  border-radius: 7px;
  color: var(--muted);
  background: #f3f3f6;
  font-weight: 700;
}

.row-btn:hover {
  border-color: var(--purple);
}

.product-split-layout {
  display: grid;
  gap: 28px;
}

.product-kind-table {
  display: grid;
  gap: 18px;
  padding: 22px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
}

.product-kind-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 0;
}

.product-kind-head h1 {
  margin: 0;
  font-size: 28px;
}

.product-kind-head p {
  margin: 8px 0 0;
  color: var(--muted);
}

.product-kind-actions,
.product-group-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.product-group {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
}

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

.product-group-head h2 {
  margin: 0;
  font-size: 18px;
}

.product-group-head p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.product-table-wrap {
  padding-top: 0;
}

.product-table {
  min-width: 860px;
}

.empty-table-cell {
  color: var(--muted);
  text-align: center;
}

.danger-text {
  color: var(--red);
}

.dialog-spacer {
  flex: 1;
}

.empty-state {
  display: grid;
  place-items: center;
  min-height: 360px;
  border: 1px dashed #cacad4;
  border-radius: 14px;
  color: var(--muted);
  background: #fff;
}

dialog {
  width: min(760px, calc(100vw - 48px));
  border: 0;
  border-radius: 14px;
  padding: 0;
  box-shadow: 0 24px 80px rgba(25, 18, 31, 0.22);
}

dialog::backdrop {
  background: rgba(18, 10, 26, 0.42);
}

.dialog-body {
  padding: 22px;
}

.dialog-head,
.dialog-actions {
  display: flex;
  justify-content: space-between;
  gap: 16px;
}

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

.close-btn {
  width: 36px;
  height: 36px;
  background: #f3f3f6;
  font-size: 24px;
}

.dialog-actions {
  justify-content: flex-end;
  margin-top: 20px;
}

.account-opening-submit-note {
  margin-right: auto;
  color: var(--muted);
  font-size: 13px;
}

.account-opening-submit-note.bad-text {
  color: var(--red);
}

@media (max-width: 1280px) {
  .recharge-layout-main {
    grid-template-columns: 1fr;
  }

  .recharge-report-filter-grid,
  .report-summary-grid {
    grid-template-columns: repeat(2, minmax(220px, 1fr));
  }

  .recharge-report-filter-grid > label:first-child {
    grid-column: 1 / -1;
  }

  #accountOpeningDialog {
    width: min(980px, calc(100vw - 24px));
  }

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

  .account-opening-inline-panels,
  .account-opening-base-grid,
  .account-opening-inline-grid,
  .opening-row-grid {
    grid-template-columns: 1fr;
  }

  .opening-row-grid .wide-field {
    grid-column: auto;
  }

  #batchOpeningAssetDialog {
    width: calc(100vw - 20px);
    max-height: calc(100vh - 20px);
  }

  .batch-opening-side {
    grid-template-columns: 1fr;
  }

  .batch-opening-info-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  body {
    min-width: 0;
  }

  body.mobile-nav-locked {
    overflow: hidden;
  }

  .shell,
  .grid.two {
    grid-template-columns: 1fr;
  }

  .employee-dashboard-head {
    align-items: stretch;
    flex-direction: column;
  }

  .employee-dashboard-filter {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .sidebar {
    display: block;
    position: fixed;
    inset: 0 auto 0 0;
    width: min(82vw, 320px);
    max-width: 320px;
    z-index: 30;
    overflow-y: auto;
    transform: translateX(-100%);
    transition: transform 180ms ease;
    box-shadow: 0 24px 64px rgba(18, 8, 28, 0.36);
  }

  .shell.mobile-nav-open .sidebar {
    transform: translateX(0);
  }

  .sidebar-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 24;
    border: 0;
    padding: 0;
    opacity: 0;
    pointer-events: none;
    background: rgba(11, 9, 16, 0.42);
    transition: opacity 180ms ease;
  }

  .shell.mobile-nav-open .sidebar-backdrop {
    opacity: 1;
    pointer-events: auto;
  }

  .recharge-report-filter-grid,
  .report-summary-grid {
    grid-template-columns: 1fr;
  }

  .recharge-ledger-table-bar {
    align-items: stretch;
    flex-direction: column;
    padding: 14px 12px;
  }

  .recharge-ledger-table-bar > div:first-child,
  .recharge-ledger-account-search,
  .recharge-ledger-work-order-search,
  .recharge-ledger-table-bar .table-bar-actions {
    width: 100%;
    min-width: 0;
    flex-basis: auto;
  }

  .recharge-ledger-account-search,
  .recharge-ledger-work-order-search {
    grid-template-columns: auto minmax(0, 1fr) auto 40px;
  }

  .recharge-ledger-table-bar .table-bar-actions {
    justify-content: flex-start;
  }

  .entry-records-table-bar {
    align-items: stretch;
    flex-direction: column;
    padding: 14px 12px;
  }

  .entry-records-table-bar > strong,
  .entry-work-order-search,
  .entry-records-table-bar .table-bar-actions {
    width: 100%;
    min-width: 0;
    flex-basis: auto;
  }

  .entry-work-order-search {
    grid-template-columns: auto minmax(0, 1fr) auto 40px;
  }

  .entry-records-table-bar .table-bar-actions {
    justify-content: flex-start;
  }

  .date-range-inline {
    grid-template-columns: 1fr;
  }

  .date-range-inline span {
    display: none;
  }

  .topbar,
  .page-head {
    align-items: stretch;
    flex-direction: column;
    height: auto;
    padding: 16px;
  }

  .topbar {
    position: sticky;
    top: 0;
    z-index: 20;
    gap: 12px;
  }

  .mobile-nav-toggle {
    display: inline-flex;
    align-self: flex-start;
  }

  .metric-grid,
  .filter-card,
  .recharge-report-filter-grid,
  .form-grid,
  .dialog-grid,
  .batch-defaults-grid,
  .recharge-finance-grid,
  .batch-grid {
    grid-template-columns: 1fr;
  }

  .recharge-workbench {
    padding: 14px 12px 12px;
  }

  .recharge-top-tabs {
    gap: 14px;
    overflow-x: auto;
    padding-bottom: 12px;
  }

  .recharge-page-tab {
    flex: 0 0 auto;
    font-size: 15px;
    white-space: nowrap;
  }

  .recharge-entry-switch {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .entry-switch-btn,
  .mode-chip {
    width: 100%;
    justify-content: center;
    padding: 0 12px;
  }

  .recognize-bar {
    grid-template-columns: 1fr;
  }

  .recognize-actions {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-template-rows: none;
    min-width: 0;
  }

  .recharge-batch-defaults {
    padding: 14px 12px;
  }

  .recharge-batch-defaults-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  .recharge-batch-defaults-grid label,
  .recharge-entry-main-grid label,
  .recharge-entry-detail-grid label,
  .recharge-finance-grid label {
    gap: 6px;
  }

  .recharge-batch-defaults-grid span,
  .recharge-entry-main-grid span,
  .recharge-entry-detail-grid span,
  .recharge-finance-grid label {
    font-size: 13px;
    line-height: 1.35;
  }

  .recharge-batch-defaults-grid input,
  .recharge-batch-defaults-grid select,
  .recharge-entry-main-grid input,
  .recharge-entry-main-grid select,
  .recharge-entry-detail-grid input,
  .recharge-entry-detail-grid select,
  .recharge-finance-grid input,
  .recharge-finance-grid select,
  .recharge-entry-card textarea {
    font-size: 16px;
  }

  .recharge-batch-defaults-grid input,
  .recharge-batch-defaults-grid select,
  .recharge-finance-grid input,
  .recharge-finance-grid select {
    height: 48px;
  }

  .recharge-batch-defaults-grid .search-select input,
  .recharge-finance-grid .search-select input {
    padding-right: 48px;
  }

  .recharge-batch-defaults-grid .search-select-toggle,
  .recharge-finance-grid .search-select-toggle {
    top: 8px;
    right: 8px;
    width: 36px;
    height: 36px;
    font-size: 22px;
  }

  .recharge-batch-defaults-grid .search-options,
  .recharge-finance-grid .search-options {
    max-height: 220px;
  }

  .search-options {
    position: fixed;
    left: 12px;
    right: 12px;
    top: auto;
    bottom: max(12px, env(safe-area-inset-bottom));
    z-index: 10000;
    max-height: min(52vh, 360px);
    border-radius: 12px;
    box-shadow: 0 18px 44px rgba(24, 18, 32, 0.22);
  }

  .recharge-batch-defaults-grid .search-options button,
  .recharge-finance-grid .search-options button {
    min-height: 48px;
    padding: 10px 12px;
  }

  .batch-head-actions,
  .recharge-batch-default-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
  }

  .batch-head-actions button,
  .recharge-batch-default-actions button {
    width: 100%;
  }

  .calc-strip,
  .recharge-draft-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .calc-strip div {
    min-height: 96px;
  }

  .calc-strip strong {
    font-size: 28px;
    line-height: 1.15;
    word-break: break-word;
  }

  .recharge-finance-head,
  .recharge-entry-card-head {
    flex-direction: column;
    align-items: stretch;
  }

  .recharge-entry-card-meta {
    gap: 8px;
  }

  .recharge-entry-main-grid,
  .recharge-entry-detail-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .entry-span-2,
  .entry-note-wide,
  .wide-field {
    grid-column: auto;
  }

  .detail-money {
    min-height: 48px;
    font-size: 16px;
    line-height: 22px;
  }

  .recharge-sheet-footer {
    align-items: stretch;
  }

  .sheet-footer-total {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px 12px;
    width: 100%;
  }

  .recharge-submit-row {
    width: 100%;
    margin-left: 0;
  }

  .recharge-submit-row button {
    flex: 1 1 100%;
  }

  .account-opening-dialog {
    width: 100%;
  }

  #accountOpeningDialog {
    width: calc(100vw - 16px);
    max-height: calc(100vh - 16px);
  }

  #batchOpeningAssetDialog {
    width: calc(100vw - 16px);
    max-height: calc(100vh - 16px);
  }

  .account-opening-top-actions input {
    width: 100%;
  }

  .entry-summary-card {
    grid-template-columns: 1fr;
  }

  .batch-opening-info-grid,
  .batch-opening-edit-grid {
    grid-template-columns: 1fr;
  }

  .batch-opening-edit-grid label:first-child {
    grid-column: auto;
  }

  .userbar {
    gap: 10px;
  }

  .view {
    padding: 16px;
  }

  #notificationBotsForm {
    padding: 0;
  }

  .notification-bot-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .recharge-confirm-clear-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .recharge-confirm-clear-row {
    grid-template-columns: 1fr;
  }

  .recharge-entry-switch,
  .recognize-actions,
  .recharge-batch-defaults-grid,
  .batch-head-actions,
  .recharge-batch-default-actions,
  .sheet-footer-total {
    grid-template-columns: 1fr;
  }

  .calc-strip,
  .recharge-draft-strip {
    grid-template-columns: 1fr;
  }

  .recharge-submit-row {
    display: grid;
    grid-template-columns: 1fr;
  }

  .notification-bot-actions,
  .notification-bot-footer {
    align-items: stretch;
    flex-direction: column;
  }

  .notification-bot-actions button,
  .notification-bot-footer button {
    width: 100%;
  }

  .supplier-fee-history-summary,
  .supplier-fee-history-row {
    grid-template-columns: 1fr;
  }

  .supplier-fee-history-actor {
    text-align: left;
  }
}

/* Client portal configuration */
.client-config-page-head {
  align-items: flex-start;
}

.client-config-section {
  padding: 22px 0 26px;
  border-top: 1px solid #dfe4eb;
}

.client-config-section:first-of-type {
  border-top: 0;
  padding-top: 4px;
}

.client-config-section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.client-config-section-head h2 {
  margin: 0;
  color: #171a21;
  font-size: 18px;
}

.client-config-section-head p {
  margin: 5px 0 0;
  color: #667085;
  font-size: 13px;
}

.client-category-settings-list {
  display: grid;
  gap: 10px;
}

.client-category-setting-row {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) auto;
  align-items: end;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid #dde2ea;
  border-radius: 6px;
  background: #fff;
}

.client-category-setting-row > span {
  display: grid;
  place-items: center;
  width: 28px;
  height: 36px;
  color: #606a78;
  font-size: 12px;
  font-weight: 800;
}

.client-category-setting-row label {
  display: grid;
  gap: 6px;
  min-width: 0;
  color: #343a46;
  font-size: 12px;
  font-weight: 700;
}

.client-category-setting-row input {
  width: 100%;
  min-width: 0;
}

.client-config-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.client-setting-card {
  position: relative;
  display: grid;
  gap: 14px;
  padding: 18px;
  border: 1px solid #dde2ea;
  border-radius: 8px;
  background: #fff;
  min-width: 0;
}

.client-setting-card-head,
.client-config-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.client-setting-card-head > div {
  display: grid;
  gap: 4px;
}

.client-setting-card-head strong {
  color: #151922;
  font-size: 15px;
}

.client-setting-card-head span,
.client-config-footer span {
  color: #667085;
  font-size: 12px;
}

.client-setting-enable {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-weight: 700;
  white-space: nowrap;
}

.client-setting-enable input {
  width: 16px;
  height: 16px;
}

.client-setting-media {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  min-height: 112px;
  padding: 12px;
  border: 1px solid #d9e6ef;
  border-radius: 6px;
  background: #f5fafc;
}

.client-setting-media img {
  width: 112px;
  height: 112px;
  object-fit: contain;
  border: 1px solid #d8dee8;
  background: #fff;
}

.client-setting-media-empty {
  display: grid;
  place-items: center;
  width: 112px;
  height: 112px;
  border: 1px dashed #b7c2d0;
  color: #7a8492;
  background: #fff;
  font-size: 12px;
  text-align: center;
}

.client-asset-upload {
  justify-self: start;
  cursor: pointer;
}

.client-setting-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.client-setting-fields label {
  display: grid;
  gap: 6px;
  min-width: 0;
  color: #343a46;
  font-size: 12px;
  font-weight: 700;
}

.client-setting-fields input,
.client-setting-fields textarea {
  width: 100%;
  min-width: 0;
}

.client-setting-fields textarea {
  min-height: 74px;
  resize: vertical;
}

.client-setting-wide {
  grid-column: 1 / -1;
}

.client-setting-delete {
  justify-self: end;
}

.service-card-media {
  background: #fff9ed;
  border-color: #f0dfbb;
}

.client-config-footer {
  margin-top: 16px;
  padding: 14px 0;
  border-top: 1px solid #e3e7ed;
}

.client-config-empty {
  grid-column: 1 / -1;
  padding: 36px 20px;
  border: 1px dashed #cbd3df;
  color: #697386;
  background: #fff;
  text-align: center;
}

@media (max-width: 980px) {
  .client-config-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 620px) {
  .client-config-section-head {
    align-items: stretch;
    flex-direction: column;
  }

  .client-config-section-head button {
    align-self: flex-start;
  }

  .client-category-setting-row {
    grid-template-columns: 24px minmax(0, 1fr);
  }

  .client-category-setting-row button {
    grid-column: 2;
    justify-self: end;
  }

  .client-setting-card {
    padding: 14px;
  }

  .client-setting-fields {
    grid-template-columns: 1fr;
  }

  .client-setting-wide {
    grid-column: auto;
  }

  .client-setting-media {
    grid-template-columns: 92px minmax(0, 1fr);
  }

  .client-setting-media img,
  .client-setting-media-empty {
    width: 92px;
    height: 92px;
  }

  .client-config-footer {
    align-items: stretch;
    flex-direction: column;
  }
}

#accountsView .table-wrap {
  padding-right: 8px;
  padding-left: 8px;
}

@media (max-width: 900px) {
  #accountsView .filter-card {
    grid-template-columns: 1fr;
  }

  #accountsView .table-bar {
    align-items: stretch;
    flex-direction: column;
  }

  #accountsView .table-bar-actions {
    align-items: flex-start;
    flex-direction: column;
  }
}
