@import url("https://db.onlinewebfonts.com/c/08e020de1811ec4489f82d1247a42c09?family=Helvetica+Now+Text");

:root {
  --bg: #f5f5f7;
  --surface: #ffffff;
  --surface-subtle: #fbfbfd;
  --surface-quiet: #f0f2f5;
  --text: #1d1d1f;
  --text-soft: #424245;
  --muted: #6e6e73;
  --border: #d9d9df;
  --border-soft: #ececf0;
  --accent: #0071e3;
  --accent-strong: #0060c9;
  --danger: #b42318;
  --warning: #9f6200;
  --success: #167c4c;
  --radius-card: 16px;
  --radius-control: 12px;
  --radius-pill: 999px;
  --shadow-soft: 0 8px 18px rgba(29, 29, 31, 0.08);
  --shadow-panel: 0 14px 34px rgba(29, 29, 31, 0.1);
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  color: var(--text);
  font-family: "Helvetica Now Text", -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--bg);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
}

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

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

button,
a,
input,
select {
  touch-action: manipulation;
}

[hidden] {
  display: none !important;
}

svg {
  display: block;
  width: 100%;
  height: auto;
}

code {
  font-family: "SFMono-Regular", ui-monospace, Menlo, Consolas, monospace;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 3px solid rgba(0, 113, 227, 0.28);
  outline-offset: 2px;
}

.home-page {
  min-height: 100dvh;
  background: #101112;
}

.home-shell {
  min-height: 100dvh;
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: grid;
  place-items: center;
  padding: 92px 24px 84px;
}

.home-video,
.home-overlay {
  position: absolute;
  inset: 0;
}

.home-video {
  z-index: -3;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.9) contrast(1.04);
}

.home-overlay {
  z-index: -2;
  background: linear-gradient(180deg, rgba(16, 17, 18, 0.54), rgba(16, 17, 18, 0.14) 42%, rgba(16, 17, 18, 0.68));
}

.home-nav {
  position: absolute;
  top: 20px;
  left: 20px;
  right: 20px;
  z-index: 2;
  display: flex;
  justify-content: flex-end;
}

.home-glass-link {
  min-width: 86px;
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.16);
  color: rgba(255, 255, 255, 0.94);
  font-size: 14px;
  font-weight: 700;
  backdrop-filter: blur(18px) saturate(150%);
  -webkit-backdrop-filter: blur(18px) saturate(150%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.28);
  transition: transform 180ms var(--ease), background 180ms var(--ease);
}

.home-glass-link:hover {
  background: rgba(255, 255, 255, 0.22);
}

.home-glass-link:active {
  transform: scale(0.98);
}

.home-center {
  width: min(820px, 100%);
  display: grid;
  justify-items: center;
  text-align: center;
  color: #fff;
}

.home-center h1 {
  max-width: 860px;
  margin: 0;
  color: #fff;
  font-size: clamp(36px, 5vw, 64px);
  line-height: 1.08;
  letter-spacing: -0.018em;
  font-weight: 750;
  text-wrap: balance;
  text-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.contact-lines {
  position: absolute;
  right: 30px;
  bottom: 70px;
  z-index: 2;
  width: 274px;
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 14px 16px;
  border-radius: 14px;
  color: rgba(255, 255, 255, 0.86);
  font-size: 13px;
  line-height: 1.45;
  text-align: left;
  font-style: normal;
}

.liquid-glass {
  background: rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(18px) saturate(150%);
  -webkit-backdrop-filter: blur(18px) saturate(150%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.24), 0 8px 18px rgba(0, 0, 0, 0.16);
}

.home-shell footer {
  position: absolute;
  left: 24px;
  right: 24px;
  bottom: 26px;
  z-index: 2;
  color: rgba(255, 255, 255, 0.68);
  text-align: center;
  font-size: 13px;
}

.login-page,
.pay-page {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 24px;
  background: var(--bg);
}

.auth-shell,
.pay-shell {
  width: min(430px, 100%);
}

.back-link {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  margin-bottom: 14px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
}

.auth-panel,
.pay-panel {
  border-radius: 20px;
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.auth-panel {
  padding: 28px;
}

.auth-panel h1,
.pay-panel h1 {
  margin: 0;
  color: var(--text);
  letter-spacing: -0.018em;
}

.auth-panel h1 {
  margin-bottom: 22px;
  font-size: 26px;
  line-height: 1.18;
}

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

label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.3;
}

input,
select {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--border);
  border-radius: var(--radius-control);
  background: var(--surface);
  color: var(--text);
  padding: 0 12px;
  outline: none;
  transition: border-color 180ms var(--ease), box-shadow 180ms var(--ease), background 180ms var(--ease);
}

input::placeholder {
  color: #8b8b91;
  opacity: 1;
}

input:focus,
select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(0, 113, 227, 0.14);
}

input:disabled,
select:disabled,
button:disabled {
  opacity: 0.46;
  cursor: not-allowed;
}

.button,
.icon-button {
  min-height: 42px;
  border: 0;
  border-radius: var(--radius-pill);
  background: var(--surface-quiet);
  color: var(--text);
  padding: 0 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: transform 180ms var(--ease), background 180ms var(--ease), color 180ms var(--ease);
}

.button:hover,
.icon-button:hover {
  background: #e8ebef;
}

.button:active,
.icon-button:active {
  transform: scale(0.98);
}

.button.primary {
  background: var(--accent);
  color: #fff;
}

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

.button.ghost {
  background: var(--surface-quiet);
  color: var(--text-soft);
}

.button.danger,
.button.primary.danger,
.icon-button.danger {
  background: #fff1f0;
  color: var(--danger);
}

.button.primary.danger:hover,
.button.danger:hover,
.icon-button.danger:hover {
  background: #ffe4e0;
}

.button.wide {
  width: 100%;
}

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

.error-text {
  min-height: 22px;
  margin: 0;
  color: var(--danger);
  font-size: 14px;
}

.login-contact-card {
  position: fixed;
  right: 28px;
  bottom: 24px;
  width: 238px;
  margin: 0;
  padding: 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.88);
  color: var(--muted);
  font-size: 12px;
  line-height: 1.65;
  font-style: normal;
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(18px) saturate(150%);
  -webkit-backdrop-filter: blur(18px) saturate(150%);
}

.login-contact-card strong {
  display: block;
  margin-bottom: 5px;
  color: var(--text);
}

.pay-page {
  align-items: start;
  padding-top: max(22px, env(safe-area-inset-top));
  padding-bottom: max(24px, env(safe-area-inset-bottom));
}

.pay-panel {
  padding: 18px;
}

.pay-header {
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
  color: var(--muted);
  font-size: 13px;
}

.pay-header strong {
  display: block;
  margin-top: 3px;
  color: var(--text);
  font-size: 14px;
}

.pay-label,
.product-label,
.payment-amount > span {
  color: var(--muted);
  font-size: 13px;
}

#payStatus {
  min-height: 26px;
  display: inline-flex;
  align-items: center;
  border-radius: var(--radius-pill);
  padding: 0 9px;
  background: var(--surface-quiet);
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

#payStatus[data-tone="success"] {
  background: #e9f7ef;
  color: var(--success);
}

#payStatus[data-tone="danger"] {
  background: #fff1f0;
  color: var(--danger);
}

.product-summary {
  border-radius: 18px;
  background: var(--surface-subtle);
  padding: 18px;
}

.product-summary h1 {
  margin: 8px 0 8px;
  font-size: 24px;
  line-height: 1.22;
  text-wrap: balance;
}

.product-summary p,
.pay-trust,
.mock-panel p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.payment-amount {
  margin: 26px 0 20px;
  text-align: center;
}

.amount-display {
  display: block;
  margin-top: 9px;
  color: var(--text);
  font-size: clamp(48px, 15vw, 62px);
  line-height: 1;
  letter-spacing: -0.032em;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.amount-input {
  margin: 0 0 16px;
}

.amount-input small {
  color: var(--muted);
  font-size: 12px;
}

.pay-panel .button.primary.wide {
  min-height: 54px;
  font-size: 17px;
}

.pay-trust {
  margin-top: 12px;
  text-align: center;
  font-size: 12px;
}

.order-line {
  margin-top: 14px;
  color: #8a8a90;
  text-align: center;
  font-size: 12px;
  line-height: 1.45;
  word-break: break-all;
}

.order-line code {
  color: inherit;
  font-size: 12px;
}

.mock-panel {
  margin-top: 16px;
  padding: 14px;
  border-radius: 16px;
  background: var(--surface-quiet);
}

.mock-panel p {
  margin-bottom: 12px;
}

.admin-page {
  min-height: 100dvh;
  display: grid;
  grid-template-columns: 226px minmax(0, 1fr);
  background: var(--bg);
}

.admin-sidebar {
  position: sticky;
  top: 0;
  height: 100dvh;
  padding: 22px 14px;
  border-right: 1px solid var(--border-soft);
  background: rgba(255, 255, 255, 0.9);
  overflow-y: auto;
}

.admin-mark {
  margin: 0 8px 22px;
  color: var(--text);
  font-size: 18px;
  font-weight: 760;
  letter-spacing: -0.014em;
}

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

.admin-nav a {
  min-height: 42px;
  display: flex;
  align-items: center;
  border-radius: var(--radius-control);
  padding: 0 12px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
  transition: background 180ms var(--ease), color 180ms var(--ease);
}

.admin-nav a:hover,
.admin-nav a.active {
  background: var(--surface-quiet);
  color: var(--text);
}

.admin-main {
  min-width: 0;
  padding: 26px;
}

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

.page-kicker {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 13px;
}

.admin-header h1 {
  margin: 0;
  color: var(--text);
  font-size: 30px;
  line-height: 1.12;
  letter-spacing: -0.02em;
}

.admin-user {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border-radius: var(--radius-pill);
  padding: 0 4px 0 14px;
  background: var(--surface);
  color: var(--text-soft);
  font-size: 13px;
  box-shadow: 0 1px 2px rgba(29, 29, 31, 0.06);
}

.admin-content {
  display: grid;
  gap: 16px;
}

.panel,
.metric {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-card);
}

.panel {
  padding: 18px;
}

.metric {
  min-height: 116px;
  display: grid;
  align-content: space-between;
  padding: 16px;
}

.metric span,
.panel-title span,
.muted-line,
.empty,
.pagination-row,
.detail-list dt,
.settings-list span {
  color: var(--muted);
}

.metric span {
  font-size: 13px;
}

.metric strong {
  display: block;
  margin-top: 12px;
  color: var(--text);
  font-size: 27px;
  line-height: 1;
  letter-spacing: -0.018em;
  font-variant-numeric: tabular-nums;
}

.metric-compare {
  margin-top: 10px;
  font-size: 12px;
  font-weight: 700;
  font-style: normal;
}

.metric-compare.up {
  color: var(--success);
}

.metric-compare.down {
  color: var(--danger);
}

.metric-compare.flat {
  color: var(--muted);
}

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

.dashboard-filter-panel {
  padding: 14px;
}

.date-filter,
.quick-actions,
.row-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 10px;
}

.date-filter label {
  min-width: 150px;
}

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

.panel h2,
.panel-title h2 {
  margin: 0;
  color: var(--text);
  font-size: 18px;
  line-height: 1.25;
  letter-spacing: -0.01em;
}

.panel-title span {
  font-size: 13px;
}

.two-col {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(280px, 0.75fr);
  gap: 16px;
}

.list {
  display: grid;
  gap: 0;
}

.list-row {
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--border-soft);
  padding: 12px 0;
}

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

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

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

.list-row span,
.muted-line {
  margin-top: 4px;
  font-size: 12px;
}

.list-row em {
  color: var(--text);
  font-style: normal;
  font-weight: 750;
}

.chart-wrap {
  overflow: hidden;
  border-radius: 14px;
  background: var(--surface-subtle);
  padding: 6px;
}

.axis {
  stroke: #d7d9df;
  stroke-width: 1;
}

.trend-line {
  fill: none;
  stroke: var(--accent);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.trend-dot {
  fill: var(--accent);
}

svg text {
  fill: var(--muted);
  font-size: 12px;
}

.table-wrap {
  overflow-x: auto;
}

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

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

th {
  color: var(--muted);
  font-weight: 700;
}

td {
  color: var(--text-soft);
}

td strong {
  color: var(--text);
}

td code {
  color: var(--text);
  font-size: 12px;
}

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

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

.pill {
  min-height: 26px;
  display: inline-flex;
  align-items: center;
  border-radius: var(--radius-pill);
  padding: 0 9px;
  background: var(--surface-quiet);
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
  font-style: normal;
  white-space: nowrap;
}

.pill.success {
  background: #e9f7ef;
  color: var(--success);
}

.pill.pending,
.pill.refunding {
  background: #fff5df;
  color: var(--warning);
}

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

.pill.refunded,
.pill.timeout {
  background: #edf1f5;
  color: #405160;
}

.form-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: end;
}

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

.field-note {
  grid-column: 1 / -1;
  margin: -8px 0 0;
  color: var(--accent-strong);
  font-size: 12px;
  line-height: 1.4;
}

.merchant-filters {
  display: flex;
  align-items: end;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 14px;
}

.merchant-filters label {
  width: min(280px, 100%);
}

.channel-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 26px;
  color: var(--text-soft);
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}

.channel-badge i {
  width: 9px;
  height: 9px;
  flex: 0 0 9px;
  border-radius: 50%;
  background: var(--channel-color);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--channel-color) 16%, transparent);
}

.merchant-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--border-soft);
}

.merchant-stats span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
}

.merchant-stats strong {
  color: var(--text);
}

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

.input-with-note {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
}

.input-with-note span {
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  border-radius: var(--radius-pill);
  padding: 0 10px;
  background: var(--surface-quiet);
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.form-divider {
  height: 1px;
  background: var(--border-soft);
  margin: 2px 0;
}

.amount-mode-group {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 16px;
  border: 0;
  margin: 0;
  padding: 0;
}

.amount-mode-group legend {
  width: 100%;
  margin: 0 0 2px;
  color: var(--muted);
  font-size: 13px;
}

.amount-mode-group label,
.checkbox-row label,
.download-modal label {
  display: inline-flex;
  grid-template-columns: none;
  align-items: center;
  gap: 7px;
  color: var(--text-soft);
  font-size: 14px;
}

.amount-mode-group input,
.checkbox-row input,
.download-modal input[type="radio"],
.download-modal input[type="checkbox"],
.check-col input {
  width: 16px;
  min-height: 16px;
  padding: 0;
}

.amount-section {
  display: grid;
  gap: 12px;
  border-radius: 14px;
  background: var(--surface-subtle);
  padding: 14px;
}

.amount-section h3 {
  margin: 0;
  color: var(--text-soft);
  font-size: 14px;
  font-weight: 750;
}

.checkbox-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 16px;
  min-height: 44px;
}

.checkbox-row > span {
  color: var(--muted);
  font-size: 13px;
}

.checkline {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
}

.checkline input {
  width: 18px;
  min-height: 18px;
}

.settings-list {
  display: grid;
  gap: 0;
}

.settings-list div {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  border-bottom: 1px solid var(--border-soft);
  padding: 14px 0;
}

.settings-list div:first-child {
  padding-top: 0;
}

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

.settings-list strong {
  color: var(--text);
  text-align: right;
  word-break: break-all;
}

.order-title-row {
  align-items: flex-start;
}

.order-alerts {
  display: grid;
  gap: 8px;
  margin-bottom: 14px;
}

.order-alerts div {
  border-radius: 12px;
  background: #fff5df;
  color: var(--warning);
  padding: 10px 12px;
  font-size: 14px;
}

.order-tabs-wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 14px;
  align-items: start;
  margin-bottom: 14px;
}

.order-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.order-tab {
  min-height: 38px;
  border: 0;
  border-radius: var(--radius-pill);
  background: var(--surface-quiet);
  color: var(--text-soft);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  font-weight: 750;
  transition: transform 180ms var(--ease), background 180ms var(--ease), color 180ms var(--ease);
}

.order-tab:hover {
  background: #e8ebef;
}

.order-tab:active {
  transform: scale(0.98);
}

.order-tab em {
  min-width: 22px;
  min-height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-pill);
  padding: 0 7px;
  background: rgba(255, 255, 255, 0.72);
  color: inherit;
  font-size: 12px;
  font-style: normal;
}

.order-tab.active {
  background: var(--text);
  color: #fff;
}

.failure-analysis {
  display: grid;
  gap: 8px;
  border-radius: 14px;
  background: var(--surface-subtle);
  padding: 12px;
}

.failure-analysis strong {
  font-size: 14px;
}

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

.failure-analysis button {
  position: relative;
  overflow: hidden;
  min-height: 34px;
  border: 0;
  border-radius: 10px;
  background: var(--surface);
  padding: 0 10px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  text-align: left;
}

.failure-analysis button span,
.failure-analysis button em {
  position: relative;
  z-index: 1;
}

.failure-analysis button em {
  color: var(--danger);
  font-style: normal;
  font-size: 12px;
  font-weight: 750;
}

.failure-analysis button i {
  position: absolute;
  left: 0;
  bottom: 0;
  width: var(--w);
  height: 3px;
  background: var(--danger);
}

.failure-analysis.muted {
  align-content: start;
}

.order-filters {
  display: grid;
  grid-template-columns: repeat(6, minmax(120px, 1fr));
  gap: 12px;
  align-items: end;
  margin-bottom: 12px;
}

.active-filter {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  color: var(--danger);
  font-size: 14px;
}

.orders-table tr[data-order-row] {
  cursor: pointer;
}

.orders-table tr[data-order-row]:hover {
  background: var(--surface-subtle);
}

.check-col {
  width: 44px;
}

.pagination-row {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
  font-size: 14px;
}

.pagination-row label {
  display: inline-flex;
  grid-template-columns: none;
  align-items: center;
  gap: 8px;
}

.pagination-row select {
  min-height: 34px;
  width: 86px;
  padding: 0 8px;
}

.drawer-backdrop,
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 40;
  background: rgba(29, 29, 31, 0.34);
}

.order-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 50;
  width: min(480px, 100%);
  background: var(--surface);
  box-shadow: -12px 0 28px rgba(29, 29, 31, 0.14);
  padding: 22px;
  overflow-y: auto;
}

.order-drawer header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-direction: row-reverse;
  margin-bottom: 18px;
}

.order-drawer h2,
.modal-panel h2 {
  margin: 0;
  color: var(--text);
  font-size: 21px;
  line-height: 1.25;
  letter-spacing: -0.014em;
}

.detail-list {
  display: grid;
  gap: 0;
  margin: 0;
}

.detail-list div {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 14px;
  border-bottom: 1px solid var(--border-soft);
  padding: 12px 0;
}

.detail-list dd {
  margin: 0;
  color: var(--text-soft);
  word-break: break-all;
}

.drawer-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.modal-panel {
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 50;
  width: min(560px, calc(100vw - 32px));
  max-height: calc(100dvh - 48px);
  overflow-y: auto;
  border-radius: 20px;
  background: var(--surface);
  box-shadow: var(--shadow-panel);
  padding: 22px;
}

.modal-panel p {
  margin: 14px 0;
  color: var(--muted);
  line-height: 1.5;
}

.confirm-lines {
  display: grid;
  gap: 8px;
  border-radius: 14px;
  background: var(--surface-subtle);
  padding: 12px;
}

.confirm-lines span {
  color: var(--muted);
}

.confirm-lines strong {
  color: var(--text);
}

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

.download-modal fieldset {
  border: 0;
  border-radius: 14px;
  background: var(--surface-subtle);
  padding: 12px;
  margin: 14px 0;
  display: grid;
  gap: 10px;
}

.download-modal legend {
  color: var(--muted);
  font-size: 13px;
  padding: 0;
}

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

.empty {
  margin: 0;
  font-size: 14px;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  z-index: 70;
  transform: translate(-50%, 20px);
  opacity: 0;
  pointer-events: none;
  border-radius: var(--radius-pill);
  background: var(--text);
  color: #fff;
  padding: 10px 16px;
  font-size: 14px;
  transition: opacity 200ms var(--ease), transform 200ms var(--ease);
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

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

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

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

  .admin-sidebar {
    position: static;
    height: auto;
    border-right: 0;
    border-bottom: 1px solid var(--border-soft);
    padding: 16px;
  }

  .admin-nav {
    display: flex;
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .admin-nav a {
    white-space: nowrap;
  }

  .admin-main {
    padding: 18px;
  }

  .two-col,
  .order-tabs-wrap {
    grid-template-columns: 1fr;
  }

  .form-grid,
  .order-filters,
  .field-checks {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  input,
  select {
    min-width: 0;
  }

  .home-shell {
    padding: 86px 18px 156px;
  }

  .home-center h1 {
    font-size: 38px;
  }

  .contact-lines {
    left: 18px;
    right: 18px;
    bottom: 72px;
    width: auto;
  }

  .login-page,
  .pay-page {
    padding: 16px;
  }

  .login-contact-card {
    position: static;
    width: min(430px, 100%);
    margin: 18px auto 0;
  }

  .auth-panel {
    padding: 24px;
  }

  .pay-panel {
    padding: 16px;
    border-radius: 20px;
  }

  .admin-header,
  .panel-title,
  .order-title-row,
  .date-filter,
  .quick-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .admin-page,
  .admin-main {
    overflow-x: hidden;
  }

  .admin-content,
  .panel,
  .dashboard-filter-panel,
  .date-filter,
  .quick-actions,
  .order-filters {
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }

  .admin-user {
    width: 100%;
    justify-content: space-between;
  }

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

  .date-filter label,
  .order-filters label,
  .button,
  .icon-button {
    width: 100%;
    min-width: 0;
  }

  .input-with-note {
    grid-template-columns: 1fr;
  }

  .modal-actions,
  .drawer-actions,
  .row-actions {
    flex-direction: column;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.001ms !important;
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
  }
}

@media (prefers-reduced-transparency: reduce) {
  .home-glass-link,
  .liquid-glass,
  .login-contact-card {
    background: rgba(255, 255, 255, 0.94);
    color: var(--text);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
}
