:root {
  color-scheme: light;
  --bg: #f4f7f6;
  --panel: #ffffff;
  --ink: #10201c;
  --muted: #62726d;
  --line: #dce5e1;
  --accent: #0f8f72;
  --accent-dark: #0b725b;
  --warn: #a75f00;
  --danger: #b42318;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--ink);
}

body.checkout-page {
  background: #171a27;
}

button,
input,
textarea {
  font: inherit;
}

button {
  border: 0;
  border-radius: 8px;
  background: var(--accent);
  color: white;
  padding: 10px 14px;
  cursor: pointer;
  font-weight: 700;
}

button:hover {
  background: var(--accent-dark);
}

button.secondary {
  background: #e8efec;
  color: var(--ink);
}

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

.checkout-shell {
  position: relative;
  isolation: isolate;
  align-items: start;
  padding: 28px 0 36px;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% -12%, rgba(123, 92, 255, 0.52), transparent 39%),
    radial-gradient(circle at 5% 82%, rgba(35, 207, 168, 0.2), transparent 34%),
    radial-gradient(circle at 96% 70%, rgba(73, 126, 255, 0.26), transparent 34%),
    linear-gradient(145deg, #121521 0%, #24283b 48%, #171a28 100%);
}

.checkout-shell::before,
.checkout-shell::after {
  content: "";
  position: fixed;
  z-index: 0;
  width: 420px;
  height: 420px;
  pointer-events: none;
  border-radius: 50%;
  opacity: 0.72;
  filter: blur(24px);
}

.checkout-shell::before {
  left: max(-250px, calc(50% - 780px));
  top: 120px;
  background: radial-gradient(circle at 60% 45%, rgba(112, 79, 247, 0.32), rgba(112, 79, 247, 0.02) 68%);
}

.checkout-shell::after {
  right: max(-260px, calc(50% - 790px));
  bottom: -40px;
  background: radial-gradient(circle at 38% 42%, rgba(31, 198, 161, 0.2), rgba(31, 198, 161, 0.01) 70%);
}

.pay-panel,
.admin-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 12px 32px rgba(10, 35, 29, 0.08);
}

.pay-panel {
  width: min(520px, 100%);
  padding: 28px;
}

.checkout-panel {
  position: relative;
  z-index: 1;
  width: min(420px, 100%);
  min-height: min(690px, 100vh);
  padding: 0;
  overflow: hidden;
  background: rgba(253, 254, 254, 0.92);
  border-color: rgba(255, 255, 255, 0.82);
  border-radius: 20px;
  box-shadow:
    0 34px 80px rgba(4, 7, 19, 0.4),
    0 10px 26px rgba(4, 7, 19, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.92);
  -webkit-backdrop-filter: blur(28px) saturate(165%);
  backdrop-filter: blur(28px) saturate(165%);
}

.order-panel {
  min-height: 0;
}

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

.logo-mark {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: #10201c;
  color: white;
  font-weight: 900;
  font-size: 24px;
}

h1,
h2 {
  margin: 0;
}

h1 {
  font-size: 28px;
}

h2 {
  font-size: 18px;
  margin-bottom: 14px;
}

p {
  color: var(--muted);
  margin: 4px 0 0;
}

.form {
  display: grid;
  gap: 16px;
  margin-top: 28px;
}

.form.compact {
  margin-top: 14px;
  gap: 12px;
}

.inline-form {
  display: grid;
  grid-template-columns: minmax(160px, 1fr) minmax(160px, 1fr) minmax(160px, 1fr) auto;
  gap: 12px;
  align-items: end;
}

label {
  display: grid;
  gap: 7px;
  font-weight: 700;
  color: #243a34;
}

input,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 11px 12px;
  background: #fbfdfc;
  color: var(--ink);
}

textarea {
  min-height: 88px;
  resize: vertical;
}

.quote {
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}

.quote div,
.payment-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 12px;
  border-bottom: 1px solid var(--line);
}

.quote div:last-child,
.payment-row:last-child {
  border-bottom: 0;
}

.quote span,
.payment-row span {
  color: var(--muted);
}

.result,
.payment-state {
  margin-top: 20px;
}

.checkout-panel .payment-state {
  margin-top: 0;
}

.address-box {
  word-break: break-all;
  background: #eef5f2;
  border-radius: 8px;
  padding: 12px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.address-section {
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.address-section span {
  display: block;
  color: var(--muted);
  margin-bottom: 6px;
}

.qr {
  width: 224px;
  height: 224px;
  display: block;
  margin: 26px auto 24px;
}

.checkout-statusbar {
  position: relative;
  overflow: hidden;
  color: white;
  background:
    radial-gradient(circle at 8% -25%, rgba(255, 255, 255, 0.32), transparent 42%),
    linear-gradient(132deg, rgba(91, 54, 220, 0.97) 0%, rgba(62, 91, 224, 0.94) 54%, rgba(52, 109, 226, 0.92) 100%);
  background-position: 0% 30%, 0% 50%;
  background-size: 140% 140%, 180% 180%;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.2),
    0 12px 30px rgba(79, 65, 196, 0.12);
  -webkit-backdrop-filter: blur(18px) saturate(150%);
  backdrop-filter: blur(18px) saturate(150%);
  padding: 19px 18px 15px;
  animation: zane-gradient-flow 12s ease-in-out infinite;
}

.checkout-statusbar::before {
  content: "";
  position: absolute;
  width: 190px;
  height: 190px;
  right: -62px;
  top: -118px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 50%;
  box-shadow: inset 0 0 60px rgba(255, 255, 255, 0.08);
  pointer-events: none;
  will-change: transform, opacity;
  animation: zane-orbit-float 8s ease-in-out infinite;
}

.checkout-statusbar > * {
  position: relative;
  z-index: 1;
}

@keyframes zane-gradient-flow {
  0%, 100% {
    background-position: 0% 30%, 0% 50%;
  }

  50% {
    background-position: 72% 65%, 100% 50%;
  }
}

@keyframes zane-orbit-float {
  0%, 100% {
    opacity: 0.72;
    transform: translate3d(0, 0, 0) rotate(0deg) scale(1);
  }

  50% {
    opacity: 1;
    transform: translate3d(-14px, 8px, 0) rotate(-8deg) scale(1.06);
  }
}

@media (prefers-reduced-motion: reduce) {
  .checkout-statusbar,
  .checkout-statusbar::before {
    animation: none;
  }
}

.checkout-brand {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  width: max-content;
  margin: 0 0 17px;
}

.order-panel .checkout-brand {
  margin-bottom: 0;
}

.checkout-brand-mark {
  display: grid;
  place-items: center;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.13), transparent 68%);
  filter: drop-shadow(0 8px 14px rgba(28, 20, 91, 0.28));
}

.checkout-brand-mark svg {
  width: 46px;
  height: 46px;
}

.checkout-brand-copy {
  display: grid;
  gap: 4px;
  text-align: left;
}

.checkout-brand-text {
  font-size: 27px;
  font-weight: 900;
  letter-spacing: -0.04em;
  line-height: 1;
  text-shadow: 0 2px 12px rgba(26, 20, 92, 0.24);
}

.checkout-brand-text span {
  margin-left: 2px;
  color: rgba(255, 255, 255, 0.78);
  font-weight: 750;
}

.checkout-brand-tagline {
  color: rgba(255, 255, 255, 0.7);
  font-size: 8.5px;
  font-weight: 800;
  letter-spacing: 0.18em;
}

.checkout-status-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  font-size: 13px;
  font-weight: 800;
}

.checkout-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.checkout-spinner {
  width: 15px;
  height: 15px;
  border: 2px solid rgba(255, 255, 255, 0.45);
  border-top-color: white;
  border-radius: 50%;
  animation: checkout-spin 0.9s linear infinite;
}

#countdown {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 14px;
}

#countdown.danger {
  color: #ffd9d7;
}

.checkout-body {
  padding: 22px 24px 20px;
  text-align: center;
}

.checkout-qr {
  width: min(234px, 76vw);
  height: auto;
  aspect-ratio: 1;
  display: block;
  margin: 0 auto 24px;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.94);
  border-radius: 20px;
  background:
    linear-gradient(#ef2637, #ef2637) left 9px top 9px / 26px 2px no-repeat,
    linear-gradient(#ef2637, #ef2637) left 9px top 9px / 2px 26px no-repeat,
    linear-gradient(#ef2637, #ef2637) right 9px top 9px / 26px 2px no-repeat,
    linear-gradient(#ef2637, #ef2637) right 9px top 9px / 2px 26px no-repeat,
    linear-gradient(#ef2637, #ef2637) left 9px bottom 9px / 26px 2px no-repeat,
    linear-gradient(#ef2637, #ef2637) left 9px bottom 9px / 2px 26px no-repeat,
    linear-gradient(#ef2637, #ef2637) right 9px bottom 9px / 26px 2px no-repeat,
    linear-gradient(#ef2637, #ef2637) right 9px bottom 9px / 2px 26px no-repeat,
    linear-gradient(145deg, #ffffff, #fbfcfc);
  box-shadow:
    0 18px 38px rgba(17, 25, 52, 0.14),
    0 5px 14px rgba(17, 25, 52, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.96);
}

.checkout-instruction {
  color: #7587b6;
  font-size: 16px;
  line-height: 1.55;
  margin: 0 0 12px;
}

.checkout-instruction strong {
  color: var(--ink);
}

.checkout-address {
  color: #2c3330;
  font-weight: 900;
  line-height: 1.45;
  overflow-wrap: anywhere;
  margin: 0 auto 8px;
}

.checkout-network {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: #ff1d25;
  color: white;
  font-weight: 900;
  padding: 7px 18px;
  margin-bottom: 10px;
}

.checkout-copy-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 0 0 12px;
}

.checkout-copy-button {
  background: transparent;
  color: #4977ea;
  padding: 8px 4px;
  border-radius: 6px;
}

.checkout-copy-button:hover {
  background: #edf2ff;
  color: #315fd4;
}

.order-body {
  padding: 32px 28px 28px;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.18), rgba(235, 240, 239, 0.08));
}

.order-heading {
  text-align: center;
  margin-bottom: 28px;
}

.order-network-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 12px;
  padding: 6px 10px;
  border: 1px solid rgba(238, 39, 55, 0.12);
  border-radius: 999px;
  background: rgba(238, 39, 55, 0.06);
  color: #bf1d2b;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.13em;
  line-height: 1;
}

.order-network-badge span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: linear-gradient(145deg, #ff4855, #df0618);
  box-shadow: 0 0 0 4px rgba(238, 39, 55, 0.09);
}

.order-heading h1 {
  color: #14211d;
  font-size: 28px;
  letter-spacing: -0.04em;
  line-height: 1.15;
}

.order-heading p {
  margin-top: 8px;
  color: #72807b;
  font-size: 13px;
  font-weight: 650;
}

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

.order-form label {
  gap: 9px;
}

.amount-field-group {
  display: grid;
  gap: 10px;
}

.amount-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 15px;
}

.amount-label small {
  color: #8a9894;
  font-size: 12px;
  font-weight: 600;
}

.amount-input-shell {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-height: 64px;
  padding: 7px 12px 7px 10px;
  border: 1px solid rgba(255, 255, 255, 0.88);
  border-radius: 14px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.76), rgba(245, 249, 248, 0.52));
  box-shadow:
    0 8px 22px rgba(16, 32, 28, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.94),
    inset 0 0 0 1px rgba(108, 126, 149, 0.1);
  -webkit-backdrop-filter: blur(14px) saturate(150%);
  backdrop-filter: blur(14px) saturate(150%);
  transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.amount-input-shell:hover {
  border-color: rgba(238, 39, 55, 0.32);
}

.amount-input-shell:focus-within {
  border-color: #ee2737;
  box-shadow:
    0 0 0 4px rgba(238, 39, 55, 0.12),
    0 12px 28px rgba(144, 34, 50, 0.13),
    inset 0 1px 0 rgba(255, 255, 255, 0.96);
  transform: translateY(-1px);
}

.amount-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background:
    radial-gradient(circle at 30% 15%, rgba(255, 255, 255, 0.32), transparent 34%),
    linear-gradient(145deg, #ff4855, #df0618);
  color: white;
  font-size: 21px;
  font-weight: 900;
  text-shadow: 0 1px 1px rgba(118, 0, 10, 0.28);
  box-shadow:
    0 8px 18px rgba(223, 6, 24, 0.26),
    inset 0 1px 0 rgba(255, 255, 255, 0.28);
}

.order-form .amount-input-shell input {
  min-width: 0;
  height: 46px;
  padding: 0 2px;
  border: 0;
  border-radius: 0;
  outline: 0;
  background: transparent;
  box-shadow: none;
  color: #17241f;
  font-size: 24px;
  font-weight: 900;
  text-align: left;
  letter-spacing: -0.02em;
}

.order-form .amount-input-shell input::placeholder {
  color: #bcc6c2;
  opacity: 1;
}

.amount-unit {
  border: 1px solid rgba(238, 39, 55, 0.12);
  border-radius: 999px;
  background: rgba(238, 39, 55, 0.07);
  color: #c91f2d;
  padding: 6px 9px;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.04em;
}

.order-quote {
  padding: 0 14px;
  border: 1px solid rgba(255, 255, 255, 0.76);
  border-radius: 14px;
  background: rgba(244, 248, 247, 0.56);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.82),
    0 6px 18px rgba(16, 32, 28, 0.04);
}

.order-quote div,
.order-result .payment-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.order-quote div:last-child,
.order-result .payment-row:last-child {
  border-bottom: 0;
}

.order-quote span,
.order-result span {
  color: var(--muted);
}

.order-form button {
  height: 48px;
  border-radius: 12px;
  position: relative;
  background: linear-gradient(135deg, #6744e8, #3e6fe3);
  box-shadow:
    0 10px 24px rgba(69, 75, 204, 0.25),
    inset 0 1px 0 rgba(255, 255, 255, 0.18);
  transition: transform 180ms ease, box-shadow 180ms ease, filter 180ms ease;
}

.order-form button:hover {
  background: linear-gradient(135deg, #704bec, #4778e7);
  box-shadow:
    0 13px 28px rgba(69, 75, 204, 0.31),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
  filter: brightness(1.04);
  transform: translateY(-1px);
}

.order-form button:active {
  box-shadow: 0 6px 14px rgba(69, 75, 204, 0.2);
  transform: translateY(0);
}

.order-result {
  margin-top: 18px;
}

.order-result a {
  color: #4977ea;
  overflow-wrap: anywhere;
}

.checkout-meta {
  display: grid;
  gap: 0;
  margin-top: 2px;
  border-top: 1px solid var(--line);
  text-align: left;
}

.checkout-meta div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
}

.checkout-meta span {
  color: var(--muted);
}

.copy-toast {
  position: absolute;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  border-radius: 999px;
  background: rgba(16, 32, 28, 0.92);
  color: white;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 800;
  box-shadow: 0 10px 28px rgba(16, 32, 28, 0.22);
}

@keyframes checkout-spin {
  to {
    transform: rotate(360deg);
  }
}

.hidden {
  display: none !important;
}

.admin-shell {
  padding: 24px;
}

.admin-layout {
  min-height: calc(100vh - 48px);
  display: grid;
  grid-template-columns: 248px minmax(0, 1fr);
  gap: 18px;
}

.admin-sidebar,
.admin-content {
  min-width: 0;
  min-height: 0;
}

.admin-sidebar {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
  display: grid;
  align-content: start;
  gap: 18px;
  box-shadow: 0 12px 32px rgba(10, 35, 29, 0.08);
}

.admin-content {
  padding-right: 4px;
}

.sidebar-brand h1 {
  font-size: 22px;
}

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

.nav-button {
  width: 100%;
  text-align: left;
  background: transparent;
  color: var(--ink);
  border: 1px solid transparent;
}

.nav-button:hover,
.nav-button.active {
  background: #e8efec;
  color: var(--ink);
  border-color: var(--line);
}

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

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

.admin-card {
  padding: 18px;
  margin-bottom: 18px;
}

.admin-view {
  min-width: 0;
}

#login-card {
  width: min(420px, 100%);
  margin: 8vh auto 0;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(180px, 1fr));
  gap: 18px;
  margin-bottom: 18px;
}

.metric-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
  box-shadow: 0 12px 32px rgba(10, 35, 29, 0.08);
}

.metric-card span {
  display: block;
  color: var(--muted);
  font-weight: 700;
  margin-bottom: 10px;
}

.metric-card strong {
  display: block;
  font-size: 30px;
  line-height: 1.1;
}

.admin-grid {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) minmax(360px, 1.2fr);
  gap: 18px;
}

.order-toolbar-left {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
}

.order-toolbar-left h2 {
  margin-bottom: 0;
}

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

.filter-button {
  padding: 8px 11px;
}

.filter-button.active {
  background: var(--ink);
  color: white;
}

.pagination {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding-top: 14px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.pagination div {
  display: flex;
  gap: 8px;
}

.pagination button {
  padding: 8px 11px;
}

.table-wrap {
  overflow: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 900px;
}

#orders-table {
  min-width: 1380px;
}

#addresses-table {
  min-width: 1520px;
}

#admins-table {
  min-width: 760px;
}

.compact-table table {
  min-width: 920px;
}

th,
td {
  text-align: left;
  border-bottom: 1px solid var(--line);
  padding: 10px;
  vertical-align: top;
  font-size: 13px;
}

th {
  color: var(--muted);
  background: #f7faf9;
  position: sticky;
  top: 0;
}

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

.mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.address-full {
  word-break: break-all;
  min-width: 280px;
}

.row-actions {
  min-width: 150px;
}

.row-actions button {
  padding: 7px 9px;
  margin: 0 6px 6px 0;
  white-space: nowrap;
}

.row-actions button:disabled {
  cursor: not-allowed;
  opacity: 0.65;
  background: #e8efec;
  color: var(--muted);
}

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

.pill {
  display: inline-block;
  padding: 3px 7px;
  border-radius: 999px;
  background: #e8efec;
  color: #243a34;
  font-size: 12px;
  font-weight: 700;
}

.pill.warn {
  background: #fff4df;
  color: var(--warn);
}

.pill.danger {
  background: #fee4e2;
  color: var(--danger);
}

pre {
  background: #0e1b18;
  color: #dce5e1;
  border-radius: 8px;
  padding: 12px;
  overflow: auto;
  max-height: 260px;
}

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

.setting-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: start;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.setting-row:first-child {
  padding-top: 0;
}

.setting-row:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.setting-title {
  font-weight: 800;
  margin-bottom: 6px;
}

.setting-value {
  color: var(--ink);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.setting-note {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  margin-top: 5px;
}

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

.setting-actions button,
.setting-editor-actions button {
  white-space: nowrap;
}

.setting-editor {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.setting-editor-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(6, 18, 15, 0.44);
}

.modal-card {
  width: min(440px, 100%);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 24px 70px rgba(10, 35, 29, 0.24);
  padding: 20px;
}

.modal-card h2 {
  margin-bottom: 10px;
}

.modal-message {
  color: var(--muted);
  line-height: 1.6;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.paid-modal-card {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 10px;
  width: min(360px, calc(100vw - 38px));
  text-align: center;
  border: 0;
  border-radius: 18px;
  padding: 26px 22px 20px;
  overflow: hidden;
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.28);
}

.paid-modal-card > * {
  position: relative;
}

#paid-modal-content {
  display: grid;
  justify-items: center;
  gap: 10px;
  width: 100%;
}

.paid-modal-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 86px;
  background: linear-gradient(135deg, rgba(107, 61, 244, 0.16), rgba(63, 114, 234, 0.18));
  pointer-events: none;
}

#paid-modal.underpaid .paid-modal-card::before {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.18), rgba(249, 115, 22, 0.16));
}

.paid-modal-icon {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border-radius: 999px;
  background: linear-gradient(135deg, #6b3df4, #2fcb96);
  color: white;
  font-size: 30px;
  font-weight: 900;
  line-height: 1;
  box-shadow: 0 10px 24px rgba(63, 114, 234, 0.28);
}

.paid-modal-icon.small {
  width: 42px;
  height: 42px;
  font-size: 24px;
}

.paid-modal-icon.warning {
  background: linear-gradient(135deg, #f59e0b, #f97316);
  box-shadow: 0 10px 24px rgba(234, 88, 12, 0.24);
}

.paid-modal-card h2 {
  margin-bottom: 0;
  font-size: 26px;
  line-height: 1.15;
}

.paid-modal-card p {
  margin: 0 0 8px;
  color: var(--muted);
  font-weight: 700;
}

.underpaid-summary {
  display: grid;
  gap: 0;
  width: 100%;
  padding: 4px 14px;
  border: 1px solid rgba(245, 158, 11, 0.2);
  border-radius: 13px;
  background: rgba(255, 247, 237, 0.82);
}

.underpaid-summary div {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 9px 0;
  border-bottom: 1px solid rgba(245, 158, 11, 0.14);
  font-size: 13px;
}

.underpaid-summary div:last-child {
  border-bottom: 0;
}

.underpaid-summary span {
  color: #8a5b18;
}

.underpaid-summary strong {
  color: #6b3f0d;
}

.receipt-header {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  text-align: left;
}

.receipt-header h2 {
  font-size: 22px;
}

.receipt-header p {
  margin: 2px 0 0;
}

.receipt-amount {
  width: 100%;
  border-radius: 12px;
  background: #f2f6ff;
  color: #10201c;
  padding: 13px 12px;
  font-size: 20px;
  font-weight: 900;
}

.receipt-list {
  width: 100%;
  display: grid;
  border-top: 1px solid var(--line);
  margin-top: 2px;
}

.receipt-list div {
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  text-align: left;
}

.receipt-list span {
  color: var(--muted);
  font-size: 13px;
}

.receipt-list strong {
  min-width: 0;
  font-size: 13px;
  overflow-wrap: anywhere;
  text-align: right;
}

.paid-modal-card button {
  min-width: 150px;
  border-radius: 999px;
  background: linear-gradient(135deg, #6b3df4, #3f72ea);
  padding: 11px 18px;
  box-shadow: 0 10px 24px rgba(63, 114, 234, 0.24);
}

.paid-modal-card button:hover {
  background: linear-gradient(135deg, #5b31db, #3565d6);
}

#paid-modal.underpaid .paid-modal-card button {
  background: linear-gradient(135deg, #f59e0b, #f97316);
  box-shadow: 0 10px 24px rgba(234, 88, 12, 0.2);
}

#paid-modal.underpaid .paid-modal-card button:hover {
  background: linear-gradient(135deg, #e99108, #ea6812);
}

#modal-input,
#modal-textarea {
  margin-top: 14px;
}

#modal-textarea {
  min-height: 108px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 18px;
}

@media (min-width: 901px) {
  .admin-shell {
    height: 100vh;
    overflow: hidden;
  }

  .admin-layout {
    height: calc(100vh - 48px);
    min-height: 0;
  }

  .admin-sidebar {
    height: 100%;
    overflow-y: auto;
  }

  .admin-content {
    height: 100%;
    overflow-y: auto;
  }
}

@media (max-width: 560px) {
  body.checkout-page {
    background: #171a27;
  }

  .checkout-shell {
    display: block;
    min-height: 100vh;
    padding: 16px;
    background:
      radial-gradient(circle at 50% -5%, rgba(115, 83, 251, 0.5), transparent 42%),
      radial-gradient(circle at 100% 90%, rgba(28, 194, 156, 0.18), transparent 42%),
      linear-gradient(155deg, #141722, #25293d 55%, #171a27);
    overflow: hidden;
  }

  .checkout-shell::before,
  .checkout-shell::after {
    display: none;
  }

  .checkout-panel {
    width: 100%;
    min-height: calc(100vh - 32px);
    border: 1px solid rgba(255, 255, 255, 0.74);
    border-radius: 18px;
    box-shadow: 0 24px 56px rgba(5, 8, 20, 0.34);
  }

  .order-panel {
    min-height: 0;
  }

  .checkout-statusbar {
    border-radius: 0;
  }

  .checkout-body {
    padding: 20px 22px 18px;
  }

  .order-body {
    padding: 28px 22px 24px;
  }

  .checkout-qr {
    width: min(230px, 76vw);
    height: auto;
  }
}

@media (max-width: 900px) {
  .admin-layout {
    grid-template-columns: 1fr;
  }

  .admin-sidebar {
    position: static;
  }

  .admin-nav {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .nav-button {
    text-align: center;
  }

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

  .admin-grid,
  .inline-form,
  .content-header,
  .section-actions {
    grid-template-columns: 1fr;
    display: grid;
  }

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

  .setting-actions {
    justify-content: flex-start;
  }
}
