* { box-sizing: border-box; }
:root {
  color-scheme: dark;
  --bg: #000;
  --panel: #121212;
  --panel2: #11151f;
  --border: #252932;
  --text: #f6f7fa;
  --muted: #9297a3;
  --accent: #71e2d7;
  --pink: #df397e;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}
html { min-width: 280px; min-height: 100%; background: var(--bg); scroll-padding-bottom: 110px; }
body { margin: 0; min-height: 100vh; min-height: 100dvh; color: var(--text); background: var(--bg); font-size: 14px; line-height: 1.5; overflow-x: clip; }
body.light { color-scheme: light; --bg: #f3f5f7; --panel: #fff; --panel2: #e9edf3; --border: #d6dde5; --text: #17232c; --muted: #62717e; --accent: #157f76; --pink: #ba2865; }
button, input, select, textarea { font: inherit; }
button, a, input, select, textarea { -webkit-tap-highlight-color: transparent; }
button, a { touch-action: manipulation; }
button { cursor: pointer; }
button:disabled, input:disabled, select:disabled { opacity: .48; cursor: not-allowed; }
button, a { -webkit-user-select: none; user-select: none; }
button:focus-visible, a:focus-visible, summary:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; }
svg { flex-shrink: 0; vertical-align: middle; }
h1, h2, h3, p { overflow-wrap: anywhere; }
[hidden] { display: none !important; }
.app-main { width: 100%; min-width: 0; min-height: 100vh; min-height: 100dvh; }
.page { width: 100%; min-width: 0; padding: 24px 24px calc(104px + env(safe-area-inset-bottom)); }
.page-header { position: relative; display: grid; grid-template-columns: minmax(36px, 1fr) auto minmax(36px, 1fr); align-items: center; gap: 12px; min-height: 52px; margin: 0 0 24px; }
.page-header h1, .page-header h2 { grid-column: 2; margin: 0; font-size: 20px; font-weight: 700; line-height: 1.35; text-align: center; }
.page-back { display: inline-flex; align-items: center; justify-content: center; justify-self: start; width: 38px; height: 38px; padding: 7px; border: 0; border-radius: 11px; color: var(--text); background: transparent; }
.page-back:hover { background: var(--panel2); }
.header-action { grid-column: 3; display: inline-flex; align-items: center; justify-content: center; justify-self: end; gap: 6px; min-height: 36px; padding: 7px 9px; border: 0; border-radius: 9px; background: transparent; color: var(--accent); font-size: 12px; text-align: right; }
.panel { min-width: 0; padding: 22px; border: 1px solid var(--border); border-radius: 22px; background: var(--panel); }
.muted { color: var(--muted); }
.accent { color: var(--accent); }
.small { font-size: 12px; }
.amount { font-variant-numeric: tabular-nums; font-weight: 750; letter-spacing: -.025em; overflow-wrap: anywhere; }
.coin { display: inline-flex; align-items: center; gap: 5px; font-variant-numeric: tabular-nums; }
.coin img { display: inline-block; width: 16px; height: 16px; flex: 0 0 16px; object-fit: contain; }
.coin-icon { display: inline-grid; place-items: center; width: 16px; height: 16px; flex: 0 0 16px; border-radius: 50%; color: #e3fff4; background: #4eac87; font-size: 10px; font-style: normal; font-weight: 600; }
.pill { display: inline-flex; align-items: center; justify-content: center; gap: 5px; padding: 4px 9px; border: 1px solid var(--border); border-radius: 30px; color: var(--muted); background: var(--panel2); font-size: 10px; line-height: 1.4; white-space: nowrap; }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; }
.stat-grid > div { min-width: 0; padding: 16px; border: 1px solid var(--border); border-radius: 16px; background: var(--panel2); }
.stat-grid strong { display: block; font-size: 23px; font-weight: 750; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.stat-grid p, .stat-grid small, .stat-grid > div > span { margin: 5px 0 0; color: var(--muted); font-size: 11px; }
.empty { display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 12px; min-height: 230px; padding: 36px 20px; color: var(--muted); text-align: center; }
.empty h2, .empty h3 { margin: 0; color: var(--text); font-size: 18px; }
.empty p { max-width: 380px; margin: 0; font-size: 12px; }
.empty > svg { color: var(--muted); opacity: .65; }
.row, .row-between { display: flex; align-items: center; gap: 12px; min-width: 0; }
.row-between { justify-content: space-between; }
.stack { display: grid; gap: 16px; min-width: 0; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 47px; padding: 12px 20px; border: 1px solid transparent; border-radius: 13px; color: var(--text); background: var(--panel2); font-size: 13px; font-weight: 650; line-height: 1.35; text-align: center; text-decoration: none; transition: filter .15s, border-color .15s; }
.btn:hover:not(:disabled) { filter: brightness(1.12); }
.btn-primary { color: #fff; border-color: #72ddcf55; background: linear-gradient(100deg, #51c6ba 0%, #9d3767 47%, #a33a6c 57%, #51c6ba 100%); box-shadow: 0 0 20px #cf397a12; }
.btn-secondary { border-color: var(--border); color: var(--text); background: var(--panel2); }
.btn-white { color: #111; border-color: #fff; background: #fff; }
.btn-full { width: 100%; }
.btn-danger { color: #f68caf; border-color: #9b325855; background: #86274622; }
.btn-small { min-height: 34px; padding: 8px 12px; border-radius: 9px; font-size: 11px; }
.field { display: grid; gap: 8px; min-width: 0; }
.field-label { display: block; color: var(--text); font-size: 12px; font-weight: 550; }
.field-input { display: block; width: 100%; min-width: 0; min-height: 50px; padding: 13px 15px; border: 1px solid var(--border); border-radius: 12px; outline: 0; color: var(--text); background: var(--panel2); font-size: 14px; line-height: 1.45; transition: border-color .15s, box-shadow .15s; }
.field-input::placeholder { color: var(--muted); opacity: .8; }
.field-input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px #71e2d70c; outline: 0; }
.field-input[aria-invalid='true'] { border-color: var(--pink); }
textarea.field-input { min-height: 112px; resize: vertical; }
select.field-input { cursor: pointer; }
.form-error { margin: 0; color: #f17ba4; font-size: 12px; line-height: 1.6; }
.form-help { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.6; }
.skip-link { position: fixed; z-index: 150; left: 12px; top: -100px; padding: 11px 16px; border-radius: 8px; color: #071310; background: #71e2d7; font-size: 13px; }
.skip-link:focus { top: 10px; }
.bottom-nav { position: fixed; z-index: 50; bottom: 0; left: 0; right: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); align-items: end; min-height: 82px; padding: 8px 16px max(8px, env(safe-area-inset-bottom)); border-top: 1px solid var(--border); background: #030504f5; box-shadow: 0 -8px 24px #0002; backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); }
.bottom-nav > a { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; min-width: 0; min-height: 57px; padding: 6px 2px; color: #777b88; font-size: 10px; line-height: 1.25; text-align: center; }
.bottom-nav > a > svg { width: 23px; height: 23px; }
.bottom-nav > a.active, .bottom-nav > a[aria-current='page'] { color: #fff; }
.bottom-nav > a[data-nav='grab'] { padding-top: 37px; }
.bottom-nav .nav-badge { position: absolute; top: 2px; left: calc(50% + 7px); display: inline-flex; align-items: center; justify-content: center; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px; background: #ff4d5e; color: #fff; font-size: 9px; font-weight: 700; line-height: 1; }
.grab-circle { position: absolute; left: 50%; top: -26px; display: grid; place-items: center; width: 64px; height: 64px; transform: translateX(-50%); border: 2px solid transparent; border-radius: 50%; color: #f8f9ff; background: linear-gradient(145deg, #15262a, #18121f) padding-box, linear-gradient(145deg, #80e8da 5%, #70b9bc 40%, #df397e 88%) border-box; box-shadow: 0 0 24px #70d8d215, 6px 8px 23px #c438791a; }
.grab-circle::after { position: absolute; inset: 6px; border: 1px solid #ffffff09; border-radius: 50%; content: ''; }
.bottom-nav .grab-circle svg { width: 31px; height: 31px; }
.bottom-nav a.active .grab-circle { box-shadow: 0 0 22px #71e2d733, 5px 7px 26px #df397e33; }
dialog.app-modal { position: fixed; width: min(460px, calc(100% - 32px)); max-height: min(88vh, 800px); max-height: min(88dvh, 800px); margin: auto; padding: 26px; overflow-y: auto; overscroll-behavior: contain; border: 1px solid #333a46; border-radius: 23px; color: var(--text); background: var(--panel); box-shadow: 0 30px 120px #0009; }
dialog.app-modal:not([open]) { display: none; }
dialog.app-modal::backdrop { background: #000b; backdrop-filter: blur(7px); -webkit-backdrop-filter: blur(7px); }
.app-modal h2 { margin: 0 30px 20px 0; font-size: 20px; line-height: 1.4; }
.app-modal h3 { font-size: 15px; }
.app-modal > p { margin: 0 0 19px; font-size: 13px; line-height: 1.75; }
.modal-close { position: absolute; top: 13px; right: 13px; z-index: 1; display: grid; place-items: center; width: 32px; height: 32px; padding: 5px; border: 0; border-radius: 50%; color: var(--muted); background: var(--panel2); font-size: 22px; line-height: 1; }
.modal-actions { display: flex; gap: 10px; margin-top: 22px; }
.modal-actions > .btn { flex: 1; }
.modal-option { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; min-height: 49px; margin: 9px 0 0; padding: 13px 15px; border: 1px solid var(--border); border-radius: 12px; color: var(--text); background: var(--panel2); font-size: 13px; text-align: left; }
.modal-option.active, .modal-option[aria-pressed='true'] { border-color: var(--accent); color: var(--accent); }
.toast-region { position: fixed; z-index: 120; top: 36px; left: 16px; right: 16px; display: flex; flex-direction: column; align-items: center; gap: 9px; pointer-events: none; }
.toast { width: min(100%, 440px); padding: 13px 17px; border: 1px solid #32665b; border-radius: 12px; color: #dcfff5; background: #142b25f5; box-shadow: 0 8px 35px #0005; font-size: 12px; line-height: 1.6; text-align: center; overflow-wrap: anywhere; }
.toast.error { border-color: #88415c; color: #ffe0eb; background: #3b1c2af5; }
.demo-requests { display: grid; gap: 10px; margin: 20px 0 0; padding: 18px; border: 1px dashed var(--border); border-radius: 14px; background: var(--panel); }
.demo-requests > h2, .demo-requests > h3 { margin: 0; font-size: 13px; }
.demo-requests > p { margin: 0; color: var(--muted); font-size: 11px; }
.demo-request { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-width: 0; padding: 12px 0; border-top: 1px solid var(--border); font-size: 12px; }
.demo-request > div { min-width: 0; overflow-wrap: anywhere; }
.demo-request small { display: block; margin-top: 4px; color: var(--muted); font-size: 10px; }
.demo-request .btn { flex-shrink: 0; }
.auth-layout { position: relative; display: flex; align-items: center; justify-content: center; min-height: 100vh; min-height: 100dvh; width: 100%; padding: 30px 24px 40px; background: radial-gradient(ellipse at 100% 18%, #174e4726, transparent 48%), radial-gradient(ellipse at 0 90%, #841a3e24, transparent 45%), var(--bg); }
.auth-card { position: relative; z-index: 1; width: 100%; max-width: 400px; min-width: 0; padding: 0; }
.auth-tools { display: flex; align-items: center; justify-content: flex-end; gap: 12px; min-height: 36px; margin-bottom: 23px; }
.auth-tools button, .auth-tools a { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 33px; padding: 6px 9px; border: 1px solid var(--border); border-radius: 30px; color: var(--muted); background: var(--panel2); font-size: 11px; }
.auth-logo { display: block; width: 82px; height: 82px; margin: 0 auto 18px; object-fit: contain; }
.auth-logo img { display: block; width: 100%; height: 100%; object-fit: contain; }
.auth-card > h1 { margin: 0 0 9px; font-size: 25px; font-weight: 750; letter-spacing: -.5px; line-height: 1.35; text-align: center; }
.auth-brand { margin: 0 auto 14px; font-size: 18px; font-weight: 700; text-align: center; }
.auth-tagline { margin: 0 auto 27px; color: var(--muted); font-size: 12px; line-height: 1.7; text-align: center; }
.auth-tabs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; margin-bottom: 25px; border-bottom: 1px solid var(--border); }
.auth-tabs > a { position: relative; display: block; padding: 12px 10px; color: var(--muted); font-size: 14px; font-weight: 600; text-align: center; }
.auth-tabs > a.active { color: var(--text); }
.auth-tabs > a.active::after { position: absolute; bottom: -1px; left: 12%; right: 12%; height: 2px; border-radius: 2px; background: linear-gradient(90deg, #72dfd2, #d53b7a); content: ''; }
.auth-form { display: grid; gap: 16px; }
.auth-field { position: relative; }
.auth-field > .field-icon { position: absolute; z-index: 1; left: 15px; top: 50%; display: flex; align-items: center; justify-content: center; width: 20px; height: 20px; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.auth-field > .field-input { padding-left: 44px; padding-right: 44px; min-height: 53px; border-radius: 13px; }
.reveal { position: absolute; z-index: 1; right: 8px; top: 50%; display: grid; place-items: center; width: 35px; height: 35px; transform: translateY(-50%); padding: 7px; border: 0; border-radius: 9px; color: var(--muted); background: transparent; }
.reveal:hover { color: var(--text); background: #ffffff06; }
.reveal svg { width: 20px; height: 20px; }
.auth-submit { width: 100%; min-height: 50px; margin-top: 6px; border-radius: 13px; font-size: 15px; letter-spacing: .3px; }
.auth-demo-note { margin: 18px 0 0; padding: 12px 14px; border: 1px solid var(--border); border-radius: 11px; color: var(--muted); background: var(--panel); font-size: 10px; line-height: 1.8; text-align: center; }
.auth-demo-note button { display: inline; padding: 0; border: 0; color: var(--accent); background: transparent; font-size: inherit; text-decoration: underline; text-underline-offset: 3px; }
.auth-demo-note strong { color: var(--text); font-weight: 550; }
.auth-stats { display: flex; justify-content: space-around; gap: 16px; margin: 30px 0 0; color: var(--muted); font-size: 10px; text-align: center; }
.auth-stats > div { min-width: 0; }
.auth-stats strong { display: block; margin-bottom: 5px; color: var(--text); font-size: 17px; font-weight: 700; }
.auth-footer { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 9px 20px; margin-top: 26px; color: var(--muted); font-size: 10px; line-height: 1.6; text-align: center; }
.auth-footer p { width: 100%; margin: 0; }
.auth-error { margin: 0; padding: 10px 12px; border: 1px solid #a23b6244; border-radius: 10px; color: #f58bb0; background: #9e285113; font-size: 12px; line-height: 1.6; }
.auth-error:empty { display: none; }
body.light .bottom-nav { background: #ffffffed; box-shadow: 0 -6px 24px #21334708; }
body.light .bottom-nav > a.active, body.light .bottom-nav > a[aria-current='page'] { color: #12252b; }
body.light .btn-danger, body.light .form-error, body.light .auth-error { color: #a92c59; }
body.light .btn-primary { color: #fff; }
body.light dialog.app-modal { border-color: var(--border); }
@media (min-width: 1000px) {
  .bottom-nav { padding-left: max(24px, calc((100% - 1050px) / 2)); padding-right: max(24px, calc((100% - 1050px) / 2)); }
  .auth-layout { padding-top: 38px; padding-bottom: 48px; }
}
@media (max-width: 600px) {
  .page { padding: 20px 16px calc(104px + env(safe-area-inset-bottom)); }
  .page-header { margin-bottom: 20px; gap: 8px; }
  .page-header h1, .page-header h2 { font-size: 18px; }
  .header-action { padding: 6px 3px; font-size: 11px; }
  .panel { padding: 18px; border-radius: 20px; }
  .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .stat-grid > div { padding: 14px 12px; }
  .stat-grid strong { font-size: 20px; }
  .bottom-nav { padding-left: 10px; padding-right: 10px; }
  .demo-request { align-items: flex-start; }
  dialog.app-modal { padding: 23px 20px; }
  .auth-layout { align-items: flex-start; padding: 23px 24px 34px; }
  .auth-tools { margin-bottom: 25px; }
  .auth-logo { margin-bottom: 16px; }
  .auth-card > h1 { font-size: 23px; }
  .auth-tagline { margin-bottom: 23px; font-size: 11px; }
  .auth-tabs { margin-bottom: 23px; }
  .auth-stats { margin-top: 26px; }
}
@media (max-width: 340px) {
  .auth-layout { padding-left: 16px; padding-right: 16px; }
  .modal-actions { flex-direction: column; }
  .btn { padding-left: 14px; padding-right: 14px; }
  .auth-stats { gap: 9px; }
  .auth-stats strong { font-size: 15px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

.backend-warning{margin:12px;padding:12px;display:flex;gap:10px;align-items:center;flex-wrap:wrap;background:#492e11;color:#ffd897;border:1px solid #9c742f;border-radius:10px;font-size:12px;overflow-wrap:anywhere}.backend-warning button{border:1px solid currentColor;border-radius:6px;background:transparent;color:inherit;padding:6px 10px;cursor:pointer}
