:root {
  color-scheme: light;
  --bg: #eef3f7;
  --surface: #ffffff;
  --surface-soft: #f7fafc;
  --surface-muted: #edf4f7;
  --text: #111827;
  --muted: #64748b;
  --line: #d7e0ea;
  --primary: #087f6f;
  --primary-strong: #055f54;
  --primary-soft: #e6f7f3;
  --accent: #1d4ed8;
  --danger: #b3261e;
  --danger-soft: #fdebea;
  --warning: #9a5b00;
  --warning-soft: #fff3d6;
  --success: #0f6b49;
  --success-soft: #def7ec;
  --shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: linear-gradient(135deg, #f8fafc 0%, var(--bg) 48%, #e7eef5 100%);
  color: var(--text);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

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

button {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.62;
}

.app-shell {
  width: min(1480px, 100%);
  min-height: 100vh;
  margin: 0 auto;
  padding: 14px;
}

.admin-page .app-shell {
  height: 100vh;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  gap: 12px;
  overflow: hidden;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border: 1px solid rgba(215, 224, 234, 0.9);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: var(--shadow);
  padding: 12px 14px;
}

.topbar h1,
.client-header h1,
.panel h2,
.pix-payment-header h2 {
  letter-spacing: 0;
}

.topbar h1 {
  margin: 3px 0 5px;
  font-size: 1.75rem;
  line-height: 1.05;
}

.subtitle {
  max-width: 760px;
  margin: 0;
  color: var(--muted);
  font-size: 0.94rem;
  line-height: 1.35;
}

.eyebrow {
  margin: 0;
  color: var(--primary-strong);
  font-size: 0.74rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.top-actions,
.card-actions,
.portal-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

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

.metric,
.panel,
.client-card {
  border: 1px solid rgba(215, 224, 234, 0.96);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow);
}

.metric {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
  padding: 11px 12px;
}

.metric span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.metric strong {
  min-width: 0;
  font-size: 1.2rem;
  text-align: right;
  white-space: nowrap;
}

.workspace-grid {
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(280px, 330px) minmax(340px, 1.08fr) minmax(360px, 1fr);
  grid-template-areas:
    "control checkout subscriptions"
    "control products subscriptions";
  gap: 12px;
  align-items: stretch;
}

.panel {
  min-width: 0;
  min-height: 0;
  padding: 14px;
}

.workspace-grid > .panel {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.control-panel {
  grid-area: control;
  overflow: auto;
}

.checkout-panel {
  grid-area: checkout;
}

.catalog-panel {
  grid-area: products;
}

.subscriptions-panel {
  grid-area: subscriptions;
}

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

.panel-header.compact {
  margin-bottom: 10px;
}

.panel h2 {
  margin: 3px 0 0;
  font-size: 1.08rem;
}

hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 14px 0;
}

.stacked-form {
  display: grid;
  gap: 10px;
}

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

label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

input,
select,
textarea {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  padding: 9px 10px;
  outline: none;
  transition:
    border-color 160ms ease,
    box-shadow 160ms ease;
}

textarea {
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(8, 127, 111, 0.14);
}

.primary-button,
.secondary-button,
.ghost-button,
.danger-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  border: 0;
  border-radius: 8px;
  padding: 9px 12px;
  font-weight: 900;
  text-decoration: none;
  transition:
    transform 140ms ease,
    box-shadow 140ms ease,
    background-color 140ms ease;
}

.primary-button {
  background: linear-gradient(180deg, #0a927f, var(--primary));
  color: #fff;
  box-shadow: 0 10px 20px rgba(8, 127, 111, 0.22);
}

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

.secondary-button {
  border: 1px solid rgba(8, 127, 111, 0.28);
  background: var(--primary-soft);
  color: var(--primary-strong);
}

.ghost-button {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--text);
}

.danger-button {
  background: var(--danger-soft);
  color: var(--danger);
}

.small {
  min-height: 32px;
  padding: 7px 9px;
  font-size: 0.8rem;
}

.primary-button:hover,
.secondary-button:hover,
.ghost-button:hover,
.danger-button:hover {
  transform: translateY(-1px);
}

.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  border-radius: 999px;
  background: var(--surface-muted);
  color: var(--muted);
  padding: 4px 9px;
  font-size: 0.76rem;
  font-weight: 900;
  white-space: nowrap;
}

.cards-list,
.table-list {
  min-height: 0;
  overflow: auto;
  padding-right: 2px;
}

.cards-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 10px;
}

.product-card {
  display: grid;
  gap: 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: var(--surface);
}

.product-card h3 {
  margin: 0 0 4px;
  font-size: 0.98rem;
}

.product-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.35;
}

.product-meta {
  display: flex;
  align-items: center;
  gap: 9px;
  flex-wrap: wrap;
}

.price {
  font-size: 1.12rem;
  font-weight: 950;
}

.cycle {
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 900;
}

.payment-output {
  display: grid;
  gap: 10px;
  min-height: 0;
  margin-top: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
  padding: 12px;
  overflow: auto;
}

.payment-output.empty-state {
  place-content: center;
  min-height: 112px;
  color: var(--muted);
  text-align: center;
}

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

.summary-item {
  border-radius: 8px;
  background: #fff;
  padding: 9px;
}

.summary-item span {
  display: block;
  color: var(--muted);
  font-size: 0.76rem;
  margin-bottom: 3px;
}

.summary-item strong {
  font-size: 0.92rem;
}

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

.copy-box textarea {
  min-height: 70px;
  font-family: "Cascadia Code", Consolas, monospace;
  font-size: 0.78rem;
}

.link-box {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto auto;
  gap: 8px;
  align-items: center;
}

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

.subscription-row {
  display: grid;
  grid-template-columns: minmax(120px, 1.15fr) minmax(88px, 0.7fr) minmax(82px, 0.7fr) auto minmax(150px, auto);
  gap: 9px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 10px;
}

.subscription-row strong,
.subscription-row span {
  min-width: 0;
}

.subscription-row strong {
  font-size: 0.9rem;
}

.subscription-row span {
  color: var(--muted);
  font-size: 0.78rem;
}

.badge {
  justify-self: start;
  border-radius: 999px;
  padding: 5px 8px;
  font-size: 0.74rem;
  font-weight: 950;
  white-space: nowrap;
}

.row-actions {
  display: flex;
  justify-content: flex-end;
  gap: 7px;
  flex-wrap: wrap;
}

.badge.active {
  background: var(--success-soft);
  color: var(--success);
}

.badge.pending {
  background: var(--warning-soft);
  color: var(--warning);
}

.badge.paused {
  background: #edf0f5;
  color: #536071;
}

.empty-list {
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
  padding: 18px;
  text-align: center;
}

.toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 20;
  border-radius: 8px;
  background: var(--text);
  color: #fff;
  padding: 11px 13px;
  box-shadow: var(--shadow);
}

.auth-required .app-shell {
  visibility: hidden;
}

.auth-required.is-authenticated .app-shell {
  visibility: visible;
}

.auth-loading {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  background: var(--bg);
  color: var(--muted);
  font-weight: 900;
}

.is-authenticated .auth-loading {
  display: none;
}

.admin-email {
  align-self: center;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 900;
}

.client-page {
  display: grid;
  place-items: center;
  min-height: 100vh;
  padding: 18px;
}

.client-shell {
  width: min(560px, 100%);
}

.checkout-page .client-shell {
  width: min(1120px, 100%);
}

.client-card {
  padding: 18px;
}

.client-header {
  margin-bottom: 16px;
}

.checkout-heading {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 12px;
  align-items: center;
}

.checkout-heading .subtitle {
  grid-column: auto;
  justify-self: end;
  max-width: 340px;
  text-align: right;
}

.pix-brand-icon {
  width: 52px;
  height: 52px;
  border-radius: 0;
  object-fit: contain;
  background: transparent;
  padding: 0;
}

.client-header h1 {
  margin: 3px 0 5px;
  font-size: 2rem;
  line-height: 1.05;
}

.client-content {
  display: grid;
  gap: 14px;
}

.portal-actions {
  align-items: stretch;
}

.portal-actions .method-panel {
  flex: 1 1 260px;
}

.login-message {
  min-height: 22px;
  color: var(--danger);
  font-weight: 900;
}

.checkout-layout {
  display: grid;
  grid-template-columns: minmax(300px, 0.88fr) minmax(360px, 1.12fr);
  gap: 14px;
  align-items: stretch;
}

.checkout-details-panel {
  display: grid;
  align-content: start;
  gap: 12px;
  min-width: 0;
}

.client-summary,
.payment-breakdown {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}

.client-summary > div,
.payment-breakdown > div,
.method-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 12px;
}

.client-summary span,
.payment-breakdown span {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
  margin-bottom: 4px;
}

.client-summary strong,
.payment-breakdown strong {
  font-size: 0.98rem;
}

.payment-breakdown .total-line {
  grid-column: 1 / -1;
  background: linear-gradient(180deg, #f2fffb, var(--primary-soft));
  border-color: rgba(8, 127, 111, 0.28);
}

.payment-breakdown .total-line strong {
  display: block;
  color: var(--primary-strong);
  font-size: 2rem;
}

.method-panel {
  display: grid;
  gap: 8px;
}

.method-panel p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.35;
}

.pix-payment-card {
  display: grid;
  gap: 12px;
  border: 1px solid rgba(8, 127, 111, 0.28);
  border-radius: 8px;
  background: #f6fffc;
  padding: 14px;
}

.pix-payment-header {
  display: flex;
  gap: 10px;
  align-items: center;
}

.pix-payment-header h2 {
  margin: 0 0 3px;
  font-size: 1.14rem;
}

.pix-payment-header p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.pix-inline-icon {
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  border-radius: 0;
  object-fit: contain;
  background: transparent;
  padding: 0;
}

.qr-code-shell {
  display: grid;
  justify-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 12px;
}

.qr-code-shell canvas {
  width: 190px;
  height: 190px;
  max-width: 100%;
}

#qr-code-status,
.helper-text {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.payment-steps {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px 18px;
  margin: 0;
  padding-left: 20px;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 800;
}

.pix-missing {
  display: grid;
  gap: 8px;
  justify-items: center;
}

.client-actions {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 9px;
}

.payment-status {
  display: none;
  border-radius: 8px;
  background: var(--success-soft);
  color: var(--success);
  padding: 11px;
  font-weight: 900;
}

.payment-status.visible {
  display: block;
}

.confirmed-banner {
  display: grid;
  gap: 4px;
  border: 1px solid rgba(15, 107, 73, 0.24);
  border-radius: 8px;
  background: var(--success-soft);
  color: var(--success);
  padding: 12px;
}

.confirmed-banner strong {
  font-size: 1.05rem;
}

.confirmed-banner span {
  font-size: 0.86rem;
  font-weight: 800;
}

@media (max-width: 1180px) {
  .admin-page .app-shell {
    height: auto;
    min-height: 100vh;
    overflow: visible;
  }

  .workspace-grid {
    grid-template-columns: minmax(280px, 340px) minmax(0, 1fr);
    grid-template-areas:
      "control checkout"
      "control subscriptions"
      "products subscriptions";
  }

  .cards-list,
  .table-list {
    max-height: 360px;
  }
}

@media (max-width: 900px) {
  .topbar,
  .workspace-grid {
    grid-template-columns: 1fr;
    display: grid;
  }

  .workspace-grid {
    grid-template-areas:
      "control"
      "checkout"
      "subscriptions"
      "products";
  }

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

  .checkout-layout {
    grid-template-columns: minmax(180px, 0.9fr) minmax(205px, 1.1fr);
    gap: 10px;
  }

  .checkout-heading {
    grid-template-columns: auto 1fr;
  }

  .checkout-heading .subtitle {
    grid-column: 1 / -1;
    justify-self: stretch;
    max-width: none;
    text-align: left;
  }
}

@media (max-width: 640px) {
  .app-shell,
  .client-page {
    padding: 10px;
  }

  .top-actions,
  .form-row,
  .summary-grid,
  .link-box,
  .portal-actions,
  .metrics-grid,
  .client-summary,
  .payment-breakdown,
  .client-actions {
    grid-template-columns: 1fr;
    display: grid;
  }

  .metric {
    align-items: flex-start;
  }

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

  .row-actions {
    justify-content: stretch;
  }

  .row-actions > * {
    flex: 1 1 130px;
  }

  .client-card {
    padding: 12px;
  }

  .checkout-heading {
    grid-template-columns: 1fr;
  }

  .payment-breakdown .total-line strong {
    font-size: 1.55rem;
  }

  .pix-payment-card {
    padding: 10px;
  }

  .qr-code-shell canvas {
    width: 150px;
    height: 150px;
  }

  .payment-steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px 14px;
    font-size: 0.76rem;
  }

  .copy-box textarea {
    min-height: 50px;
  }
}

@media (max-width: 460px) {
  .checkout-layout,
  .payment-steps {
    grid-template-columns: 1fr;
  }
}

/* Bank app admin */
.admin-page {
  background: #e9edf1;
}

.admin-page .bank-admin-shell {
  width: min(430px, 100%);
  height: 100vh;
  min-height: 100vh;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 0;
  padding: 0;
  overflow: hidden;
  background: #f1f3f6;
  box-shadow: 0 20px 60px rgba(15, 23, 42, 0.18);
}

.bank-topbar {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  min-height: 58px;
  background: #55b947;
  color: #fff;
  padding: 10px 12px;
}

.bank-topbar h1 {
  margin: 0;
  font-size: 1rem;
  font-weight: 900;
}

.bank-topbar .admin-email {
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.66rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.logout-link {
  justify-self: end;
  border: 0;
  background: transparent;
  color: #fff;
  font-size: 0.78rem;
  font-weight: 900;
}

.bank-main {
  min-height: 0;
  overflow: auto;
  padding: 0 0 72px;
}

.admin-section {
  display: none;
}

.admin-section.is-active {
  display: grid;
}

.sale-card {
  margin: 0;
  border-radius: 0 0 8px 8px;
  background: #55b947;
  padding: 0 8px 10px;
}

.sale-form {
  display: grid;
  gap: 8px;
  border-radius: 8px;
  background: #fff;
  padding: 10px;
  box-shadow: 0 6px 14px rgba(15, 23, 42, 0.14);
}

.amount-field {
  position: relative;
  color: #7d8792;
  font-size: 0.7rem;
  padding-bottom: 32px;
}

.amount-field input {
  position: absolute;
  inset: 18px 0 0;
  z-index: 2;
  width: 100%;
  height: 38px;
  border: 0;
  border-bottom: 2px solid #8d939a;
  border-radius: 0;
  padding: 0;
  color: transparent;
  caret-color: var(--primary);
  background: transparent;
}

.amount-preview {
  display: flex;
  align-items: baseline;
  gap: 4px;
  color: #343a40;
  margin-top: -36px;
  pointer-events: none;
}

.amount-preview span {
  font-size: 1rem;
  font-weight: 800;
}

.amount-preview strong {
  font-size: 1.55rem;
  line-height: 1;
}

.compact-sale-row {
  grid-template-columns: 1fr 1fr;
}

.sell-button {
  margin-top: 4px;
  border-radius: 999px;
  background: #0089bd;
  box-shadow: none;
}

.bank-metrics {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  margin: 8px;
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
}

.bank-metrics .metric {
  display: grid;
  justify-items: center;
  gap: 3px;
  border: 0;
  border-right: 1px solid #edf0f3;
  border-radius: 0;
  box-shadow: none;
  padding: 9px 4px;
}

.bank-metrics .metric:last-child {
  border-right: 0;
}

.bank-metrics .metric span {
  font-size: 0.66rem;
}

.bank-metrics .metric strong {
  font-size: 0.78rem;
  text-align: center;
}

.shortcut-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  margin: 8px;
  background: #e1e6eb;
}

.shortcut-card {
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 6px;
  min-height: 86px;
  border: 0;
  background: #fff;
  color: #687484;
  padding: 10px 6px;
  text-align: center;
  font-size: 0.7rem;
  font-weight: 800;
}

.shortcut-icon {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  color: #0089bd;
  background: #edf8fc;
  font-size: 1rem;
  font-weight: 900;
}

.bank-panel {
  margin: 8px;
  gap: 12px;
  box-shadow: none;
}

.bank-panel.is-active {
  display: grid;
}

.bottom-nav {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid #d9dfe6;
  background: #fff;
}

.bottom-nav button {
  display: grid;
  justify-items: center;
  gap: 2px;
  border: 0;
  background: #fff;
  color: #727d89;
  padding: 8px 4px 7px;
  font-size: 0.68rem;
  font-weight: 800;
}

.bottom-nav button span {
  color: #83909d;
  font-size: 1rem;
}

.bottom-nav button.is-active,
.bottom-nav button.is-active span {
  color: #55b947;
}

/* Dark client payment app */
.checkout-page {
  background: #111216;
  padding: 0;
}

.checkout-page .client-shell {
  width: min(440px, 100%);
}

.checkout-page .client-card {
  min-height: 100vh;
  border: 0;
  border-radius: 0;
  background: #1b1c22;
  box-shadow: none;
  padding: 0;
}

.checkout-page .checkout-heading {
  display: none;
}

.checkout-page .client-header h1 {
  font-size: 1rem;
}

.checkout-page .eyebrow {
  color: #a7adb8;
}

.checkout-page .pix-brand-icon {
  width: 42px;
  height: 42px;
  background: #343640;
  border-radius: 2px;
  padding: 6px;
}

.client-payment-app {
  display: grid;
  gap: 0;
  color: #f7fafc;
}

.dark-order-card,
.dark-total-card,
.dark-methods-card,
.dark-qr-card,
.dark-payment-footer {
  background: #1f2026;
  border-top: 1px solid #30323a;
}

.dark-order-card {
  padding: 12px;
}

.order-item-row,
.items-total-row,
.dark-method-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 10px;
  align-items: center;
}

.order-thumb {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  background: #3a3c45;
}

.order-thumb img {
  width: 30px;
  height: 30px;
  object-fit: contain;
}

.order-item-row strong {
  font-size: 0.86rem;
}

.order-item-row span,
.items-total-row span,
.dark-total-card small,
.dark-method-row small,
.dark-card-title span {
  color: #aab0ba;
  font-size: 0.72rem;
  font-weight: 700;
}

.items-total-row {
  grid-template-columns: 1fr auto;
  margin-top: 14px;
  padding-top: 10px;
  border-top: 1px solid #30323a;
}

.dark-total-card {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4px 10px;
  padding: 14px 12px;
}

.dark-total-card span {
  color: #f7fafc;
  font-weight: 900;
}

.dark-total-card strong {
  font-size: 1.45rem;
}

.dark-total-card small {
  grid-column: 1 / -1;
}

.dark-methods-card {
  display: grid;
  gap: 8px;
  padding: 12px;
}

.dark-methods-card > p {
  margin: 0 0 2px;
  color: #aab0ba;
  font-size: 0.78rem;
  font-weight: 800;
}

.dark-method-row {
  min-height: 48px;
}

.method-icon {
  display: grid;
  place-items: center;
  width: 50px;
  height: 34px;
  border-radius: 3px;
  background: #f5f8fb;
  color: #159947;
  font-size: 0.72rem;
  font-weight: 950;
}

.dark-method-row strong {
  display: block;
  font-size: 0.78rem;
}

.pay-button {
  border: 0;
  border-radius: 999px;
  background: #05c946;
  color: #fff;
  padding: 9px 16px;
  font-size: 0.78rem;
  font-weight: 950;
}

.pay-button.wide {
  width: 100%;
}

.method-status {
  color: #05c946;
  font-size: 0.72rem;
  font-weight: 900;
}

.dark-qr-card {
  display: grid;
  gap: 10px;
  padding: 12px;
}

.dark-card-title {
  display: grid;
  gap: 3px;
}

.dark-qr-card .qr-code-shell {
  background: #fff;
}

.dark-qr-card .copy-box label {
  color: #aab0ba;
}

.dark-qr-card textarea {
  background: #111216;
  border-color: #30323a;
  color: #d8dde6;
}

.dark-status {
  margin: 12px;
  background: #133c25;
  color: #9bf3b8;
}

.dark-confirmed {
  margin: 12px;
  background: #143c27;
  color: #9bf3b8;
  border-color: #21673f;
}

.dark-empty {
  margin: 12px;
  border: 1px dashed #40434d;
  border-radius: 8px;
  color: #aab0ba;
  padding: 16px;
  text-align: center;
}

.dark-payment-footer {
  padding: 14px;
  color: #c0c5cf;
  text-align: center;
  font-size: 0.78rem;
  font-weight: 900;
}

@media (min-width: 760px) {
  .admin-page .bank-admin-shell,
  .checkout-page .client-shell {
    margin: 18px auto;
    height: calc(100vh - 36px);
    min-height: 680px;
    border-radius: 8px;
    overflow: hidden;
  }

  .checkout-page .client-card {
    min-height: 100%;
  }
}

/* Bank app polish */
.bank-main {
  padding: 0 0 10px;
}

.home-section {
  align-content: start;
  gap: 8px;
}

.home-section .sale-card {
  margin: 0;
  border-radius: 0 0 10px 10px;
  background: linear-gradient(180deg, #55b947 0%, #46aa39 100%);
  padding: 0 8px 10px;
}

.sale-form {
  gap: 7px;
}

.amount-field {
  gap: 6px;
  padding-bottom: 0;
  color: #697586;
  font-size: 0.72rem;
  font-weight: 850;
}

.amount-control {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 7px;
  align-items: baseline;
  border-bottom: 2px solid #858b93;
  color: #1f2933;
}

.amount-control > span {
  font-size: 1.05rem;
  font-weight: 900;
}

.amount-field input {
  position: static;
  width: 100%;
  height: auto;
  border: 0;
  border-radius: 0;
  padding: 0 0 4px;
  background: transparent;
  color: #1f2933;
  caret-color: #0089bd;
  font-size: 1.65rem;
  font-weight: 950;
  line-height: 1.05;
}

.amount-field input:focus {
  box-shadow: none;
}

.amount-preview {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 0;
  border: 1px solid #e9edf2;
  border-radius: 8px;
  background: #f8fafc;
  padding: 6px 8px;
  color: #64748b;
  pointer-events: auto;
}

.amount-preview span,
.amount-preview strong {
  font-size: 0.76rem;
  line-height: 1;
}

.amount-preview strong {
  color: #1f2933;
  font-weight: 950;
}

.bank-metrics {
  margin: 0 8px;
}

.shortcut-grid {
  margin: 0 8px 8px;
  border: 1px solid #e0e6ed;
  border-radius: 8px;
  overflow: hidden;
}

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

.compact-shortcuts .shortcut-card:first-child {
  grid-column: 1 / -1;
  min-height: 62px;
}

.shortcut-card {
  min-height: 78px;
  transition:
    color 0.18s ease,
    background 0.18s ease,
    transform 0.18s ease;
}

.shortcut-card:focus-visible,
.shortcut-card:hover {
  background: #f7fbfd;
  color: #1f2933;
  transform: translateY(-1px);
}

.shortcut-icon {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  font-size: 0.72rem;
  letter-spacing: 0;
}

.bank-panel {
  margin: 8px;
  max-height: calc(100vh - 94px);
  overflow: auto;
}

.bank-panel .panel-header {
  position: sticky;
  top: -1px;
  z-index: 2;
  background: #fff;
  padding-bottom: 8px;
}

.bottom-nav button span {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  background: #edf2f7;
  font-size: 0.72rem;
  font-weight: 950;
}

.bottom-nav button.is-active span {
  background: #e8f8e4;
}

.payment-history-row {
  grid-template-columns: 1fr;
}

.payment-history-row .row-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.payment-history-row .row-actions > * {
  justify-content: center;
}

.admin-receipt {
  border-radius: 10px;
  background: #eefaf0;
  padding: 12px;
}

.admin-receipt div {
  display: grid;
  gap: 3px;
}

.admin-receipt span,
.admin-receipt small {
  color: #52715b;
  font-size: 0.76rem;
  font-weight: 800;
}

.admin-receipt strong {
  color: #174b25;
  font-size: 1.28rem;
  font-weight: 950;
}

.payment-actions {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 8px;
  align-items: center;
}

.payment-actions input {
  min-width: 0;
  height: 38px;
}

.dark-checkout-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 48px;
  border-bottom: 1px solid #30323a;
  background: #17181d;
  padding: 10px 12px;
}

.dark-checkout-topbar span {
  min-width: 0;
  overflow: hidden;
  color: #eef2f7;
  font-size: 0.82rem;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dark-checkout-topbar strong {
  border-radius: 999px;
  background: #143c27;
  color: #9bf3b8;
  padding: 5px 9px;
  font-size: 0.68rem;
  font-weight: 950;
}

.dark-method-row {
  border-radius: 8px;
  padding: 6px;
}

.dark-method-row.action-row {
  background: #24262d;
}

.dark-method-row:hover {
  background: #252730;
}

.pay-button:disabled {
  cursor: default;
  opacity: 0.48;
}

.dark-qr-card .qr-code-shell {
  border-radius: 10px;
  padding: 12px;
}

@media (max-width: 420px) {
  .compact-sale-row {
    grid-template-columns: 1fr;
  }

  .shortcut-grid {
    grid-template-columns: repeat(2, 1fr);
  }

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

  .dark-method-row .pay-button,
  .dark-method-row .method-status {
    grid-column: 2;
    justify-self: start;
  }

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