@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:ital,wght@0,300;0,400;0,500;0,600;0,700;0,800;1,400;1,600&family=JetBrains+Mono:wght@400;500;600&display=swap');

:root {
  --font-sans: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: "JetBrains Mono", "SFMono-Regular", Consolas, monospace;
  --bg: #f8fafc;
  --bg-soft: #f1f5f9;
  --surface: #ffffff;
  --surface-2: #f8fafc;
  --surface-3: #e2e8f0;
  --text: #0f172a;
  --muted: #64748b;
  --subtle: #94a3b8;
  --line: #e2e8f0;
  --line-strong: #cbd5e1;
  --brand: #10b981;
  --brand-2: #059669;
  --brand-soft: #ecfdf5;
  --black: #0f172a;
  --white: #ffffff;
  --ok: #10b981;
  --ok-bg: #ecfdf5;
  --warn: #d97706;
  --warn-bg: #fffbeb;
  --bad: #ef4444;
  --bad-bg: #fef2f2;
  --info: #3b82f6;
  --info-bg: #eff6ff;
  --shadow-sm: 0 1px 3px rgba(15, 23, 42, .05);
  --shadow: 0 10px 25px -5px rgba(16, 185, 129, .08), 0 8px 10px -6px rgba(15, 23, 42, .04);
  --shadow-lg: 0 20px 40px -15px rgba(16, 185, 129, .15);
  --radius-xs: 6px;
  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 16px;
  --radius-xl: 22px;
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --sidebar: 264px;
}

html[data-theme=dark] {
  --bg: #090d16;
  --bg-soft: #0f172a;
  --surface: #111827;
  --surface-2: #1f2937;
  --surface-3: #374151;
  --text: #f8fafc;
  --muted: #94a3b8;
  --subtle: #64748b;
  --line: #1f2937;
  --line-strong: #374151;
  --brand: #10b981;
  --brand-2: #34d399;
  --brand-soft: #064e3b;
  --black: #f8fafc;
  --white: #111827;
  --ok-bg: #064e3b;
  --warn-bg: #451a03;
  --bad-bg: #450a0a;
  --info-bg: #172554;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, .3);
  --shadow: 0 10px 30px rgba(0, 0, 0, .4);
  --shadow-lg: 0 25px 60px rgba(0, 0, 0, .6);
}

* {
  box-sizing: border-box
}

html {
  color-scheme: light;
  background: var(--bg)
}

html[data-theme=dark] {
  color-scheme: dark
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.5;
  letter-spacing: 0;
  background:
    radial-gradient(circle at top left, rgba(37, 99, 235, .07), transparent 34rem),
    linear-gradient(135deg, var(--bg), var(--bg-soft));
  color: var(--text);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

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

h1,
h2,
h3,
h4,
h5,
h6,
p,
a,
b,
strong,
small,
label,
table,
th,
td,
button,
input,
textarea,
select {
  font-family: var(--font-sans)
}

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

button,
input,
textarea,
select {
  letter-spacing: 0
}

img {
  max-width: 100%;
  display: block
}

code {
  font-family: var(--font-mono);
  font-size: .9em;
  color: var(--brand)
}

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

:focus-visible {
  outline: 3px solid rgba(148, 103, 68, .26);
  outline-offset: 2px
}

::selection {
  background: var(--brand);
  color: #fff
}

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

.content-wrap {
  min-width: 0
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 18px 14px;
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  border-right: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(18px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 52px;
  padding: 8px 10px;
  border-radius: var(--radius);
}

.brand:hover {
  background: var(--surface-2)
}

.brand img {
  width: 40px;
  height: 40px;
  border-radius: var(--radius);
  object-fit: cover;
  box-shadow: var(--shadow-sm)
}

.brand span {
  display: flex;
  flex-direction: column;
  min-width: 0
}

.brand b {
  font-size: 14px;
  line-height: 1.15
}

.brand small {
  margin-top: 2px;
  font-size: 11px;
  color: var(--subtle);
  white-space: nowrap
}

.sidebar nav {
  display: grid;
  gap: 4px
}

.sidebar nav a {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 40px;
  padding: 9px 11px;
  border-radius: var(--radius-sm);
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  transition: background .16s ease, color .16s ease, transform .16s ease;
}

.sidebar nav a::before {
  content: "";
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border-radius: 7px;
  background: var(--surface-2);
  color: var(--brand);
  font-size: 11px;
  font-weight: 900;
  flex: 0 0 auto;
}

.sidebar nav a>svg,
.icon-btn>svg,
.btn>svg,
.secret-field button>svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: 0 0 auto
}

.sidebar nav a>svg {
  width: 18px;
  height: 18px;
  padding: 2px;
  border-radius: 7px;
  background: var(--surface-2);
  color: var(--brand);
  box-sizing: content-box
}

.sidebar nav a::before {
  display: none
}

.sidebar nav a:hover {
  background: var(--surface-2);
  color: var(--brand);
  transform: translateX(2px)
}

.sidebar nav a.active {
  background: var(--brand-soft);
  color: var(--brand)
}

.sidebar nav a.active::after {
  content: "";
  position: absolute;
  right: 8px;
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--brand);
}

.sidebar-foot {
  margin-top: auto;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-2);
  color: var(--muted);
  font-size: 12px;
}

.sidebar-foot a {
  display: inline-block;
  margin-top: 6px;
  color: var(--brand);
  font-weight: 800
}

.sidebar-backdrop {
  display: none
}

.health-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  background: var(--ok);
  border-radius: 50%;
  margin-right: 7px;
  box-shadow: 0 0 0 4px var(--ok-bg)
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  min-height: 68px;
  padding: 0 clamp(16px, 2.4vw, 30px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(18px);
}

.topbar small {
  display: block;
  color: var(--subtle);
  font-size: 11px;
  font-weight: 750;
  text-transform: uppercase;
  letter-spacing: .08em
}

.topbar strong {
  display: block;
  margin-top: 1px;
  font-size: 16px
}

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

.logout-form {
  display: inline-flex
}

.avatar {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: var(--black);
  color: var(--white);
  font-weight: 850;
  box-shadow: var(--shadow-sm);
}

.icon-btn {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: background .16s ease, border-color .16s ease, transform .16s ease;
}

.icon-btn:hover {
  background: var(--surface-2);
  border-color: var(--line-strong);
  transform: translateY(-1px)
}

.main-content {
  width: min(100%, 1480px);
  margin: 0 auto;
  padding: clamp(16px, 2.4vw, 30px)
}

.hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-5);
  margin: 0 0 var(--space-5);
}

.hero h1 {
  margin: 3px 0 5px;
  font-size: clamp(26px, 3vw, 38px);
  line-height: 1.08;
  font-weight: 850;
}

.hero p,
.panel p {
  margin: 0;
  color: var(--muted)
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 11px;
  line-height: 1.2;
  letter-spacing: .12em;
  color: var(--brand-2);
  font-weight: 850;
  text-transform: uppercase;
}

.eyebrow::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--brand)
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--space-3);
  margin-bottom: var(--space-4)
}

.metric,
.panel,
.health-card,
.login-card,
.pay-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.metric {
  padding: var(--space-4)
}

.metric small,
.health-card span,
.health-card small {
  display: block;
  color: var(--subtle);
  font-size: 12px;
  font-weight: 700
}

.metric strong {
  display: block;
  margin-top: 5px;
  font-size: clamp(22px, 2.4vw, 30px);
  line-height: 1.1
}

.panel {
  padding: var(--space-5);
  margin-bottom: var(--space-4)
}

.panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-4);
  margin-bottom: var(--space-4)
}

.panel h2 {
  margin: 0 0 3px;
  font-size: 17px;
  line-height: 1.25;
  font-weight: 850
}

.panel h3 {
  margin: 0 0 8px;
  font-size: 14px
}

.text-link {
  color: var(--brand);
  font-weight: 800;
  font-size: 13px;
  white-space: nowrap
}

.text-link:hover {
  text-decoration: underline;
  text-underline-offset: 3px
}

.two-col {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-4)
}

.health-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--space-3)
}

.health-card {
  padding: var(--space-4);
  background: var(--surface-2);
  box-shadow: none
}

.health-card b {
  display: inline-flex;
  margin: 7px 0;
  font-size: 13px
}

.status-chip,
.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: max-content;
  max-width: 100%;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  font-size: 11px;
  line-height: 1;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: .04em;
  white-space: nowrap;
}

.status-chip {
  padding: 9px 12px;
  box-shadow: var(--shadow-sm)
}

.badge {
  padding: 6px 9px
}

.status-chip::before,
.badge::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--subtle)
}

.healthy,
.online,
.connected,
.active,
.paid,
.sent,
.success,
.settlement,
.capture {
  color: var(--ok) !important;
  background: var(--ok-bg) !important;
  border-color: color-mix(in srgb, var(--ok) 22%, var(--line)) !important
}

.healthy::before,
.online::before,
.connected::before,
.active::before,
.paid::before,
.sent::before,
.success::before,
.settlement::before,
.capture::before {
  background: var(--ok)
}

.degraded,
.pending,
.manual_review,
.stale {
  color: var(--warn) !important;
  background: var(--warn-bg) !important;
  border-color: color-mix(in srgb, var(--warn) 24%, var(--line)) !important
}

.degraded::before,
.pending::before,
.manual_review::before,
.stale::before {
  background: var(--warn)
}

.disconnected,
.unavailable,
.failed,
.expired,
.cancelled,
.disabled,
.danger,
.error {
  color: var(--bad) !important;
  background: var(--bad-bg) !important;
  border-color: color-mix(in srgb, var(--bad) 24%, var(--line)) !important
}

.disconnected::before,
.unavailable::before,
.failed::before,
.expired::before,
.cancelled::before,
.disabled::before,
.danger::before,
.error::before {
  background: var(--bad)
}

.received,
.matched {
  color: var(--info) !important;
  background: var(--info-bg) !important;
  border-color: color-mix(in srgb, var(--info) 24%, var(--line)) !important
}

.received::before,
.matched::before {
  background: var(--info)
}

.table-wrap {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface)
}

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

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

th {
  position: sticky;
  top: 0;
  background: var(--surface-2);
  color: var(--subtle);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .07em;
  font-weight: 850;
  z-index: 1
}

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

tbody tr {
  transition: background .14s ease
}

tbody tr:hover {
  background: var(--surface-2)
}

td small {
  display: block;
  color: var(--subtle);
  font-size: 12px;
  margin-top: 2px
}

form {
  margin: 0
}

.panel form {
  display: grid;
  gap: var(--space-3)
}

.panel label,
.login-card label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.panel label small,
.login-card label small,
label small {
  font-weight: 650;
  color: var(--subtle);
  line-height: 1.4
}

.panel input,
.panel textarea,
.panel select,
.login-card input {
  width: 100%;
  min-height: 40px;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--text);
  border-radius: var(--radius-sm);
  padding: 9px 11px;
  outline: none;
  transition: border-color .14s ease, box-shadow .14s ease, background .14s ease;
}

.panel textarea {
  min-height: 112px;
  resize: vertical
}

.panel input:hover,
.panel textarea:hover,
.panel select:hover,
.login-card input:hover {
  border-color: var(--brand-2)
}

.panel input:focus,
.panel textarea:focus,
.panel select:focus,
.login-card input:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 4px rgba(148, 103, 68, .14)
}

.panel input:disabled,
.panel textarea:disabled,
.panel select:disabled,
.login-card input:disabled {
  opacity: .58;
  cursor: not-allowed;
  background: var(--surface-3)
}

.btn {
  min-height: 40px;
  width: max-content;
  max-width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
  padding: 9px 14px;
  font-weight: 850;
  font-size: 13px;
  line-height: 1;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: transform .14s ease, background .14s ease, border-color .14s ease, box-shadow .14s ease, opacity .14s ease;
}

.btn:hover {
  transform: translateY(-1px);
  background: var(--surface-2);
  border-color: var(--brand-2);
  box-shadow: var(--shadow)
}

.btn:active {
  transform: translateY(0)
}

.btn:disabled,
.btn.disabled {
  opacity: .55;
  cursor: not-allowed;
  transform: none
}

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

.btn.primary:hover {
  background: color-mix(in srgb, var(--brand) 86%, #000);
  border-color: color-mix(in srgb, var(--brand) 86%, #000)
}

.danger-btn {
  color: var(--bad);
  border-color: color-mix(in srgb, var(--bad) 32%, var(--line))
}

.danger-btn:hover {
  background: var(--bad-bg)
}

.action-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: var(--space-3)
}

.action-row form {
  display: inline-flex !important;
  gap: 0 !important
}

.alert {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin-bottom: var(--space-4);
  font-weight: 700;
}

.alert::before {
  content: "";
  width: 9px;
  height: 9px;
  border-radius: 999px;
  margin-top: 6px;
  flex: 0 0 auto
}

.alert.success {
  background: var(--ok-bg);
  color: var(--ok);
  border-color: color-mix(in srgb, var(--ok) 24%, var(--line))
}

.alert.success::before {
  background: var(--ok)
}

.alert.danger {
  background: var(--bad-bg);
  color: var(--bad);
  border-color: color-mix(in srgb, var(--bad) 24%, var(--line))
}

.alert.danger::before {
  background: var(--bad)
}

.secret-field {
  display: flex;
  gap: 8px
}

.secret-field input {
  min-width: 0
}

.secret-field button {
  min-width: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--muted);
  border-radius: var(--radius-sm);
  cursor: pointer;
}

details {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: var(--space-3);
  background: var(--surface-2)
}

summary {
  cursor: pointer;
  font-weight: 850;
  color: var(--brand);
  margin-bottom: var(--space-3)
}

.compact-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: var(--space-4) 0
}

.compact-grid .metric strong {
  font-size: 15px;
  word-break: break-word
}

.listener-log {
  margin-top: var(--space-4)
}

.webhook-status {
  padding: var(--space-3);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-2)
}

.webhook-status small {
  display: block;
  color: var(--subtle);
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: .06em
}

.webhook-status p {
  margin: 5px 0 0;
  word-break: break-word
}

.copied {
  color: var(--ok) !important;
  border-color: color-mix(in srgb, var(--ok) 28%, var(--line)) !important;
  background: var(--ok-bg) !important
}

.switch {
  display: flex !important;
  align-items: center;
  gap: 10px !important;
  color: var(--text) !important
}

.switch input {
  width: 18px !important;
  min-height: 18px !important;
  accent-color: var(--brand)
}

.inline-form {
  display: flex !important;
  grid-template-columns: 1fr auto !important;
  gap: 8px !important
}

.inline-form input {
  min-width: 150px
}

.qr-box,
.empty-qr,
.empty-state {
  min-height: 230px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-lg);
  display: grid;
  place-items: center;
  text-align: center;
  padding: var(--space-5);
  background: var(--surface-2);
  color: var(--muted);
}

.qr-box img {
  max-width: 260px;
  width: 100%;
  border-radius: var(--radius)
}

.qr-raw {
  word-break: break-all;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text)
}

.big-state {
  padding: var(--space-5);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, var(--surface-2), var(--surface));
}

.big-state small {
  display: block;
  color: var(--subtle);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .06em
}

.big-state strong {
  display: block;
  font-size: clamp(22px, 2.6vw, 32px);
  line-height: 1.1;
  margin: 6px 0
}

.code-card {
  overflow: auto;
  background: #171411;
  color: #f8efe4;
  border-radius: var(--radius);
  padding: var(--space-4);
  font-family: var(--font-mono);
  line-height: 1.8;
  font-size: 12px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .08);
}

.credential-panel {
  padding: var(--space-4);
  margin-bottom: var(--space-4);
  border: 1px solid color-mix(in srgb, var(--brand) 34%, var(--line));
  border-radius: var(--radius);
  background: linear-gradient(135deg, var(--surface), var(--brand-soft))
}

.credential-panel h2 {
  margin: 0 0 var(--space-3)
}

.login-page,
.pay-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: var(--space-5);
  background:
    radial-gradient(circle at 20% 15%, rgba(148, 103, 68, .18), transparent 26rem),
    linear-gradient(135deg, var(--bg), var(--bg-soft));
}

.login-card,
.pay-card {
  width: min(430px, 100%);
  padding: var(--space-8);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg)
}

.login-card img,
.pay-logo {
  width: 58px;
  height: 58px;
  object-fit: cover;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm)
}

.login-card h1 {
  margin: 18px 0 4px;
  font-size: 28px;
  line-height: 1.1
}

.login-card p {
  margin: 0 0 var(--space-5);
  color: var(--muted)
}

.login-card .btn {
  width: 100%;
  margin-top: 4px
}

.pay-card {
  text-align: center
}

.pay-card h1 {
  font-size: 34px;
  margin: 10px 0 4px
}

.pay-qr {
  width: min(320px, 100%);
  margin: 18px auto;
  border-radius: var(--radius)
}

.pay-breakdown {
  display: grid;
  gap: 8px;
  background: var(--surface-2);
  padding: 14px;
  border-radius: var(--radius);
  text-align: left;
  margin: 10px 0 14px
}

.pay-breakdown span {
  display: flex;
  justify-content: space-between;
  gap: 14px
}

.mobile-only {
  display: none
}

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

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

@media(max-width:980px) {
  .app-shell {
    grid-template-columns: 1fr
  }

  .sidebar {
    position: fixed;
    left: 0;
    top: 0;
    z-index: 60;
    width: min(86vw, var(--sidebar));
    transform: translateX(-105%);
    transition: transform .2s ease;
  }

  .sidebar.open {
    transform: translateX(0)
  }

  .sidebar-backdrop {
    position: fixed;
    inset: 0;
    z-index: 55;
    border: 0;
    background: rgba(23, 20, 17, .42);
    backdrop-filter: blur(2px);
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s ease;
    display: block
  }

  body.sidebar-open .sidebar-backdrop {
    opacity: 1;
    pointer-events: auto
  }

  .mobile-only {
    display: grid
  }

  .two-col {
    grid-template-columns: 1fr
  }

  .topbar {
    min-height: 62px
  }
}

@media(max-width:640px) {
  body {
    font-size: 13px
  }

  .main-content {
    padding: 14px
  }

  .hero {
    display: grid;
    gap: var(--space-3)
  }

  .hero h1 {
    font-size: 26px
  }

  .panel {
    padding: var(--space-4);
    border-radius: var(--radius)
  }

  .panel-head {
    display: grid
  }

  .metric-grid,
  .health-grid {
    grid-template-columns: 1fr
  }

  .compact-grid {
    grid-template-columns: 1fr
  }

  .metric {
    padding: var(--space-4)
  }

  .topbar small {
    display: none
  }

  .top-actions {
    gap: 8px
  }

  .login-card {
    padding: var(--space-6)
  }

  .action-row .btn,
  .panel form>.btn {
    width: 100%
  }

  .secret-field {
    align-items: stretch
  }

  .table-wrap {
    margin-inline: -4px;
    border-radius: var(--radius-sm)
  }
}

/* AutoKuy Pay v2.2 modern 2026 additions */
.content-wrap {
  min-height: 100vh;
  display: flex;
  flex-direction: column
}

.main-content {
  flex: 1
}

.site-footer,
.public-footer {
  text-align: center;
  padding: 18px 20px 24px;
  color: var(--subtle);
  font-size: 12px
}

.site-footer a,
.public-footer a {
  color: var(--brand);
  font-weight: 850
}

.sidebar {
  overflow-y: auto
}

.sidebar-foot {
  display: none !important
}

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

.setting-card {
  padding: 20px;
  min-height: 150px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: .18s ease
}

.setting-card:hover {
  transform: translateY(-2px);
  border-color: var(--brand-2);
  box-shadow: var(--shadow)
}

.setting-card::before {
  content: "⚙";
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: var(--brand-soft);
  color: var(--brand);
  font-size: 19px;
  margin-bottom: 16px
}

.setting-card b {
  font-size: 15px
}

.setting-card p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 12px
}

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

.subpanel {
  padding: 18px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg)
}

.mini-qr {
  width: 150px;
  height: 150px;
  object-fit: contain;
  margin: 12px auto 0;
  background: #fff;
  border-radius: 12px;
  padding: 8px
}

.notice-box {
  padding: 14px 16px;
  border: 1px solid var(--line);
  background: var(--brand-soft);
  border-radius: var(--radius)
}

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

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

.modern-pay {
  display: flex;
  min-height: 100vh;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px 16px
}

.modern-invoice {
  width: min(100%, 470px);
  padding: 22px
}

.invoice-top {
  display: flex;
  align-items: center;
  gap: 10px
}

.invoice-top>div {
  display: grid;
  flex: 1
}

.invoice-top small {
  color: var(--subtle)
}

.invoice-top b {
  font-size: 13px
}

.invoice-amount {
  text-align: center;
  padding: 22px 0 14px
}

.invoice-amount small {
  color: var(--muted)
}

.invoice-amount h1 {
  margin: 6px 0 2px;
  font-size: 36px
}

.invoice-amount p {
  margin: 0;
  color: var(--subtle)
}

.qr-frame {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
  text-align: center
}

.qr-frame .pay-qr {
  width: min(100%, 300px);
  margin: auto
}

.qr-frame small {
  display: block;
  margin-top: 8px;
  color: #756a5f
}

.invoice-meta {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin: 16px 0
}

.invoice-meta span {
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-2)
}

.invoice-meta small {
  display: block;
  color: var(--subtle);
  font-size: 11px
}

.invoice-meta b {
  display: block;
  margin-top: 3px;
  font-size: 13px
}

.countdown {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--warn-bg);
  color: var(--warn);
  margin-bottom: 12px
}

.paid-state {
  padding: 14px;
  text-align: center;
  border-radius: 12px;
  background: var(--ok-bg);
  color: var(--ok);
  margin-bottom: 12px
}

.paid-state b,
.paid-state span {
  display: block
}

.support-btn {
  width: 100%;
  margin-top: 6px
}

.pay-note {
  text-align: center;
  color: var(--subtle);
  font-size: 11px;
  margin: 14px 8px 0
}

.landing {
  min-height: 100vh;
  background: linear-gradient(135deg, var(--bg), var(--bg-soft))
}

.landing-nav {
  max-width: 1180px;
  margin: auto;
  padding: 18px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between
}

.landing-main,
.demo-wrap {
  max-width: 1180px;
  margin: auto;
  padding: 60px 22px
}

.landing-hero {
  max-width: 820px;
  padding: 40px 0 64px
}

.landing-hero h1 {
  font-size: clamp(40px, 7vw, 76px);
  line-height: .98;
  letter-spacing: -.045em;
  margin: 12px 0 18px
}

.landing-hero p {
  font-size: 18px;
  color: var(--muted);
  max-width: 720px
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px
}

.feature-grid article {
  padding: 22px;
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 18px
}

.feature-grid p {
  color: var(--muted)
}

.demo-wrap {
  max-width: 900px;
  padding-top: 30px
}

.demo-result {
  margin-top: 16px
}

@media(max-width:900px) {

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

  .qris-route-grid,
  .three-col {
    grid-template-columns: 1fr
  }
}

@media(max-width:640px) {

  .settings-grid,
  .feature-grid {
    grid-template-columns: 1fr
  }

  .setting-card {
    min-height: auto
  }

  .modern-pay {
    justify-content: flex-start;
    padding-top: 14px
  }

  .modern-invoice {
    padding: 16px
  }

  .invoice-amount h1 {
    font-size: 31px
  }

  .landing-main,
  .demo-wrap {
    padding: 30px 16px
  }

  .landing-hero {
    padding-top: 28px
  }

  .landing-hero h1 {
    font-size: 44px
  }

  .site-footer {
    padding-bottom: 84px
  }
}

/* Developer documentation */
.docs-layout {
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr);
  gap: 16px;
  align-items: start
}

.docs-nav {
  position: sticky;
  top: 86px;
  display: grid;
  gap: 4px;
  padding: 14px
}

.docs-nav>b {
  padding: 5px 8px 9px
}

.docs-nav a {
  padding: 8px;
  border-radius: 8px;
  color: var(--muted);
  font-weight: 700;
  font-size: 12px
}

.docs-nav a:hover {
  background: var(--surface-2);
  color: var(--brand)
}

.docs-section {
  scroll-margin-top: 90px
}

.docs-section h3 {
  margin-top: 20px
}

.docs-section .code-card {
  white-space: pre-wrap;
  word-break: break-word
}

.auth-switch {
  text-align: center;
  margin-top: 16px !important;
  font-size: 12px
}

.auth-switch a {
  color: var(--brand);
  font-weight: 850
}

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

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

  .docs-nav {
    position: static;
    grid-template-columns: repeat(3, minmax(0, 1fr))
  }
}

@media(max-width:640px) {
  .docs-nav {
    grid-template-columns: repeat(2, minmax(0, 1fr))
  }
}

/* Subscription Lock Banner */
.subscription-lock-card {
  margin-bottom: 24px;
  padding: 20px 24px;
  border-radius: 16px;
  border: 1px solid rgba(245, 158, 11, 0.35);
  background: linear-gradient(135deg, rgba(254, 243, 199, 0.75), rgba(253, 230, 138, 0.45));
  box-shadow: 0 10px 25px -5px rgba(245, 158, 11, 0.12), 0 4px 10px -2px rgba(0, 0, 0, 0.03);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  position: relative;
  overflow: hidden;
  font-family: var(--font-sans);
}

html[data-theme=dark] .subscription-lock-card {
  border-color: rgba(245, 158, 11, 0.3);
  background: linear-gradient(135deg, rgba(69, 26, 3, 0.6), rgba(120, 53, 15, 0.4));
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.subscription-lock-content {
  display: flex;
  align-items: center;
  gap: 14px;
  flex: 1;
}

.subscription-lock-icon {
  width: 44px;
  height: 44px;
  min-width: 44px;
  border-radius: 12px;
  background: rgba(245, 158, 11, 0.18);
  border: 1px solid rgba(245, 158, 11, 0.3);
  color: #d97706;
  display: grid;
  place-items: center;
  font-size: 20px;
}

html[data-theme=dark] .subscription-lock-icon {
  background: rgba(245, 158, 11, 0.2);
  color: #fbbf24;
}

.subscription-lock-text h3 {
  font-size: 15px;
  font-weight: 800;
  color: #92400e;
  margin: 0 0 3px;
  letter-spacing: -0.01em;
  display: flex;
  align-items: center;
  gap: 8px;
}

html[data-theme=dark] .subscription-lock-text h3 {
  color: #fef3c7;
}

.subscription-lock-text p {
  margin: 0;
  color: #b45309;
  font-size: 13.5px;
  line-height: 1.5;
  font-weight: 500;
}

html[data-theme=dark] .subscription-lock-text p {
  color: #fde68a;
}

.subscription-lock-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #ffffff !important;
  padding: 11px 22px;
  border-radius: 12px;
  font-weight: 750;
  font-size: 13.5px;
  text-decoration: none;
  white-space: nowrap;
  box-shadow: 0 6px 16px -2px rgba(217, 119, 6, 0.35);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  border: none;
  cursor: pointer;
}

.subscription-lock-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 20px -2px rgba(217, 119, 6, 0.45);
  background: linear-gradient(135deg, #fbbf24, #d97706);
}

.subscription-lock-btn:active {
  transform: translateY(0);
}

@media (max-width: 640px) {
  .subscription-lock-card {
    flex-direction: column;
    align-items: stretch;
    padding: 18px 16px;
    gap: 16px;
  }
  
  .subscription-lock-content {
    align-items: flex-start;
  }
  
  .subscription-lock-btn {
    width: 100%;
    text-align: center;
    padding: 12px 18px;
    font-size: 14px;
  }
}

/* Google Auth Components */
.auth-divider {
  display: flex;
  align-items: center;
  text-align: center;
  margin: 18px 0;
  color: var(--subtle);
  font-size: 12px;
  font-weight: 600;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  border-bottom: 1px solid var(--line);
}

.auth-divider span {
  padding: 0 12px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.btn-google {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 11px 18px;
  border-radius: var(--radius-sm, 10px);
  border: 1px solid var(--line-strong, #cbd5e1);
  background: var(--surface, #ffffff);
  color: var(--text, #0f172a);
  font-weight: 700;
  font-size: 13.5px;
  text-decoration: none;
  box-shadow: var(--shadow-sm);
  transition: all 0.2s ease;
  cursor: pointer;
}

.btn-google:hover {
  background: var(--surface-2, #f8fafc);
  border-color: #94a3b8;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.btn-google svg {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
}