:root {
  --ink: #16231f;
  --muted: #69756f;
  --paper: #f5f4ef;
  --surface: #ffffff;
  --line: #e7e6df;
  --green: #17372f;
  --green-2: #24594b;
  --mint: #c8f0dc;
  --lime: #d9ef9a;
  --amber: #b7791f;
  --red: #a8413d;
  --red-soft: #faeceb;
  --shadow: 0 14px 40px rgba(27, 45, 38, 0.07);
  --radius: 18px;
  --font: "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  background: var(--paper);
}

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 92% 8%, rgba(202, 236, 171, 0.18), transparent 24%),
    var(--paper);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

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

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

button,
a,
input,
select,
summary {
  -webkit-tap-highlight-color: transparent;
}

button {
  cursor: pointer;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2,
h3 {
  line-height: 1.2;
}

h2 {
  font-size: 20px;
  letter-spacing: -0.02em;
}

h3 {
  font-size: 16px;
}

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

.sidebar {
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  height: 100vh;
  padding: 25px 18px 20px;
  color: #f2f8f3;
  background:
    linear-gradient(160deg, rgba(255, 255, 255, 0.035), transparent 38%),
    var(--green);
  overflow-y: auto;
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 2px 8px 28px;
}

.brand-mark {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 37px;
  height: 37px;
  border-radius: 12px;
  color: var(--green);
  background: var(--lime);
  font-family: Georgia, "STSong", serif;
  font-size: 20px;
  font-weight: 700;
}

.brand-wordmark {
  flex: 0 0 auto;
  color: var(--lime);
  font-family: Georgia, "STSong", serif;
  font-size: 21px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

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

.brand strong {
  font-size: 16px;
  letter-spacing: 0.05em;
}

.brand small {
  margin-top: 1px;
  color: rgba(255, 255, 255, 0.55);
  font-size: 11px;
  letter-spacing: 0.08em;
}

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

.nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  padding: 0 13px;
  border-radius: 12px;
  color: rgba(255, 255, 255, 0.67);
  transition: background 160ms ease, color 160ms ease, transform 160ms ease;
}

.nav-link:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.07);
  transform: translateX(2px);
}

.nav-link.is-active {
  color: var(--green);
  background: var(--lime);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.13);
  font-weight: 700;
}

.nav-icon {
  display: inline-grid;
  place-items: center;
  width: 19px;
  font-size: 17px;
  font-weight: 700;
}

.sidebar-foot {
  margin-top: auto;
  padding: 24px 7px 2px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.profile-mini {
  display: flex;
  align-items: center;
  gap: 10px;
}

.profile-copy {
  min-width: 0;
}

.profile-copy strong,
.profile-copy small {
  display: block;
}

.profile-copy strong {
  overflow: hidden;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-copy small {
  margin-top: 2px;
  color: rgba(255, 255, 255, 0.48);
  font-size: 11px;
}

.avatar {
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  color: var(--green);
  background: var(--mint);
  font-weight: 800;
}

.avatar-small {
  width: 34px;
  height: 34px;
}

.avatar-large {
  width: 58px;
  height: 58px;
  font-size: 22px;
}

.logout-form {
  margin-top: 12px;
}

.password-link {
  display: inline-block;
  margin-top: 10px;
  color: rgba(255, 255, 255, 0.7);
}

.password-link:hover {
  color: #ffffff;
}

.text-button {
  padding: 3px 0;
  border: 0;
  color: rgba(255, 255, 255, 0.58);
  background: none;
  font-size: 12px;
}

.text-button:hover {
  color: #ffffff;
}

.main {
  min-width: 0;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 104px;
  padding: 22px clamp(24px, 4vw, 56px) 18px;
}

.topbar h1 {
  margin-bottom: 0;
  font-size: 25px;
  letter-spacing: -0.025em;
}

.eyebrow {
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.eyebrow-light {
  color: rgba(255, 255, 255, 0.6);
}

.top-profile {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 13px;
}

.top-password-link {
  display: inline-flex;
  align-items: center;
  min-height: 31px;
  padding: 4px 11px;
  color: var(--green-2);
  border: 1px solid #d9deda;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.65);
  font-size: 11px;
  font-weight: 700;
}

.top-logout-form {
  margin: 0;
}

.top-logout-form .top-password-link {
  color: var(--muted);
}

.top-password-link:hover {
  border-color: #b9c8be;
  background: #ffffff;
}

.role-chip,
.status {
  display: inline-flex;
  align-items: center;
  min-height: 25px;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
}

.role-chip {
  color: var(--green);
  background: var(--mint);
}

.status-active {
  color: #24624d;
  background: #e6f5ed;
}

.status-disabled {
  color: #7b6c62;
  background: #eeebe7;
}

.status-pending {
  color: #8d651d;
  background: #fbf0cb;
}

.page {
  max-width: 1500px;
  padding: 0 clamp(24px, 4vw, 56px) 50px;
}

.alert {
  margin-bottom: 20px;
  padding: 12px 15px;
  border: 1px solid transparent;
  border-radius: 12px;
  font-size: 13px;
}

.alert-success {
  color: #245c48;
  border-color: #cbe8d7;
  background: #edf8f2;
}

.alert-error {
  color: #8b3734;
  border-color: #f1d1cf;
  background: #fff4f3;
}

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

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 42px;
  padding: 9px 17px;
  border: 1px solid transparent;
  border-radius: 11px;
  font-weight: 700;
  line-height: 1;
  text-align: center;
  transition: transform 150ms ease, box-shadow 150ms ease, background 150ms ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button-primary {
  color: #ffffff;
  background: var(--green);
  box-shadow: 0 8px 18px rgba(23, 55, 47, 0.15);
}

.button-primary:hover {
  background: var(--green-2);
  box-shadow: 0 10px 24px rgba(23, 55, 47, 0.2);
}

.button-ghost {
  color: var(--ink);
  border-color: var(--line);
  background: var(--surface);
}

.button-ghost:hover {
  border-color: #cdd2cc;
  background: #fafaf7;
}

.button-danger-soft {
  color: var(--red);
  border-color: #efd8d6;
  background: var(--red-soft);
}

.button-light {
  color: var(--green);
  background: var(--lime);
}

.button-outline-light {
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.06);
}

.button-small {
  min-height: 32px;
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 12px;
}

.button-full {
  width: 100%;
}

.panel {
  min-width: 0;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

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

.panel-head h2 {
  margin-bottom: 0;
}

.panel-head .eyebrow {
  margin-bottom: 5px;
}

.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(290px, 0.8fr);
  gap: 20px;
  margin-top: 20px;
}

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

.customer-metrics {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.metric-card {
  position: relative;
  min-height: 142px;
  padding: 21px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.metric-card::after {
  position: absolute;
  right: -24px;
  bottom: -39px;
  width: 110px;
  height: 110px;
  border: 1px solid rgba(23, 55, 47, 0.07);
  border-radius: 50%;
  content: "";
}

.metric-card p,
.metric-card span {
  color: var(--muted);
  font-size: 12px;
}

.metric-card p {
  margin-bottom: 17px;
}

.metric-card strong {
  display: block;
  margin-bottom: 6px;
  font-size: clamp(21px, 2.2vw, 28px);
  letter-spacing: -0.03em;
}

.metric-card.metric-accent {
  color: #ffffff;
  border-color: var(--green);
  background: var(--green);
}

.metric-card.metric-accent p,
.metric-card.metric-accent span {
  color: rgba(255, 255, 255, 0.59);
}

.welcome-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 164px;
  padding: 30px 34px;
  overflow: hidden;
  color: #ffffff;
  border-radius: 22px;
  background:
    radial-gradient(circle at 83% 20%, rgba(217, 239, 154, 0.16), transparent 32%),
    linear-gradient(118deg, #17372f, #245044);
  box-shadow: 0 20px 45px rgba(23, 55, 47, 0.15);
}

.welcome-strip h2 {
  margin-bottom: 8px;
  font-family: Georgia, "STSong", serif;
  font-size: clamp(24px, 3vw, 34px);
  font-weight: 500;
}

.welcome-strip p:last-child {
  margin-bottom: 0;
  color: rgba(255, 255, 255, 0.58);
}

.welcome-actions {
  display: flex;
  gap: 10px;
  flex: 0 0 auto;
}

.balance-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 230px;
  padding: 38px 44px;
  overflow: hidden;
  color: #ffffff;
  border-radius: 24px;
  background:
    linear-gradient(120deg, rgba(217, 239, 154, 0.12), transparent 42%),
    var(--green);
  box-shadow: 0 22px 50px rgba(23, 55, 47, 0.16);
}

.balance-label {
  margin-bottom: 12px;
  color: rgba(255, 255, 255, 0.58);
  font-size: 13px;
}

.balance-value {
  margin-bottom: 15px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(42px, 6vw, 70px);
  letter-spacing: -0.04em;
  line-height: 1;
}

.balance-value span {
  margin-right: 8px;
  color: var(--lime);
  font-size: 26px;
  vertical-align: top;
}

.balance-value.is-negative {
  color: #ffc1b8;
}

.balance-value.is-negative span {
  color: #ffc1b8;
}

.balance-account {
  margin-bottom: 0;
  color: rgba(255, 255, 255, 0.52);
  font-size: 12px;
  letter-spacing: 0.05em;
}

.balance-ring {
  display: grid;
  place-items: center;
  width: 138px;
  height: 138px;
  border: 1px solid rgba(217, 239, 154, 0.4);
  border-radius: 50%;
  box-shadow:
    0 0 0 17px rgba(217, 239, 154, 0.04),
    0 0 0 38px rgba(217, 239, 154, 0.025);
}

.balance-ring span {
  color: var(--lime);
  font-family: Georgia, "STSong", serif;
  font-size: 18px;
  line-height: 1.35;
  text-align: center;
}

.customer-balance-unified {
  gap: 30px;
}

.balance-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(115px, 1fr));
  align-self: stretch;
  min-width: min(560px, 52%);
  border-left: 1px solid rgba(255, 255, 255, 0.12);
}

.balance-summary-grid > div {
  display: grid;
  align-content: center;
  padding: 12px 20px;
  border-right: 1px solid rgba(255, 255, 255, 0.1);
}

.balance-summary-grid > div:last-child {
  border-right: 0;
}

.balance-summary-grid span,
.balance-summary-grid small {
  color: rgba(255, 255, 255, 0.52);
  font-size: 10px;
}

.balance-summary-grid strong {
  margin: 6px 0 2px;
  color: #ffffff;
  font-size: 17px;
  white-space: nowrap;
}

.balance-summary-grid small {
  display: block;
  font-size: 9px;
}

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

table {
  width: 100%;
  border-collapse: collapse;
  white-space: nowrap;
}

th {
  padding: 10px 12px;
  color: #8a928e;
  border-bottom: 1px solid var(--line);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-align: left;
  text-transform: uppercase;
}

td {
  padding: 15px 12px;
  border-bottom: 1px solid #f0efe9;
  font-size: 13px;
  vertical-align: middle;
}

tbody tr:last-child td {
  border-bottom: 0;
}

tbody tr:hover {
  background: #fbfbf8;
}

th:first-child,
td:first-child {
  padding-left: 0;
}

th:last-child,
td:last-child {
  padding-right: 0;
}

.tx-type {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
}

.tx-type.topup {
  color: #276047;
  background: #edf7f1;
}

.tx-type.adjustment {
  color: #826522;
  background: #fbf5e7;
}

.cell-note {
  display: block;
  max-width: 240px;
  margin-top: 3px;
  overflow: hidden;
  color: #989f9b;
  font-size: 10px;
  text-overflow: ellipsis;
}

.amount-positive {
  color: #246a4d;
  font-weight: 700;
}

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

.amount-mismatch {
  color: #c54842 !important;
}

.order-qr-panel .order-pay-amount.amount-mismatch {
  color: #ffaaa1 !important;
}

.amount-mismatch-warning {
  margin: 8px 0 12px;
  padding: 9px 11px;
  color: #8e312d;
  border: 1px solid #efc7c3;
  border-radius: 9px;
  background: #fff2f0;
  font-size: 10px;
}

.actual-amount-field {
  margin-bottom: 12px;
}

.table-link,
.text-link {
  color: var(--green-2);
  font-weight: 700;
}

.text-link {
  border-bottom: 1px solid rgba(36, 89, 75, 0.25);
  font-size: 12px;
}

.text-link:hover {
  border-bottom-color: var(--green-2);
}

.empty-cell {
  padding: 38px 10px;
  color: var(--muted);
  text-align: center;
}

.bill-list {
  display: grid;
  gap: 8px;
}

.bill-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px;
  border: 1px solid #eeede7;
  border-radius: 12px;
  transition: border 150ms ease, background 150ms ease;
}

.bill-item:hover {
  border-color: #d4dbd5;
  background: #fafbf8;
}

.file-badge {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 41px;
  height: 44px;
  color: var(--green);
  border-radius: 7px;
  background: #edf3e7;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.bill-copy {
  min-width: 0;
  flex: 1;
}

.bill-copy strong,
.bill-copy small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bill-copy strong {
  font-size: 12px;
}

.bill-copy small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 10px;
}

.download-arrow {
  color: var(--muted);
  font-size: 18px;
}

.order-status {
  display: inline-flex;
  align-items: center;
  min-height: 25px;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
}

.order-status-pending {
  color: #826522;
  background: #fbf3df;
}

.order-status-reported {
  color: #9a4c22;
  background: #fcebdc;
}

.order-status-confirmed {
  color: #24624d;
  background: #e6f5ed;
}

.order-status-cancelled {
  color: #7b6c62;
  background: #eeebe7;
}

.customer-order-panel {
  margin-top: 20px;
  margin-bottom: 20px;
}

.customer-deduction-panel {
  margin-bottom: 20px;
}

.central-review-panel {
  margin-bottom: 20px;
}

#recharge,
#my-bills {
  scroll-margin-top: 20px;
}

.customer-remittance-form {
  display: grid;
  gap: 14px;
  padding: 18px;
  border: 1px solid #dfe8d9;
  border-radius: 14px;
  background: #f8fbf5;
}

.customer-remittance-form > .button {
  justify-self: start;
}

.customer-receipt-upload {
  margin-bottom: 0;
  background: #ffffff;
}

.customer-order-history {
  margin-top: 22px;
  padding-top: 19px;
  border-top: 1px solid var(--line);
}

.customer-order-history > .eyebrow,
.customer-order-history > .section-caption {
  margin-bottom: 9px;
}

.customer-order-history > .section-caption {
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.customer-order-list {
  display: grid;
  gap: 7px;
}

.customer-order-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 14px;
  padding: 12px 13px;
  border: 1px solid #eeede7;
  border-radius: 11px;
  transition: border 150ms ease, background 150ms ease;
}

.customer-order-row:hover {
  border-color: #d2dbd4;
  background: #fafbf8;
}

.customer-order-row strong,
.customer-order-row small {
  display: block;
}

.customer-order-row small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 10px;
}

.customer-order-action {
  color: var(--green-2);
  font-size: 11px;
  font-weight: 700;
}

.action-help {
  margin: -8px 0 15px;
  font-size: 11px;
}

.notice-strip {
  margin-bottom: 16px;
  padding: 11px 14px;
  color: #6f5722;
  border: 1px solid #eee0bb;
  border-radius: 10px;
  background: #fffaf0;
  font-size: 12px;
}

.order-detail-grid {
  display: grid;
  grid-template-columns: minmax(320px, 0.8fr) minmax(0, 1.2fr);
  gap: 20px;
  align-items: start;
}

.order-detail-side {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 0.75fr);
  gap: 20px;
  align-items: start;
}

.order-qr-panel {
  text-align: center;
}

.order-qr-panel h2 {
  margin-bottom: 18px;
}

.order-qr-wrap {
  width: min(278px, 100%);
  margin: 0 auto 15px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 17px;
  background: #ffffff;
  box-shadow: 0 8px 26px rgba(23, 55, 47, 0.08);
}

.order-qr-wrap.is-disabled {
  opacity: 0.35;
}

.order-qr {
  display: block;
  width: 100%;
  height: auto;
}

.order-pay-amount {
  display: block;
  margin-bottom: 7px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 30px;
}

.order-qr-panel .muted {
  font-size: 11px;
}

.preview-warning {
  margin: 12px 0;
  padding: 9px 11px;
  color: #815e19;
  border: 1px solid #ead9a9;
  border-radius: 9px;
  background: #fff9e9;
  font-size: 10px;
}

.verify-panel {
  border-color: #d8e5dc;
  background: #f8fbf7;
}

.verify-panel p {
  color: var(--muted);
  font-size: 12px;
}

.secondary-form {
  margin-top: 8px;
}

.success-panel {
  text-align: center;
}

.success-check {
  display: grid;
  place-items: center;
  width: 45px;
  height: 45px;
  margin: 0 auto 12px;
  color: #ffffff;
  border-radius: 50%;
  background: #2d7b5e;
  font-size: 20px;
  font-weight: 800;
}

.success-panel p {
  color: var(--muted);
}

.registration-review-panel {
  border-color: #e7d8ac;
  background: #fffaf0;
}

.settlement-panel {
  border-color: #d7e3d9;
  background:
    linear-gradient(145deg, rgba(237, 247, 241, 0.7), rgba(255, 255, 255, 0.95));
}

.settlement-panel h2 {
  margin-bottom: 8px;
}

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

.batch-customer-picker {
  display: flex;
  align-items: end;
  gap: 10px;
  margin-bottom: 17px;
}

.batch-customer-picker .field {
  flex: 1;
}

.batch-customer-picker select {
  width: 100%;
  padding: 9px 11px;
}

.batch-customer-list {
  display: grid;
  gap: 8px;
  max-height: 520px;
  min-height: 95px;
  margin-bottom: 18px;
  overflow-y: auto;
}

.batch-list-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.batch-list-toolbar .search-field {
  flex: 1;
  min-width: 200px;
}

.batch-select-all {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #59665f;
  font-size: 10px;
  cursor: pointer;
}

.batch-select-all input {
  width: 16px;
  min-height: 16px;
  margin: 0;
  accent-color: var(--green);
}

.batch-selected-count {
  color: var(--green-2);
  font-size: 10px;
  font-weight: 700;
  white-space: nowrap;
}

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

.batch-selected-head > div {
  display: flex;
  align-items: center;
  gap: 10px;
}

.batch-selected-head strong {
  font-size: 13px;
}

.batch-selected-list {
  display: grid;
  gap: 8px;
  min-height: 95px;
  margin-bottom: 18px;
}

.batch-customer-option {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #fbfcf9;
  transition: border 150ms ease, background 150ms ease;
  cursor: pointer;
}

.batch-customer-option:hover,
.batch-customer-option:has(input:checked) {
  border-color: #8eb09e;
  background: #f0f8f2;
}

.batch-customer-option > input {
  flex: 0 0 auto;
  width: 18px;
  min-height: 18px;
  margin: 0;
  accent-color: var(--green);
}

.batch-customer-option .batch-customer-details {
  min-width: 0;
}

.batch-selected-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 150px auto;
  align-items: center;
  gap: 14px;
  padding: 11px 13px;
  border: 1px solid #d7e2d9;
  border-radius: 11px;
  background: #f5faf5;
}

.batch-selected-row .batch-amount-field {
  padding-left: 12px;
  border-left: 1px solid #dce5de;
}

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

.customer-picker-modal[hidden] {
  display: none;
}

.modal-open {
  overflow: hidden;
}

.customer-picker-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(16, 31, 26, 0.55);
  backdrop-filter: blur(3px);
}

.customer-picker-card {
  position: relative;
  display: flex;
  flex-direction: column;
  width: min(620px, 100%);
  max-height: min(760px, calc(100vh - 40px));
  padding: 22px;
  border-radius: 20px;
  background: #ffffff;
  box-shadow: 0 28px 80px rgba(16, 31, 26, 0.3);
}

.customer-picker-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 16px;
}

.customer-picker-head h2 {
  margin: 0;
}

.modal-close {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--muted);
  background: #ffffff;
  font-size: 20px;
}

.customer-picker-toolbar {
  flex: 0 0 auto;
}

.customer-picker-list {
  display: grid;
  gap: 8px;
  max-height: 430px;
  min-height: 100px;
  margin-bottom: 0;
  overflow-y: auto;
}

.customer-picker-foot {
  display: flex;
  justify-content: flex-end;
  gap: 9px;
  padding-top: 16px;
  margin-top: 14px;
  border-top: 1px solid var(--line);
}

.batch-money-input {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 0 9px;
  border: 1px solid #deded7;
  border-radius: 8px;
  background: #ffffff;
}

.batch-money-input > span {
  color: var(--muted);
  font-size: 11px;
}

.batch-money-input input {
  width: 100%;
  min-width: 0;
  min-height: 37px;
  padding: 6px 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.batch-money-input input:focus {
  box-shadow: none;
}

.batch-money-input:has(input:disabled) {
  opacity: 0.45;
}

.batch-customer-details strong,
.batch-customer-details small {
  display: block;
}

.batch-customer-details small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 9px;
}

.batch-amount-field {
  display: grid;
  gap: 4px;
  color: var(--muted);
  font-size: 9px;
}

.batch-amount-field input {
  width: 100%;
  min-height: 37px;
  padding: 7px 9px;
}

.batch-remove {
  color: var(--red);
}

.batch-total-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin: 18px 0 15px;
  padding: 14px 16px;
  border-radius: 12px;
  background: var(--green);
}

.batch-total-bar span {
  color: rgba(255, 255, 255, 0.62);
  font-size: 11px;
}

.batch-total-bar strong {
  color: var(--lime);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 25px;
}

.registration-review-panel p {
  color: #6f654c;
  font-size: 12px;
}

.receipt-review-panel {
  border-color: #dce7dc;
  background: #f8fbf7;
}

.receipt-file-row {
  display: flex;
  align-items: center;
  gap: 11px;
  margin: 15px 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #ffffff;
}

.receipt-file-row > span:last-child {
  min-width: 0;
}

.receipt-file-row strong,
.receipt-file-row small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
}

.receipt-file-row strong {
  max-width: 210px;
  font-size: 11px;
  white-space: nowrap;
}

.receipt-file-row small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 9px;
}

.payment-qr-preview {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 15px 0 20px;
  padding: 14px;
  border: 1px solid #e4e9e3;
  border-radius: 12px;
  background: #fafbf8;
}

.payment-qr-preview img {
  width: 110px;
  height: 110px;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #ffffff;
  object-fit: contain;
}

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

.empty-payment-qr {
  display: grid;
  place-items: center;
  min-height: 120px;
  margin: 15px 0 20px;
  color: var(--muted);
  border: 1px dashed #ccd4cd;
  border-radius: 12px;
  background: #fafbf8;
  font-size: 12px;
}

.remove-qr-form {
  margin-top: 9px;
}

.remove-qr-form .text-button,
.danger-text {
  color: var(--red);
}

.quick-grid {
  display: grid;
  gap: 9px;
}

.quick-action {
  display: grid;
  grid-template-columns: 38px 1fr;
  padding: 12px;
  border: 1px solid #eeede7;
  border-radius: 12px;
  transition: transform 150ms ease, border 150ms ease;
}

.quick-action:hover {
  border-color: #d0d7d1;
  transform: translateX(2px);
}

.quick-icon {
  grid-row: span 2;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  color: var(--green);
  border-radius: 9px;
  background: var(--mint);
  font-weight: 800;
}

.quick-action strong {
  font-size: 12px;
}

.quick-action small {
  color: var(--muted);
  font-size: 10px;
}

.empty-state {
  display: grid;
  place-items: center;
  min-height: 180px;
  color: var(--muted);
  text-align: center;
}

.empty-state strong,
.empty-state span {
  display: block;
}

.empty-state strong {
  color: var(--ink);
}

.empty-state.compact {
  min-height: 100px;
  font-size: 11px;
}

.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  margin-bottom: 18px;
}

.toolbar-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.filter-form {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
}

.filter-form input,
.filter-form select,
input,
select,
textarea {
  min-height: 42px;
  border: 1px solid #deded7;
  border-radius: 10px;
  outline: none;
  color: var(--ink);
  background: #ffffff;
}

.filter-form input,
.filter-form select {
  padding: 8px 12px;
}

input:focus,
select:focus,
textarea:focus {
  border-color: #91ad9e;
  box-shadow: 0 0 0 3px rgba(36, 89, 75, 0.1);
}

.search-field {
  min-width: 280px;
}

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

.person-cell,
.title-with-status {
  display: flex;
  align-items: center;
  gap: 10px;
}

.person-cell strong,
.person-cell small {
  display: block;
}

.form-panel {
  max-width: 760px;
}

.narrow-layout {
  display: grid;
  grid-template-columns: minmax(0, 760px) minmax(230px, 1fr);
  gap: 20px;
  align-items: start;
}

.wide-narrow {
  grid-template-columns: minmax(0, 900px) minmax(220px, 320px);
}

.info-card {
  padding: 24px;
  border: 1px solid #dce7dc;
  border-radius: var(--radius);
  background: #edf4e9;
}

.info-card h3 {
  margin-bottom: 15px;
}

.info-card p {
  margin-bottom: 12px;
  color: #57665d;
  font-size: 12px;
}

.info-card p:last-child {
  margin-bottom: 0;
}

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

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

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

.field > span {
  color: #48534e;
  font-size: 12px;
  font-weight: 700;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 10px 12px;
}

.field textarea {
  resize: vertical;
}

.field-hint {
  color: var(--muted);
  font-size: 10px;
}

.form-help {
  margin: 17px 0 0;
  color: var(--muted);
  font-size: 11px;
  text-align: center;
}

.auth-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
  margin-top: 17px;
  color: #a0a7a2;
  font-size: 9px;
}

.register-link,
.inline-auth-link {
  color: var(--green-2);
  font-weight: 700;
}

.register-link {
  flex: 0 0 auto;
}

.registration-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 5px;
  margin-bottom: 21px;
}

.registration-steps span {
  padding: 7px 4px;
  color: #8a928e;
  border-bottom: 2px solid var(--line);
  font-size: 9px;
  text-align: center;
}

.registration-steps .is-current {
  color: var(--green);
  border-bottom-color: var(--green);
  font-weight: 700;
}

.checkbox-field {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  color: var(--muted);
  font-size: 10px;
  cursor: pointer;
}

.checkbox-field input {
  flex: 0 0 auto;
  width: 16px;
  min-height: 16px;
  margin: 1px 0 0;
  accent-color: var(--green);
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 9px;
  padding-top: 5px;
}

.detail-head {
  margin-bottom: 20px;
}

.back-link {
  display: inline-block;
  margin-bottom: 18px;
  color: var(--muted);
  font-size: 12px;
}

.detail-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.detail-title-row h2 {
  margin: 0;
}

.detail-title-row p {
  margin: 3px 0 0;
  font-size: 12px;
}

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

.detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(280px, 0.75fr);
  gap: 20px;
  align-items: start;
}

.detail-main,
.detail-side {
  display: grid;
  gap: 20px;
  min-width: 0;
}

.balance-card {
  min-height: 148px;
  padding: 25px 29px;
  color: #ffffff;
  border-radius: var(--radius);
  background:
    radial-gradient(circle at 86% 25%, rgba(217, 239, 154, 0.17), transparent 30%),
    var(--green);
  box-shadow: var(--shadow);
}

.balance-card span,
.balance-card small {
  display: block;
  color: rgba(255, 255, 255, 0.56);
  font-size: 11px;
}

.balance-card strong {
  display: block;
  margin: 9px 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 38px;
  font-weight: 500;
}

.action-panel {
  border-color: #dce4dc;
}

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

.preset-button {
  display: grid;
  gap: 2px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--ink);
  background: #fbfbf8;
  text-align: left;
}

.preset-button:hover,
.preset-button.is-selected {
  border-color: #8eaf9e;
  background: #edf7f1;
}

.preset-button span {
  color: var(--muted);
  font-size: 10px;
}

.preset-button strong {
  font-size: 12px;
}

.money-input {
  display: flex;
  align-items: center;
  min-height: 46px;
  overflow: hidden;
  border: 1px solid #deded7;
  border-radius: 10px;
  background: #ffffff;
}

.money-input:focus-within {
  border-color: #91ad9e;
  box-shadow: 0 0 0 3px rgba(36, 89, 75, 0.1);
}

.money-input > span {
  padding-left: 13px;
  color: var(--muted);
}

.money-input input {
  min-height: 44px;
  padding-left: 7px;
  border: 0;
  box-shadow: none;
}

.money-input input:focus {
  box-shadow: none;
}

.action-details {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.action-details summary {
  color: #48534e;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.action-details[open] summary {
  margin-bottom: 14px;
}

.compact-panel {
  padding: 20px;
}

.compact-panel h3 {
  margin-bottom: 13px;
}

.detail-list {
  margin: 0;
}

.detail-list div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid #f0efe9;
  font-size: 11px;
}

.detail-list div:last-child {
  border-bottom: 0;
}

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

.detail-list dd {
  margin: 0;
  text-align: right;
}

.upload-zone {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 195px;
  padding: 25px;
  border: 1px dashed #b9cbc0;
  border-radius: 15px;
  background: #f7faf5;
  text-align: center;
  cursor: pointer;
}

.upload-zone:hover {
  border-color: #6f9883;
  background: #f2f8ee;
}

.upload-zone input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.upload-icon {
  display: grid;
  place-items: center;
  width: 43px;
  height: 43px;
  color: var(--green);
  border-radius: 50%;
  background: var(--mint);
  font-size: 20px;
  font-weight: 800;
}

.upload-zone strong {
  margin-top: 9px;
}

.upload-zone span:last-of-type {
  color: var(--muted);
  font-size: 11px;
}

.file-selection {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 11px;
}

.settings-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  align-items: start;
}

.settings-grid .form-panel {
  max-width: none;
}

.inline-form {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 10px;
  align-items: end;
  margin: 20px 0;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}

.preset-admin-list {
  display: grid;
  gap: 7px;
}

.preset-admin-row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 14px;
  padding: 9px 0;
  border-bottom: 1px solid #f1f0eb;
}

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

.preset-admin-row strong,
.preset-admin-row small {
  display: block;
}

.preset-admin-row small {
  color: var(--muted);
  font-size: 10px;
}

.preset-admin-row .text-button {
  color: var(--green-2);
}

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

.permission-settings-card {
  grid-column: 1 / -1;
}

.permission-role-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 18px;
}

.permission-role-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 17px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: #fafbf8;
}

.permission-role-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.permission-role-head strong {
  font-size: 15px;
}

.permission-role-head small {
  color: var(--muted);
  font-size: 9px;
}

.permission-list {
  display: grid;
  gap: 6px;
  flex: 1;
}

.permission-row {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 8px;
  border-radius: 8px;
  cursor: pointer;
}

.permission-row:hover {
  background: #ffffff;
}

.permission-row input {
  flex: 0 0 auto;
  width: 16px;
  min-height: 16px;
  margin: 2px 0 0;
  accent-color: var(--green);
}

.permission-row strong,
.permission-row small {
  display: block;
}

.permission-row strong {
  font-size: 11px;
}

.permission-row small {
  margin-top: 1px;
  color: var(--muted);
  font-size: 9px;
}

.security-card {
  grid-column: 1 / -1;
  display: flex;
  align-items: flex-start;
  gap: 17px;
  border-color: #dce7dc;
  background: #edf4e9;
}

.security-card h2 {
  margin-bottom: 8px;
}

.security-card p:last-child {
  max-width: 820px;
  margin-bottom: 0;
  color: #57665d;
}

.security-icon {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  color: var(--green);
  border-radius: 50%;
  background: var(--mint);
  font-weight: 800;
}

.audit-detail {
  max-width: 370px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-top: 20px;
  color: var(--muted);
  font-size: 12px;
}

.auth-body {
  min-height: 100vh;
  background: #eef0e9;
}

.auth-shell {
  display: grid;
  grid-template-columns: minmax(380px, 0.92fr) minmax(480px, 1.08fr);
  min-height: 100vh;
}

.auth-brand-panel {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 100vh;
  padding: clamp(30px, 5vw, 64px);
  overflow: hidden;
  color: #ffffff;
  background:
    radial-gradient(circle at 16% 80%, rgba(217, 239, 154, 0.19), transparent 32%),
    var(--green);
}

.auth-brand {
  display: flex;
  align-items: center;
  gap: 13px;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.07em;
}

.brand-mark-large {
  width: 43px;
  height: 43px;
  font-size: 23px;
}

.auth-message {
  position: relative;
  z-index: 1;
  max-width: 500px;
}

.auth-message h1 {
  margin-bottom: 24px;
  font-family: Georgia, "STSong", serif;
  font-size: clamp(39px, 5vw, 62px);
  font-weight: 500;
  letter-spacing: -0.04em;
  line-height: 1.16;
}

.auth-message p:last-child {
  max-width: 370px;
  color: rgba(255, 255, 255, 0.58);
}

.auth-foot {
  position: relative;
  z-index: 1;
  margin-bottom: 0;
  color: rgba(255, 255, 255, 0.38);
  font-size: 11px;
  letter-spacing: 0.05em;
}

.auth-pattern {
  position: absolute;
  right: -110px;
  bottom: -120px;
  width: 440px;
  height: 440px;
  border: 1px solid rgba(217, 239, 154, 0.1);
  border-radius: 50%;
  box-shadow:
    0 0 0 46px rgba(217, 239, 154, 0.03),
    0 0 0 92px rgba(217, 239, 154, 0.02),
    0 0 0 138px rgba(217, 239, 154, 0.01);
}

.auth-form-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 45px 24px;
  background:
    radial-gradient(circle at 85% 12%, rgba(202, 236, 171, 0.28), transparent 26%),
    var(--paper);
}

.auth-form-wrap {
  width: 100%;
  max-width: 400px;
}

.auth-form-wrap h2 {
  margin-bottom: 7px;
  font-family: Georgia, "STSong", serif;
  font-size: 34px;
  font-weight: 500;
}

.auth-subtitle {
  margin-bottom: 30px;
  font-size: 12px;
}

.auth-form-panel .stack-form {
  gap: 17px;
}

.auth-form-panel input {
  min-height: 48px;
  background: rgba(255, 255, 255, 0.82);
}

.auth-form-panel .button {
  min-height: 48px;
  margin-top: 5px;
}

.security-note {
  margin: 50px 0 0;
  color: #979d98;
  font-size: 10px;
}

.public-pay-body {
  min-height: 100vh;
  background:
    radial-gradient(circle at 50% 0%, rgba(202, 236, 171, 0.25), transparent 32%),
    #eef1eb;
}

.public-pay-shell {
  width: min(520px, calc(100% - 28px));
  margin: 0 auto;
  padding: 28px 0 35px;
}

.public-pay-head {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 22px;
}

.public-pay-head strong,
.public-pay-head small {
  display: block;
}

.public-brand-wordmark {
  color: var(--green);
  font-family: Georgia, "STSong", serif;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.07em;
}

.public-pay-head strong {
  font-size: 15px;
}

.public-pay-head small {
  color: var(--muted);
  font-size: 10px;
}

.public-order-meta {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 6px 18px;
  margin-bottom: 12px;
  padding: 13px 17px;
  color: rgba(255, 255, 255, 0.6);
  border-radius: 13px;
  background: var(--green);
  font-size: 10px;
}

.public-order-meta strong {
  color: #ffffff;
  overflow-wrap: anywhere;
  text-align: right;
}

.public-pay-shell > .alert {
  margin-bottom: 12px;
}

.pay-instruction,
.pay-result {
  padding: 27px 25px 25px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: #ffffff;
  box-shadow: var(--shadow);
  text-align: center;
}

.pay-instruction h1,
.pay-result h1 {
  margin-bottom: 8px;
  font-family: Georgia, "STSong", serif;
  font-size: 29px;
  font-weight: 500;
}

.pay-page-amount {
  display: block;
  margin: 2px 0 14px;
  color: var(--green);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 32px;
  font-weight: 500;
}

.pay-instruction > p:not(.eyebrow):not(.payment-instructions) {
  color: var(--muted);
  font-size: 12px;
}

.collection-qr-wrap {
  width: min(285px, 86vw);
  margin: 20px auto;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: #ffffff;
}

.collection-qr-wrap img {
  display: block;
  width: 100%;
  max-height: 390px;
  object-fit: contain;
}

.missing-payment-qr {
  display: grid;
  place-items: center;
  min-height: 170px;
  margin: 20px 0;
  padding: 20px;
  color: var(--muted);
  border: 1px dashed #c9d2ca;
  border-radius: 14px;
  background: #fafbf8;
  font-size: 11px;
}

.missing-payment-qr strong,
.missing-payment-qr span {
  display: block;
}

.payment-instructions {
  margin: 14px 0 18px;
  color: #647069;
  font-size: 11px;
}

.pay-report-form {
  margin-top: 17px;
}

.receipt-upload-box {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 125px;
  margin-bottom: 13px;
  padding: 17px;
  color: var(--muted);
  border: 1px dashed #b9cbc0;
  border-radius: 13px;
  background: #f7faf5;
  text-align: center;
  cursor: pointer;
}

.receipt-upload-box:hover {
  border-color: #6f9883;
}

.receipt-upload-box input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.receipt-upload-icon {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  margin-bottom: 7px;
  color: var(--green);
  border-radius: 50%;
  background: var(--mint);
  font-size: 17px;
  font-weight: 800;
}

.receipt-upload-box strong,
.receipt-upload-box small {
  display: block;
}

.receipt-upload-box small {
  margin-top: 3px;
  font-size: 9px;
}

.receipt-submitted {
  color: #815e19 !important;
  font-size: 10px !important;
}

.pay-result {
  display: grid;
  justify-items: center;
  min-height: 330px;
  align-content: center;
}

.pay-result p {
  max-width: 310px;
  color: var(--muted);
  font-size: 12px;
}

.pay-result strong {
  margin-top: 8px;
  font-family: Georgia, serif;
  font-size: 36px;
  font-weight: 500;
}

.pay-result-icon {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  margin-bottom: 16px;
  color: var(--green);
  border-radius: 50%;
  background: var(--mint);
  font-size: 25px;
  font-weight: 800;
}

.pay-result-success .pay-result-icon {
  color: #ffffff;
  background: #2d7b5e;
}

.pay-result-wait .pay-result-icon {
  color: #8a671c;
  background: #fbf0cc;
}

.public-pay-foot {
  margin-top: 22px;
  color: #8b948f;
  font-size: 10px;
  text-align: center;
}

.public-pay-foot p {
  margin-bottom: 4px;
}

.error-body {
  display: grid;
  place-items: center;
  min-height: 100vh;
}

.error-card {
  width: min(440px, calc(100% - 40px));
  padding: 40px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: #ffffff;
  box-shadow: var(--shadow);
  text-align: center;
}

.error-code {
  color: #bec7c0;
  font-family: Georgia, serif;
  font-size: 72px;
  line-height: 1;
}

.error-card h1 {
  margin: 16px 0 8px;
}

.error-card p {
  margin-bottom: 24px;
  color: var(--muted);
}

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

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

  .content-grid,
  .detail-grid,
  .order-detail-grid {
    grid-template-columns: 1fr;
  }

  .detail-side,
  .order-detail-side {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .settings-grid {
    grid-template-columns: 1fr;
  }

  .permission-role-grid {
    grid-template-columns: 1fr;
  }

  .batch-settlement-layout {
    grid-template-columns: 1fr;
  }

  .batch-customer-picker {
    align-items: stretch;
    flex-direction: column;
  }

  .batch-list-toolbar {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .batch-list-toolbar .search-field {
    min-width: 100%;
  }

  .security-card {
    grid-column: auto;
  }
}

@media (max-width: 820px) {
  .app-shell {
    display: block;
    padding-bottom: 72px;
  }

  .role-customer .app-shell {
    padding-bottom: 92px;
  }

  .sidebar {
    position: fixed;
    top: auto;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 20;
    display: block;
    height: 66px;
    padding: 7px 10px;
    overflow: visible;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
  }

  .role-customer .sidebar {
    right: 10px;
    bottom: 10px;
    left: 10px;
    height: 72px;
    padding: 7px 9px;
    border: 1px solid rgba(255, 255, 255, 0.11);
    border-radius: 20px;
    background:
      radial-gradient(circle at 15% 0%, rgba(217, 239, 154, 0.12), transparent 38%),
      linear-gradient(135deg, #17372f, #245247);
    box-shadow: 0 12px 35px rgba(23, 55, 47, 0.28);
  }

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

  .nav {
    display: flex;
    flex-direction: row;
    justify-content: space-around;
    gap: 2px;
  }

  .role-customer .nav {
    gap: 6px;
  }

  .nav-link {
    flex: 1;
    flex-direction: column;
    justify-content: center;
    gap: 1px;
    min-height: 52px;
    padding: 4px 2px;
    border-radius: 9px;
    font-size: 9px;
  }

  .role-customer .nav-link {
    gap: 2px;
    border-radius: 14px;
    font-size: 10px;
  }

  .nav-link:hover {
    transform: none;
  }

  .role-customer .nav-link:hover {
    background: rgba(255, 255, 255, 0.06);
  }

  .role-customer .nav-link.is-active {
    color: var(--lime);
    background: rgba(217, 239, 154, 0.12);
    box-shadow: inset 0 0 0 1px rgba(217, 239, 154, 0.12);
  }

  .nav-icon {
    font-size: 15px;
  }

  .role-customer .nav-icon {
    display: grid;
    width: 27px;
    height: 27px;
    margin-bottom: 1px;
    border-radius: 9px;
    background: rgba(255, 255, 255, 0.08);
    font-size: 15px;
  }

  .role-customer .nav-link.is-active .nav-icon {
    color: var(--green);
    background: var(--lime);
  }

  .topbar {
    min-height: 82px;
    padding: 15px 20px 10px;
  }

  .topbar h1 {
    font-size: 21px;
  }

  .top-profile > span:first-child {
    display: none;
  }

  .page {
    padding: 0 16px 30px;
  }

  .welcome-strip,
  .balance-hero {
    display: block;
    padding: 27px 24px;
  }

  .welcome-actions {
    margin-top: 22px;
  }

  .balance-ring {
    display: none;
  }

  .customer-balance-unified .balance-summary-grid {
    width: 100%;
    min-width: 0;
    margin-top: 24px;
    padding-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    border-left: 0;
  }

  .metric-grid,
  .customer-metrics {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }

  .metric-card {
    min-height: 120px;
    padding: 17px;
  }

  .panel {
    padding: 18px;
  }

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

  .filter-form {
    flex-wrap: wrap;
  }

  .search-field {
    min-width: 100%;
  }

  .toolbar > .button {
    align-self: flex-start;
  }

  .narrow-layout,
  .wide-narrow {
    grid-template-columns: 1fr;
  }

  .detail-title-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .detail-side,
  .order-detail-side {
    grid-template-columns: 1fr;
  }

  .order-qr-panel {
    order: -1;
  }

  .settings-grid {
    grid-template-columns: 1fr;
  }

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

  .auth-shell {
    display: block;
    min-height: 100vh;
  }

  .auth-brand-panel {
    min-height: 230px;
    padding: 25px;
  }

  .auth-message {
    margin-top: 28px;
  }

  .auth-message h1 {
    margin-bottom: 10px;
    font-size: 32px;
  }

  .auth-message p:last-child {
    display: none;
  }

  .auth-foot,
  .auth-pattern {
    display: none;
  }

  .auth-form-panel {
    min-height: calc(100vh - 230px);
    padding: 30px 20px;
    justify-content: flex-start;
  }

  .auth-form-wrap h2 {
    font-size: 29px;
  }

  .security-note {
    margin-top: 32px;
  }
}

@media (max-width: 520px) {
  .metric-grid,
  .customer-metrics,
  .form-grid {
    grid-template-columns: 1fr;
  }

  .metric-card {
    min-height: 105px;
  }

  .metric-card p {
    margin-bottom: 10px;
  }

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

  .balance-value {
    font-size: 44px;
  }

  .preset-grid {
    grid-template-columns: 1fr 1fr;
  }

  .filter-form > select {
    flex: 1;
    min-width: 0;
  }

  .top-profile .role-chip {
    display: none;
  }

  .top-password-link {
    padding-right: 9px;
    padding-left: 9px;
  }

  .top-profile {
    gap: 6px;
  }

  .customer-order-row {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .customer-order-action {
    grid-column: 1 / -1;
  }

  .customer-remittance-form {
    padding: 14px;
  }

  .batch-total-bar {
    align-items: flex-start;
    flex-direction: column;
    gap: 6px;
  }

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

  .batch-selected-row {
    grid-template-columns: 1fr;
  }

  .batch-selected-row .batch-amount-field {
    padding-top: 9px;
    padding-left: 0;
    border-top: 1px solid #dce5de;
    border-left: 0;
  }

  .customer-picker-modal {
    padding: 10px;
  }

  .customer-picker-card {
    max-height: calc(100vh - 20px);
    padding: 17px;
    border-radius: 17px;
  }

  .customer-picker-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

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

  .balance-summary-grid > div {
    padding: 10px 0;
    border-right: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }

  .balance-summary-grid > div:last-child {
    border-bottom: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}

/* Compact authentication layout */
.auth-body {
  min-height: 100vh;
  padding: 22px 0;
  background:
    radial-gradient(circle at 12% 8%, rgba(202, 236, 171, 0.28), transparent 24%),
    radial-gradient(circle at 92% 90%, rgba(36, 89, 75, 0.12), transparent 26%),
    #eef1eb;
}

.auth-page {
  display: flex;
  flex-direction: column;
  justify-content: center;
  width: min(760px, calc(100% - 40px));
  min-height: calc(100vh - 44px);
  margin: 0 auto;
}

.auth-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 14px;
  padding: 10px 14px;
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 16px;
  background:
    radial-gradient(circle at 12% 0%, rgba(217, 239, 154, 0.14), transparent 38%),
    linear-gradient(135deg, #17372f, #245247);
  box-shadow: 0 10px 30px rgba(23, 55, 47, 0.17);
  backdrop-filter: blur(16px);
}

.auth-brand-lockup {
  display: flex;
  align-items: center;
  gap: 9px;
}

.auth-wordmark {
  color: var(--lime);
  font-family: Georgia, "STSong", serif;
  font-size: 21px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.auth-service-name {
  padding-left: 9px;
  color: var(--muted);
  border-left: 1px solid rgba(255, 255, 255, 0.2);
  color: rgba(255, 255, 255, 0.65);
  font-size: 11px;
  font-weight: 600;
}

.auth-secure-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: rgba(255, 255, 255, 0.65);
  font-size: 10px;
  font-weight: 700;
}

.auth-secure-badge i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--lime);
  box-shadow: 0 0 0 4px rgba(217, 239, 154, 0.1);
}

.auth-main-card {
  display: block;
  min-height: 500px;
  overflow: hidden;
  border: 1px solid rgba(222, 226, 218, 0.9);
  border-radius: 26px;
  background: #ffffff;
  box-shadow: 0 28px 75px rgba(23, 55, 47, 0.13);
}

.auth-intro-panel {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 20px;
  padding: clamp(28px, 4vw, 44px);
  overflow: hidden;
  color: #ffffff;
  background:
    radial-gradient(circle at 12% 88%, rgba(217, 239, 154, 0.2), transparent 30%),
    linear-gradient(145deg, #17372f, #245348);
}

.auth-intro-panel h1 {
  position: relative;
  z-index: 1;
  margin-bottom: 0;
  font-family: Georgia, "STSong", serif;
  font-size: clamp(30px, 3.6vw, 43px);
  font-weight: 500;
  letter-spacing: -0.04em;
  line-height: 1.16;
}

.auth-intro-copy {
  position: relative;
  z-index: 1;
  max-width: 310px;
  margin-bottom: 0;
  color: rgba(255, 255, 255, 0.58);
  font-size: 12px;
}

.auth-feature-list {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.auth-feature-list span {
  padding: 6px 10px;
  color: rgba(255, 255, 255, 0.76);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.055);
  font-size: 9px;
}

.auth-orbit {
  position: absolute;
  right: -125px;
  bottom: -170px;
  width: 380px;
  height: 380px;
  border: 1px solid rgba(217, 239, 154, 0.12);
  border-radius: 50%;
  box-shadow:
    0 0 0 38px rgba(217, 239, 154, 0.035),
    0 0 0 78px rgba(217, 239, 154, 0.022),
    0 0 0 120px rgba(217, 239, 154, 0.012);
}

.auth-form-side {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: clamp(30px, 5vw, 48px);
  background:
    radial-gradient(circle at 100% 0%, rgba(202, 236, 171, 0.16), transparent 30%),
    #ffffff;
}

.auth-form-side .auth-form-wrap {
  width: 100%;
  max-width: 410px;
}

.auth-form-side .auth-form-wrap > .eyebrow {
  margin-bottom: 6px;
}

.auth-switch {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3px;
  margin-bottom: 22px;
  padding: 4px;
  border: 1px solid #e7e9e4;
  border-radius: 12px;
  background: #f3f5f1;
}

.auth-switch a {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 37px;
  border-radius: 9px;
  color: #77817b;
  font-size: 11px;
  font-weight: 700;
  transition: color 150ms ease, background 150ms ease, box-shadow 150ms ease;
}

.auth-switch a:hover {
  color: var(--green);
}

.auth-switch a.is-active {
  color: var(--green);
  background: #ffffff;
  box-shadow: 0 4px 13px rgba(23, 55, 47, 0.08);
}

.auth-form-side .auth-form-wrap h2 {
  margin-bottom: 6px;
  font-family: Georgia, "STSong", serif;
  font-size: 32px;
  font-weight: 500;
}

.auth-form-side .auth-subtitle {
  margin-bottom: 25px;
  font-size: 11px;
}

.auth-form-side .stack-form {
  gap: 15px;
}

.auth-form-side .field > span {
  font-size: 11px;
}

.auth-form-side .field input {
  min-height: 46px;
  border-color: #e1e4de;
  background: #fbfcfa;
}

.auth-form-side .button {
  min-height: 47px;
  margin-top: 3px;
}

.auth-form-side .security-note {
  margin: 25px 0 0;
  color: #a0a7a2;
  font-size: 9px;
  text-align: center;
}

.auth-page-foot {
  margin: 15px 0 0;
  color: #919a94;
  font-size: 9px;
  text-align: center;
}

@media (max-width: 820px) {
  .auth-body {
    padding: 12px 0 22px;
  }

  .auth-page {
    width: min(100% - 24px, 560px);
    min-height: auto;
  }

  .auth-topbar {
    margin-bottom: 10px;
    padding: 8px 10px;
  }

  .auth-wordmark {
    font-size: 18px;
  }

  .auth-service-name {
    font-size: 10px;
  }

  .auth-secure-badge {
    font-size: 9px;
  }

  .auth-main-card {
    display: block;
    min-height: 0;
    border-radius: 20px;
  }

  .auth-intro-panel {
    display: block;
    padding: 16px 20px 17px;
  }

  .auth-intro-panel h1 {
    margin-bottom: 0;
    font-size: 23px;
    line-height: 1.28;
  }

  .auth-intro-copy {
    font-size: 10px;
  }

  .auth-feature-list {
    display: none;
  }

  .auth-orbit {
    display: none;
  }

  .auth-form-side {
    display: block;
    padding: 24px 22px 27px;
  }

  .auth-form-side .auth-form-wrap {
    max-width: none;
  }

  .auth-form-side .auth-form-wrap h2 {
    font-size: 27px;
  }

  .auth-form-side .auth-subtitle {
    margin-bottom: 20px;
  }

  .auth-form-side .security-note {
    margin-top: 20px;
  }

  .auth-page-foot {
    display: none;
  }
}
