:root {
  color-scheme: light;
  --page: #f3f6fb;
  --panel: #ffffff;
  --panel-soft: #f8fafd;
  --text: #1f2937;
  --muted: #6b7280;
  --subtle: #94a3b8;
  --line: #dbe3ef;
  --line-strong: #c7d2e4;
  --blue: #2374e1;
  --blue-soft: #e8f2ff;
  --green: #19a75a;
  --green-soft: #e9fbf0;
  --red: #e0343f;
  --red-soft: #fff0f1;
  --amber: #d97706;
  --amber-soft: #fff8e1;
  --gold: #c77900;
  --gold-soft: #fff4cf;
  --shadow: 0 14px 34px rgba(15, 23, 42, 0.08);
  --radius: 8px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

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

button,
input,
select {
  font: inherit;
}

button {
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--panel);
  color: var(--text);
  min-height: 38px;
  padding: 8px 14px;
  cursor: default;
  font-weight: 650;
}

button:hover:not(:disabled) {
  border-color: #9fb4d3;
  background: #f8fbff;
}

button:disabled {
  opacity: 0.48;
}

.primary {
  border-color: var(--blue);
  background: var(--blue);
  color: white;
}

.primary:hover:not(:disabled) {
  border-color: #155ec1;
  background: #155ec1;
}

.ghost {
  background: #f7faff;
}

.full-width {
  width: 100%;
}

.link-button {
  min-height: auto;
  border: 0;
  background: transparent;
  padding: 0;
  color: var(--blue);
}

.vip-button {
  border-color: #f6c45e;
  background: var(--gold-soft);
  color: #9a4e00;
}

input,
select {
  width: 100%;
  min-height: 38px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: white;
  color: var(--text);
  padding: 8px 11px;
}

label {
  display: grid;
  gap: 8px;
}

label > span,
legend {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
  letter-spacing: 0;
}

.hidden {
  display: none !important;
}

.auth-screen {
  min-height: 100vh;
  background: #f5f7fa;
}

.auth-panel {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 520px minmax(0, 1fr);
  align-items: stretch;
}

.product-lockup,
.brand-block {
  display: flex;
  align-items: center;
  gap: 14px;
}

.auth-brand-panel {
  position: relative;
  min-width: 520px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  padding: 48px 48px 40px;
  background: linear-gradient(160deg, #0f4faf 0%, #1b6fde 55%, #1a5ec4 100%);
  color: #ffffff;
}

.brand-orb {
  position: absolute;
  display: block;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.055);
  pointer-events: none;
}

.brand-orb-top {
  top: -80px;
  right: -80px;
  width: 280px;
  height: 280px;
}

.brand-orb-bottom {
  bottom: -60px;
  left: -60px;
  width: 220px;
  height: 220px;
}

.brand-orb-mid {
  top: 200px;
  right: 20px;
  width: 120px;
  height: 120px;
  background: rgba(255, 255, 255, 0.04);
}

.auth-brand-lockup {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 56px;
}

.auth-brand-lockup h1 {
  margin: 0;
  color: #ffffff;
  font-size: 16px;
  line-height: 1.2;
  font-weight: 800;
}

.auth-brand-lockup p {
  margin: 2px 0 0;
  color: rgba(255, 255, 255, 0.62);
  font-size: 11px;
  line-height: 1.3;
  font-weight: 500;
}

.auth-brand-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.18);
}

.auth-brand-mark svg,
.auth-feature-icon svg {
  width: 20px;
  height: 20px;
}

.auth-brand-mark path:first-child,
.auth-feature-icon path:first-child,
.auth-feature-icon rect,
.auth-feature-icon circle {
  fill: rgba(255, 255, 255, 0.9);
}

.auth-brand-mark path:last-child,
.auth-feature-icon path:last-child {
  fill: none;
  stroke: #ffffff;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.auth-brand-mark path:last-child {
  stroke-width: 1.6;
}

.auth-feature-icon path:last-child,
.auth-feature-icon rect + path,
.auth-feature-icon circle + path {
  stroke: #1b6fde;
  stroke-width: 1.3;
}

.auth-feature:nth-child(3) .auth-feature-icon path,
.auth-feature:nth-child(3) .auth-feature-icon path:last-child {
  fill: none;
  stroke: rgba(255, 255, 255, 0.9);
  stroke-width: 1.8;
}

.auth-hero-copy {
  position: relative;
  z-index: 1;
  margin-bottom: 36px;
}

.auth-hero-copy h2 {
  margin: 0 0 12px;
  color: #ffffff;
  font-size: 28px;
  line-height: 1.3;
  font-weight: 800;
  letter-spacing: 0;
}

.auth-hero-copy p {
  max-width: 410px;
  margin: 0;
  color: rgba(255, 255, 255, 0.72);
  font-size: 13px;
  line-height: 1.75;
}

.auth-feature-list {
  position: relative;
  z-index: 1;
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 16px;
}

.auth-feature {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.auth-feature-icon {
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  display: grid;
  place-items: center;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.12);
}

.auth-feature strong {
  display: block;
  margin-bottom: 2px;
  color: #ffffff;
  font-size: 13px;
  font-weight: 750;
}

.auth-feature small {
  display: block;
  color: rgba(255, 255, 255, 0.62);
  font-size: 12px;
  line-height: 1.45;
}

.auth-brand-stats {
  position: relative;
  z-index: 1;
  display: flex;
  gap: 32px;
  margin-top: 36px;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
}

.auth-brand-stats strong {
  display: block;
  color: #ffffff;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 20px;
  line-height: 1.2;
  font-weight: 800;
}

.auth-brand-stats span {
  display: block;
  margin-top: 4px;
  color: rgba(255, 255, 255, 0.56);
  font-size: 11px;
}

.auth-form-panel {
  min-width: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #f5f7fa;
}

.auth-topbar {
  min-height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 40px;
  border-bottom: 1px solid #e2e6ed;
  background: #ffffff;
}

.auth-topbar select {
  width: 132px;
  min-height: 32px;
  padding: 5px 10px;
  border-color: var(--line);
  border-radius: 4px;
  color: #6b7280;
  font-size: 12px;
}

.auth-form-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 40px;
}

.auth-card {
  width: min(400px, 100%);
  display: grid;
  gap: 16px;
}

.auth-heading {
  margin-bottom: 12px;
}

.auth-heading h2 {
  margin: 0 0 6px;
  color: #111827;
  font-size: 22px;
  line-height: 1.25;
  font-weight: 800;
}

.auth-heading p {
  margin: 0;
  color: #6b7280;
  font-size: 13px;
}

.product-mark {
  width: 42px;
  height: 42px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: var(--blue);
  color: white;
  font-size: 13px;
  font-weight: 850;
}

.app-header h1 {
  margin: 0;
  font-size: 24px;
  letter-spacing: 0;
}

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

.field-label {
  gap: 6px;
}

.field-label > span {
  color: #6b7280;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.field-label small {
  color: #9ca3af;
  font-size: 11px;
}

.auth-card input {
  min-height: 40px;
  border-color: #c9d0da;
  border-radius: 4px;
  padding: 10px 12px;
  color: #111827;
  font-size: 13px;
}

.auth-card input:focus {
  border-color: #1b6fde;
  box-shadow: 0 0 0 3px rgba(27, 111, 222, 0.12);
  outline: none;
}

.inline-input {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
}

.send-code-button {
  min-height: 40px;
  border: 0;
  border-radius: 4px;
  background: #1b6fde;
  color: #ffffff;
  padding: 10px 14px;
  font-size: 12px;
  font-weight: 650;
}

.send-code-button:hover:not(:disabled) {
  background: #0f4faf;
}

.auth-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.check-line {
  display: flex;
  gap: 8px;
  align-items: center;
  color: var(--muted);
  font-size: 13px;
}

.agreement-link,
.link-button {
  color: #1b6fde;
}

.agreement-link {
  min-height: auto;
  border: 0;
  background: transparent;
  padding: 0;
  font: inherit;
  cursor: pointer;
}

.check-line input {
  width: auto;
  min-height: auto;
}

.auto-register-note {
  padding: 8px 12px;
  border: 1px solid #fde68a;
  border-radius: 4px;
  background: #fffbeb;
  color: #92400e;
  font-size: 11px;
  line-height: 1.5;
}

.auth-card .primary {
  min-height: 44px;
  border-radius: 6px;
  border-color: #1b6fde;
  background: #1b6fde;
  font-size: 14px;
  font-weight: 750;
}

.auth-card .primary:hover:not(:disabled) {
  border-color: #0f4faf;
  background: #0f4faf;
  box-shadow: 0 2px 8px rgba(27, 111, 222, 0.25);
}

.auth-card .ghost {
  border-color: #c9d0da;
  border-radius: 6px;
  background: #ffffff;
  color: #111827;
  font-size: 13px;
  font-weight: 650;
}

.form-status {
  min-height: 20px;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-rows: auto 1fr 28px;
}

.app-header {
  position: sticky;
  top: 0;
  z-index: 10;
  height: 52px;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 24px;
  background: var(--panel);
  border-bottom: 1px solid var(--line);
}

.brand-line,
.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-block {
  flex-shrink: 0;
  gap: 10px;
}

.app-header .product-mark {
  width: 30px;
  height: 30px;
  border-radius: 6px;
}

.product-shield svg {
  width: 16px;
  height: 16px;
}

.product-shield path:first-child {
  fill: rgba(255, 255, 255, 0.9);
}

.product-shield path:last-child {
  fill: none;
  stroke: #ffffff;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.app-header h1 {
  margin: 0;
  color: #111827;
  font-size: 14px;
  line-height: 1.2;
  font-weight: 800;
  letter-spacing: 0;
}

.app-header p {
  margin: 2px 0 0;
  color: #9ca3af;
  font-size: 10px;
  line-height: 1;
  font-weight: 600;
}

.header-divider {
  width: 1px;
  height: 24px;
  flex: 0 0 1px;
  background: var(--line);
}

.header-spacer {
  flex: 1;
}

.version-badge {
  padding: 2px 8px;
  border-radius: 4px;
  border: 1px solid #e5e7eb;
  background: #f3f4f6;
  color: #6b7280;
  font-size: 11px;
  font-weight: 750;
}

.plan-header-group {
  display: flex;
  align-items: center;
  gap: 6px;
}

.plan-header-text {
  color: #6b7280;
  font-size: 12px;
  font-weight: 650;
}

.runtime-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border: 1px solid #bbf7d0;
  border-radius: 999px;
  background: #f0fdf4;
  color: var(--green);
  font-size: 11px;
  font-weight: 800;
}

.runtime-badge i {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--green);
}

.account-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #64748b;
  font-size: 12px;
  font-weight: 700;
}

.account-badge svg {
  width: 13px;
  height: 13px;
}

.account-badge path {
  fill: none;
  stroke: #9ca3af;
  stroke-width: 1.3;
  stroke-linecap: round;
}

.vip-unlock-badge {
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border: 1px solid #fde68a;
  border-radius: 6px;
  background: linear-gradient(135deg, #fff7ed, #fef3c7);
  color: #92400e;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.vip-unlock-badge svg {
  width: 12px;
  height: 12px;
}

.vip-unlock-badge path {
  fill: currentColor;
}

.vip-unlock-badge:hover:not(:disabled) {
  border-color: #fcd34d;
  background: #fef3c7;
}

.app-shell.is-member .version-badge {
  border-color: #bfdbfe;
  background: #eff6ff;
  color: #1b6fde;
}

.app-shell.is-member .vip-unlock-badge {
  border-color: #bfdbfe;
  background: linear-gradient(135deg, #eff6ff, #dbeafe);
  color: #1e40af;
}

.app-shell.is-expired-member .version-badge {
  border-color: #fecaca;
  background: #fff1f2;
  color: #be123c;
}

.app-shell.is-expired-member .vip-unlock-badge {
  border-color: #fecaca;
  background: linear-gradient(135deg, #fff1f2, #ffe4e6);
  color: #be123c;
}

.header-actions select {
  width: 142px;
  min-height: 30px;
  padding: 5px 10px;
  border-color: var(--line);
  border-radius: 4px;
  color: #6b7280;
  font-size: 12px;
}

.workspace {
  min-height: 0;
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  padding-bottom: 28px;
}

.left-rail {
  border-right: 1px solid var(--line);
  background: var(--page);
  padding: 20px 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  overflow-y: auto;
}

.api-card,
.runner-card,
.data-card,
.order-panel,
.trade-detail,
.poster-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.04);
}

.api-card {
  display: grid;
  gap: 12px;
  overflow: hidden;
  padding: 0;
}

.card-title,
.toolbar,
.table-footer,
.action-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.card-title h2,
.runner-card h2,
.toolbar h2,
.trade-detail h3,
.order-panel h3 {
  margin: 0;
  font-size: 16px;
}

.api-card .card-title {
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  background: #f8fafc;
}

.api-card .card-title h2 {
  font-size: 12px;
}

.api-card > label,
.api-card > fieldset,
.api-card > .button-row,
.api-card > .safety-text {
  margin-left: 16px;
  margin-right: 16px;
}

.api-card > label:first-of-type {
  margin-top: 2px;
}

.api-card > .safety-text {
  margin-bottom: 14px;
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--green);
}

fieldset {
  display: flex;
  gap: 10px;
  align-items: center;
  margin: 0;
  padding: 0;
  border: 0;
  flex-wrap: wrap;
}

legend {
  width: 100%;
  margin-bottom: 2px;
}

.radio-pill {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  color: #334155;
  font-weight: 700;
}

.radio-pill input {
  width: auto;
  min-height: auto;
  accent-color: var(--blue);
}

.button-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.safety-text {
  margin: 0;
  padding: 10px 12px;
  border: 1px solid #bfdbfe;
  border-radius: 6px;
  background: #eff6ff;
  color: #1e40af;
  font-size: 11px;
  line-height: 1.5;
}

.runner-card {
  padding: 16px;
}

.runner-card p {
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.5;
}

.content-panel {
  min-width: 0;
  padding: 20px 24px;
}

.tabbar {
  display: flex;
  justify-content: flex-start;
  gap: 0;
  margin: 0 0 16px;
  border-bottom: 1px solid var(--line);
}

.app-shell.pricing-mode .tabbar {
  display: none;
}

.tab {
  min-width: auto;
  min-height: 0;
  padding: 10px 20px;
  border: 0;
  border-radius: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
}

.tab.active {
  border-bottom-color: var(--blue);
  background: transparent;
  color: var(--blue);
  box-shadow: none;
}

.tab span {
  display: inline-grid;
  place-items: center;
  min-width: 20px;
  height: 18px;
  margin-left: 5px;
  border-radius: 999px;
  background: var(--blue);
  color: white;
  font-size: 10px;
  font-weight: 800;
}

.view {
  display: none;
}

.view.active {
  display: block;
}

.toolbar {
  margin-bottom: 16px;
}

.toolbar-title-line {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  min-width: 0;
}

.toolbar-title-line span {
  padding: 5px 9px;
  border-radius: 999px;
  background: #eef2f7;
  color: var(--subtle);
  font-size: 12px;
  font-weight: 800;
}

.toolbar-title-line strong {
  color: var(--red);
  font-size: 13px;
}

.toolbar p {
  margin: 6px 0 0;
  color: var(--muted);
}

.toolbar-actions,
.regret-filters {
  display: flex;
  align-items: end;
  gap: 10px;
  flex-wrap: wrap;
}

.toolbar-actions label,
.regret-filters label {
  min-width: 130px;
}

.vip-only-action {
  border-color: #f2b43a;
  background: #fff8e6;
  color: #9a5b00;
  font-weight: 800;
}

.vip-only-action.is-enabled {
  border-color: #2563eb;
  background: var(--blue);
  color: #ffffff;
}

.vip-only-action.is-locked {
  border-color: #d1d5db;
  background: #f3f4f6;
  color: #6b7280;
}

.warning-strip {
  margin-bottom: 16px;
  border: 1px solid #ffd36a;
  border-radius: 6px;
  background: var(--amber-soft);
  color: #b45309;
  padding: 10px 14px;
  font-weight: 800;
}

.data-card {
  min-height: 475px;
  overflow: hidden;
}

.table-scroll {
  overflow: auto;
  min-height: 230px;
}

table {
  width: 100%;
  border-collapse: collapse;
  white-space: nowrap;
}

th,
td {
  border-bottom: 1px solid #f1f3f7;
  padding: 12px 12px;
  text-align: left;
}

th {
  background: #f8fafc;
  color: #64748b;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

td {
  font-size: 13px;
  font-weight: 650;
}

tr.is-selected {
  background: #eef6ff;
}

tr.is-warning {
  background: #fff9e8;
}

.symbol-cell {
  display: flex;
  align-items: center;
  gap: 11px;
}

.coin-dot {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: #ffb51f;
  color: white;
  font-size: 12px;
  font-weight: 850;
}

.coin-dot.eth {
  background: #6c73ff;
}

.coin-dot.doge,
.coin-dot.sol {
  background: #ffb11b;
}

.symbol-cell small {
  display: block;
  color: var(--subtle);
  margin-top: 2px;
}

.tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  border-radius: 4px;
  padding: 2px 8px;
  font-size: 11px;
  font-weight: 850;
}

.tag.long {
  color: #0f63ce;
  border: 1px solid #a9d0ff;
  background: #eef6ff;
}

.tag.short {
  color: #dc2626;
  border: 1px solid #ffc0c2;
  background: #fff4f4;
}

.tag.good {
  color: #15803d;
  border: 1px solid #9ae6b4;
  background: var(--green-soft);
}

.tag.warn {
  color: #b45309;
  border: 1px solid #facc15;
  background: #fff8e1;
}

.pnl-positive {
  color: #16a34a;
}

.pnl-negative {
  color: var(--red);
}

.table-footer {
  padding: 10px 16px;
  background: #f8fafc;
  color: var(--subtle);
}

.table-footer strong {
  color: var(--red);
}

.action-bar {
  margin-top: 14px;
  justify-content: flex-start;
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
}

.position-table td:last-child {
  text-align: center;
}

.protection-status-cell {
  display: grid;
  justify-items: center;
  gap: 7px;
}

.position-status-cell {
  max-width: 150px;
}

.position-status-cell .tag {
  max-width: 100%;
  white-space: normal;
  line-height: 1.35;
}

.protection-prices {
  display: grid;
  gap: 3px;
  color: #334155;
  font-size: 11px;
  line-height: 1.25;
}

.protection-prices span {
  display: flex;
  gap: 6px;
  align-items: center;
}

.protection-prices b {
  min-width: 24px;
  color: var(--subtle);
  font-size: 10px;
}

.position-table td:last-child button {
  min-height: 28px;
  margin: 0 3px;
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 11px;
  border-color: var(--blue);
  background: var(--blue);
  color: #ffffff;
}

.position-table .urgent-action {
  border-color: #d97706;
  background: #d97706;
  color: #ffffff;
}

.action-bar span {
  color: var(--muted);
  font-weight: 700;
}

.status-cards,
.summary-grid {
  display: grid;
  gap: 14px;
}

.status-cards {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 18px;
}

.status-card,
.summary-grid > div {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  padding: 16px;
}

.status-card strong,
.summary-grid strong {
  display: block;
  margin-top: 8px;
  font-size: 20px;
}

.status-card span,
.summary-grid span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

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

.timeline-item {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  padding: 14px 16px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

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

.regret-filters {
  margin-bottom: 14px;
  align-items: end;
}

.regret-filters label {
  display: grid;
  gap: 6px;
}

.regret-filters label > span {
  display: block;
  min-height: 16px;
  line-height: 16px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.regret-filters input,
.regret-filters select,
.regret-filters button {
  height: 38px;
  min-height: 38px;
  box-sizing: border-box;
}

.regret-filters button {
  align-self: end;
}

.summary-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  margin-bottom: 14px;
}

.split-view {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(300px, 0.75fr);
  gap: 18px;
}

.trade-list-wrap {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  min-height: 330px;
  overflow: auto;
}

.trade-detail {
  padding: 18px;
}

.trade-detail p {
  color: var(--muted);
  line-height: 1.55;
}

.trade-detail .detail-note {
  font-size: 12px;
}

.pricing-view {
  min-height: calc(100vh - 112px);
}

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

.pricing-header h2 {
  margin: 0;
  font-size: 28px;
  letter-spacing: 0;
}

.pricing-header p {
  margin: 8px 0 0;
  color: var(--muted);
}

.pricing-header-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  align-items: stretch;
}

.pricing-card {
  min-height: 520px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 4px 18px rgba(15, 23, 42, 0.04);
}

.pricing-card.featured {
  border-color: #d7dce5;
}

.pricing-card h3 {
  margin: 0 0 18px;
  font-size: 22px;
}

.price-line {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin-bottom: 14px;
}

.price-line span {
  color: var(--muted);
  font-size: 12px;
}

.price-line strong {
  color: #111827;
  font-size: 44px;
  line-height: 1;
}

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

.pricing-card p {
  min-height: 44px;
  margin: 0 0 22px;
  color: #374151;
  line-height: 1.5;
}

.pricing-card button {
  width: 100%;
  min-height: 34px;
  margin-bottom: 20px;
  border-radius: 999px;
}

.pricing-card.featured button {
  border-color: #111827;
  background: #111827;
  color: #ffffff;
}

.order-hint {
  margin: 14px 0 12px;
  color: #475569;
  line-height: 1.5;
}

#submitPaymentBtn,
#refreshOrderBtn {
  min-height: 34px;
  margin-right: 10px;
  margin-bottom: 8px;
  border-radius: 999px;
}

.pricing-card ul {
  display: grid;
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.pricing-card li {
  position: relative;
  padding-left: 22px;
  color: #374151;
  line-height: 1.35;
}

.pricing-card li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 0;
  color: #111827;
  font-weight: 800;
}

.pricing-order-panel {
  margin-top: 18px;
}

.order-panel {
  padding: 18px;
}

.order-panel dl {
  display: grid;
  grid-template-columns: 130px minmax(0, 1fr);
  gap: 10px;
}

.order-panel dt {
  color: var(--muted);
  font-weight: 750;
}

.order-panel dd {
  margin: 0;
  overflow-wrap: anywhere;
}

.poster-card {
  max-width: 420px;
  min-height: 620px;
  margin: 0 auto;
  padding: 28px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.96), rgba(249,250,251,0.98)),
    white;
}

.poster-card h3 {
  margin: 0;
  font-size: 28px;
}

.poster-card .poster-metric {
  margin: 24px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 24px 0;
}

.poster-card .poster-metric strong {
  display: block;
  color: var(--green);
  font-size: 42px;
}

.poster-card .qr-box {
  width: 112px;
  height: 112px;
  display: grid;
  place-items: center;
  margin-top: 24px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f8fafc;
  color: var(--subtle);
}

.trade-detail .poster-card {
  max-width: none;
  min-height: 0;
  margin: 16px 0 0;
  padding: 20px;
}

.trade-detail .poster-card h3 {
  font-size: 22px;
}

.trade-detail .poster-card .poster-metric {
  margin: 16px 0;
  padding: 16px 0;
}

.trade-detail .poster-card .poster-metric strong {
  font-size: 34px;
}

.trade-detail .poster-card .qr-box {
  width: 92px;
  height: 92px;
}

.status-bar {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 10;
  height: 28px;
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 0 20px;
  border-top: 1px solid #334155;
  background: #1e293b;
  color: #94a3b8;
  font-size: 10px;
}

.status-bar span:first-child {
  color: #5ee68f;
}

.status-bar span:nth-last-child(1) {
  margin-left: auto;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(15, 23, 42, 0.38);
  z-index: 20;
}

.modal {
  width: min(620px, 100%);
  border-radius: 10px;
  background: white;
  box-shadow: 0 24px 80px rgba(15, 23, 42, 0.25);
  overflow: hidden;
}

.modal header,
.modal-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
}

.modal header span {
  color: var(--blue);
  font-size: 12px;
  font-weight: 850;
}

.modal header h2 {
  margin: 3px 0 0;
}

.icon-button {
  width: 36px;
  min-height: 36px;
  padding: 0;
}

.modal-body {
  padding: 20px;
  color: #334155;
  line-height: 1.6;
}

.agreement-body {
  white-space: pre-line;
}

.modal-actions {
  justify-content: flex-end;
  border-top: 1px solid var(--line);
  border-bottom: 0;
}

@media (max-width: 1100px) {
  .workspace {
    grid-template-columns: 1fr;
  }

  .left-rail {
    border-right: 0;
    border-bottom: 1px solid var(--line);
    display: grid;
    grid-template-columns: minmax(280px, 1fr) 260px 220px;
    align-items: start;
  }

  .split-view {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 980px) {
  .auth-panel {
    grid-template-columns: 1fr;
  }

  .auth-brand-panel {
    min-width: 0;
    min-height: 520px;
  }

  .auth-form-panel {
    min-height: 640px;
  }
}

@media (max-width: 760px) {
  .auth-panel,
  .left-rail,
  .pricing-grid,
  .summary-grid,
  .status-cards {
    grid-template-columns: 1fr;
  }

  .app-header,
  .toolbar,
  .pricing-header,
  .table-footer,
  .action-bar {
    align-items: stretch;
    flex-direction: column;
  }

  .header-actions,
  .toolbar-actions,
  .pricing-header-actions,
  .regret-filters {
    width: 100%;
    align-items: stretch;
    flex-direction: column;
  }

  .header-actions select,
  .toolbar-actions label,
  .regret-filters label {
    width: 100%;
  }

  .app-header {
    height: auto;
  }

  .tabbar {
    justify-content: flex-start;
    overflow-x: auto;
  }

  .content-panel {
    padding: 16px;
  }

  .pricing-card {
    min-height: 0;
  }

  .auth-brand-panel {
    min-height: auto;
    padding: 32px 24px;
  }

  .auth-brand-lockup {
    margin-bottom: 32px;
  }

  .auth-hero-copy h2 {
    font-size: 24px;
  }

  .auth-brand-stats {
    gap: 18px;
    flex-wrap: wrap;
  }

  .auth-topbar,
  .auth-form-wrap {
    padding-left: 20px;
    padding-right: 20px;
  }

  .status-bar {
    overflow-x: auto;
  }
}
