﻿:root {
  --text: #eef8ff;
  --muted: #9db8cc;
  --muted-strong: #c7dbee;
  --danger: #ff7676;
  --border: rgba(255, 255, 255, 0.14);

  --surface: rgba(13, 30, 44, 0.84);
  --surface-strong: rgba(16, 37, 56, 0.95);

  --accent: #f3ba2f;
  --accent-2: #fcd535;
  --bg-grad-a: rgba(243, 186, 47, 0.25);
  --bg-grad-b: rgba(252, 213, 53, 0.18);
  --bg-base-a: #0b0e11;
  --bg-base-b: #131a24;
  --bg-base-c: #0f1621;
  --ambient-a: #f3ba2f;
  --ambient-b: #fcd535;
}

body.theme-binance {
  --accent: #f3ba2f;
  --accent-2: #fcd535;
  --bg-grad-a: rgba(243, 186, 47, 0.25);
  --bg-grad-b: rgba(252, 213, 53, 0.2);
  --bg-base-a: #0b0e11;
  --bg-base-b: #131a24;
  --bg-base-c: #0f1621;
  --ambient-a: #f3ba2f;
  --ambient-b: #fcd535;
}

body.theme-mexc {
  --accent: #00e3a5;
  --accent-2: #4b6dff;
  --bg-grad-a: rgba(0, 227, 165, 0.2);
  --bg-grad-b: rgba(75, 109, 255, 0.22);
  --bg-base-a: #06131f;
  --bg-base-b: #0a2135;
  --bg-base-c: #0e1830;
  --ambient-a: #00e3a5;
  --ambient-b: #4b6dff;
}

body.theme-bybit {
  --accent: #f7a600;
  --accent-2: #d7e1ee;
  --bg-grad-a: rgba(247, 166, 0, 0.24);
  --bg-grad-b: rgba(215, 225, 238, 0.16);
  --bg-base-a: #101317;
  --bg-base-b: #1a1f27;
  --bg-base-c: #151a21;
  --ambient-a: #f7a600;
  --ambient-b: #6e7789;
}

body.theme-all {
  --accent: #00d0ff;
  --accent-2: #f3ba2f;
  --bg-grad-a: rgba(0, 208, 255, 0.2);
  --bg-grad-b: rgba(243, 186, 47, 0.2);
  --bg-base-a: #0a1020;
  --bg-base-b: #13172a;
  --bg-base-c: #1a1f32;
  --ambient-a: #00d0ff;
  --ambient-b: #f3ba2f;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

[data-app-section][hidden] {
  display: none !important;
}

body {
  margin: 0;
  min-height: 100vh;
  color-scheme: dark;
  background: radial-gradient(circle at 16% 19%, var(--bg-grad-a), transparent 42%),
    radial-gradient(circle at 84% 8%, var(--bg-grad-b), transparent 37%),
    linear-gradient(160deg, var(--bg-base-a) 0%, var(--bg-base-b) 48%, var(--bg-base-c) 100%);
  color: var(--text);
  font-family: "Space Grotesk", sans-serif;
  transition: background 260ms ease;
}

.ambient {
  position: fixed;
  border-radius: 999px;
  pointer-events: none;
  filter: blur(76px);
  opacity: 0.28;
  transition: background-color 260ms ease;
}

.ambient-a {
  width: 340px;
  height: 340px;
  background: var(--ambient-a);
  top: -80px;
  right: -44px;
}

.ambient-b {
  width: 390px;
  height: 390px;
  background: var(--ambient-b);
  bottom: -128px;
  left: -104px;
}

.layout {
  position: relative;
  z-index: 1;
  width: min(1320px, calc(100% - 32px));
  margin: 20px auto 30px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

.panel {
  background: linear-gradient(145deg, var(--surface-strong), var(--surface));
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px;
  backdrop-filter: blur(10px);
}

.topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.brand-wrap {
  display: grid;
  gap: 4px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 4px 10px;
  font-size: 0.72rem;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.05);
  color: var(--muted-strong);
}

.hero-title {
  margin: 2px 0 0;
  font-size: clamp(2rem, 4vw, 2.65rem);
  letter-spacing: 0.03em;
  line-height: 1;
  font-weight: 700;
  background: linear-gradient(120deg, var(--accent), #ffffff 45%, var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: 0 0 26px rgba(255, 255, 255, 0.16);
}

.topbar-right {
  display: grid;
  justify-items: end;
  gap: 10px;
}

.topbar-utility-row {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
  width: 100%;
}

.lang-control {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
}

.lang-control span {
  font-size: 0.78rem;
  color: var(--muted-strong);
}

.lang-flag {
  width: 34px;
  height: 24px;
  display: block;
  border-radius: 5px;
  border: 1px solid rgba(255, 255, 255, 0.32);
  object-fit: cover;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.28);
}

.lang-control select {
  min-width: 154px;
  height: 32px;
  padding: 4px 28px 4px 10px;
  border-radius: 999px;
  font-size: 0.82rem;
  border-color: rgba(255, 255, 255, 0.22);
}


.app-nav-panel {
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
}

.app-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.app-tab {
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted-strong);
  border-radius: 999px;
  padding: 8px 14px;
  cursor: pointer;
  transition: all 150ms ease;
}

.app-tab.active {
  background: linear-gradient(125deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02)), linear-gradient(120deg, var(--accent), var(--accent-2));
  border-color: transparent;
  color: #07141d;
  font-weight: 700;
}

.site-footer {
  display: flex;
  gap: 10px;
  justify-content: center;
  align-items: center;
  color: var(--muted);
  padding: 8px 0 20px;
}

.footer-link {
  background: none;
  border: none;
  color: var(--muted-strong);
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
  padding: 0;
}

.footer-link:hover {
  color: var(--text);
}

.hero-strip {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: linear-gradient(130deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.02));
  overflow: hidden;
}

.hero-strip-logo {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  font-family: "IBM Plex Mono", monospace;
  font-weight: 700;
  font-size: 0.95rem;
  color: #031522;
  background: linear-gradient(120deg, var(--accent), var(--accent-2));
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.24);
  flex: 0 0 auto;
}

.hero-strip-viewport {
  position: relative;
  overflow: hidden;
  flex: 1;
  mask-image: linear-gradient(90deg, transparent 0%, black 7%, black 93%, transparent 100%);
}

.hero-strip-track {
  display: flex;
  gap: 14px;
  width: max-content;
  animation: heroTicker 22s linear infinite;
}

.hero-strip-chip {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.17);
  background: rgba(255, 255, 255, 0.05);
  color: var(--muted-strong);
  font-size: 0.76rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
}

@keyframes heroTicker {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-33.333%);
  }
}

h2 {
  margin: 0;
  font-size: 1.1rem;
}

p {
  margin: 4px 0 0;
  color: var(--muted);
}

.badge-group {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.auth-strip {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
}

#plan-badge,
#usage-badge {
  padding: 8px 12px;
  font-size: 0.85rem;
  min-height: 38px;
  align-items: center;
}

#usage-badge {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.8rem;
}

#auth-action-btn {
  padding: 10px 16px;
  min-height: 40px;
  border-radius: 12px;
  font-size: 0.9rem;
  font-weight: 700;
}

#plan-badge[data-plan="pro"] {
  background: linear-gradient(120deg, rgba(126, 242, 165, 0.2), rgba(255, 255, 255, 0.07));
  border-color: rgba(126, 242, 165, 0.44);
  color: #dfffe9;
}

#plan-badge[data-plan="free"] {
  background: linear-gradient(120deg, rgba(255, 220, 123, 0.18), rgba(255, 255, 255, 0.07));
  border-color: rgba(255, 220, 123, 0.36);
  color: #fff2cf;
}

.badge {
  display: inline-flex;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 0.8rem;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border);
}

.panel-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.filter-panel {
  padding: 10px 12px;
}

.filter-panel-details {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  padding: 8px 10px;
}

.filter-panel-summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 4px 2px;
}

.filter-panel-summary::-webkit-details-marker {
  display: none;
}

.filter-panel-title-wrap {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.filter-toggle-indicator {
  width: 22px;
  height: 22px;
  border-radius: 999px;
  display: inline-grid;
  place-items: center;
  font-size: 0.95rem;
  line-height: 1;
  color: #06131f;
  background: linear-gradient(120deg, var(--accent), var(--accent-2));
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.28);
  transform: rotate(0deg);
  transition: transform 160ms ease;
}

.filter-panel-details[open] .filter-toggle-indicator {
  transform: rotate(90deg);
}

.filter-panel-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
}

.filter-panel-summary .muted {
  flex: 1;
  text-align: right;
  margin-right: 8px;
}

.filter-panel-details > .grid,
.filter-panel-details > .advanced-box,
.filter-panel-details > .actions {
  margin-top: 10px;
}

.muted {
  color: var(--muted);
  font-size: 0.86rem;
}

.exchange-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.exchange-tab {
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  padding: 8px 14px;
  border-radius: 999px;
  cursor: pointer;
  transition: transform 120ms ease, background 140ms ease, border-color 140ms ease;
}

.exchange-tab:hover {
  transform: translateY(-1px);
}

.exchange-tab.active {
  background: linear-gradient(125deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02)), linear-gradient(125deg, var(--accent), var(--accent-2));
  border-color: var(--accent-2);
}

.grid {
  display: grid;
  gap: 10px;
}

.two-cols {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}


.three-cols {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.four-cols {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 10px;
}

label {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

label span {
  font-size: 0.82rem;
  color: var(--muted);
}

input,
select,
button {
  font: inherit;
}

input,
select,
textarea {
  border: 1px solid var(--border);
  background: rgba(6, 15, 23, 0.74);
  color: var(--text);
  border-radius: 10px;
  padding: 9px 10px;
}

textarea {
  resize: vertical;
  min-height: 120px;
}

select {
  appearance: none;
  color-scheme: dark;
  padding-right: 34px;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted-strong) 50%),
    linear-gradient(135deg, var(--muted-strong) 50%, transparent 50%);
  background-position: calc(100% - 18px) calc(50% - 3px), calc(100% - 12px) calc(50% - 3px);
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
}

select option {
  background: #0a1a27;
  color: #eef8ff;
}

select option:hover,
select option:checked {
  background: #143047;
  color: #ffffff;
}

input:focus,
select:focus,
button:focus {
  outline: 2px solid var(--accent-2);
  outline-offset: 1px;
}

input::placeholder {
  color: #8ba7bc;
}

.quote-options {
  display: flex;
  gap: 10px;
  align-items: center;
  min-height: 39px;
}

.check-option {
  flex-direction: row;
  align-items: center;
  gap: 6px;
  color: var(--text);
  font-size: 0.9rem;
}

.check-option input {
  accent-color: var(--accent);
}

.advanced-box {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.03);
  margin-bottom: 6px;
}

.advanced-box > summary {
  cursor: pointer;
  color: var(--muted-strong);
  font-weight: 600;
  margin-bottom: 8px;
}

.advanced-grid {
  margin-top: 10px;
}

.adv-check {
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.03);
}

.actions {
  display: flex;
  gap: 10px;
  margin-top: 6px;
  flex-wrap: wrap;
}

.btn {
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  padding: 9px 14px;
  border-radius: 10px;
  cursor: pointer;
}

.btn:hover {
  background: rgba(255, 255, 255, 0.1);
}

.btn:disabled {
  cursor: not-allowed;
  opacity: 0.6;
}

.btn-primary {
  background: linear-gradient(120deg, var(--accent), var(--accent-2));
  border-color: transparent;
  color: #031522;
  font-weight: 700;
}

.btn-small {
  padding: 6px 10px;
  font-size: 0.82rem;
}

.progress-wrap {
  height: 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  width: 0;
  background: linear-gradient(120deg, var(--accent), var(--accent-2));
  transition: width 250ms ease;
}

.stat-grid {
  margin-top: 12px;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.stat-grid div {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.04);
}

.stat-grid span {
  display: block;
  font-size: 0.75rem;
  color: var(--muted);
}

.stat-grid strong {
  font-family: "IBM Plex Mono", monospace;
  font-size: 1rem;
}

.error-text {
  min-height: 20px;
  color: var(--danger);
  margin: 10px 0 0;
  font-size: 0.9rem;
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 10px;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 760px;
}

th,
td {
  padding: 9px 10px;
  text-align: left;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  font-size: 0.9rem;
}

th {
  cursor: pointer;
  background: rgba(255, 255, 255, 0.05);
  position: sticky;
  top: 0;
}

th:hover {
  background: rgba(255, 255, 255, 0.11);
}

tbody tr:nth-child(even) {
  background: rgba(255, 255, 255, 0.015);
}


.result-view-tabs {
  display: inline-flex;
  gap: 8px;
  margin: 2px 0 12px;
}

.view-tab {
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted-strong);
  border-radius: 999px;
  padding: 6px 12px;
  cursor: pointer;
  transition: all 140ms ease;
}

.view-tab.active {
  background: linear-gradient(120deg, var(--accent), var(--accent-2));
  border-color: transparent;
  color: #07141d;
  font-weight: 700;
}

.view-pane {
  display: none;
}

.view-pane.active {
  display: block;
}

.heatmap-legend {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.heat-badge {
  font-size: 0.72rem;
  letter-spacing: 0.05em;
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: #f5fbff;
}

.heatmap-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 10px;
}

.heatmap-card {
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 10px;
  padding: 10px;
  display: grid;
  gap: 4px;
  min-height: 92px;
  transition: transform 120ms ease;
}

.heatmap-card:hover {
  transform: translateY(-1px);
}

.heatmap-card strong {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.84rem;
}

.heatmap-card small {
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.72rem;
  overflow: hidden;
  text-overflow: ellipsis;
}

.heatmap-card span {
  font-family: "IBM Plex Mono", monospace;
  font-size: 1.02rem;
  font-weight: 700;
}

.heatmap-empty {
  border: 1px dashed var(--border);
  border-radius: 10px;
  padding: 16px;
  text-align: center;
  color: var(--muted);
}

.signals-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 10px;
}

.signal-card {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.03);
}

.signal-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: flex-start;
  margin-bottom: 8px;
}

.signal-head strong {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.95rem;
}

.signal-head small {
  display: block;
  color: var(--muted);
  margin-top: 2px;
}

.signal-rsi {
  font-family: "IBM Plex Mono", monospace;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
}

.signal-metrics {
  display: grid;
  gap: 6px;
}

.signal-metrics span {
  font-size: 0.82rem;
  color: var(--muted-strong);
}

.signal-metrics b {
  color: var(--text);
  font-family: "IBM Plex Mono", monospace;
  font-weight: 600;
}

.signal-bullish {
  border-color: rgba(45, 204, 116, 0.6);
}

.signal-bearish {
  border-color: rgba(227, 58, 58, 0.6);
}

.signal-both {
  border-color: rgba(252, 213, 53, 0.7);
}

.signal-none {
  border-color: var(--border);
}

.heat-rsi-10 {
  background: linear-gradient(145deg, rgba(227, 58, 58, 0.48), rgba(131, 24, 24, 0.34));
}

.heat-rsi-30 {
  background: linear-gradient(145deg, rgba(236, 126, 44, 0.45), rgba(122, 68, 23, 0.33));
}

.heat-rsi-50 {
  background: linear-gradient(145deg, rgba(95, 116, 138, 0.42), rgba(43, 55, 67, 0.32));
}

.heat-rsi-70 {
  background: linear-gradient(145deg, rgba(74, 161, 89, 0.46), rgba(29, 86, 40, 0.35));
}

.heat-rsi-90 {
  background: linear-gradient(145deg, rgba(45, 204, 116, 0.52), rgba(18, 109, 64, 0.37));
}

.faq-top-panel {
  padding: 10px 12px;
}

.faq-top-details {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  padding: 6px 10px;
}

.faq-top-summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-weight: 700;
  color: var(--muted-strong);
  padding: 4px 2px;
}

.faq-top-summary::-webkit-details-marker {
  display: none;
}

.faq-top-summary::after {
  content: "+";
  font-family: "IBM Plex Mono", monospace;
  color: var(--accent-2);
}

.faq-top-details[open] .faq-top-summary::after {
  content: "-";
}

.faq-top-details .faq-list {
  margin-top: 8px;
}

.faq-list {
  display: grid;
  gap: 10px;
}

.faq-list details {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.03);
}

.faq-list summary {
  cursor: pointer;
  font-weight: 600;
}

.faq-list p {
  margin: 8px 0 0;
  color: var(--muted-strong);
  font-size: 0.9rem;
}


.alerts-panel {
  display: grid;
  gap: 12px;
}

.premium-gate {
  border: 1px dashed rgba(255, 255, 255, 0.3);
  border-radius: 12px;
  padding: 16px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.02));
}

.premium-gate h3 {
  margin: 0;
  font-size: 1.06rem;
}

#alerts-premium-content[hidden] {
  display: none !important;
}

.alerts-title-row {
  align-items: center;
  gap: 10px;
}

.alerts-title-row h3 {
  margin: 0;
  font-size: 1.03rem;
}

.alerts-inline-actions {
  margin-top: 0;
  align-items: center;
}

.alerts-grid {
  align-items: start;
}

.alerts-box {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.02);
  display: grid;
  gap: 10px;
}

.feature-brief {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.03);
  display: grid;
  gap: 8px;
}

.feature-list {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 6px;
}

.feature-list li {
  color: var(--muted-strong);
  font-size: 0.86rem;
  line-height: 1.35;
}

.panel-title-row.compact {
  margin-bottom: 2px;
}

.panel-title-row.compact h3 {
  margin: 0;
  font-size: 1rem;
}

.alerts-rule-form {
  display: grid;
  gap: 10px;
}

.catalog-search-row {
  display: flex;
  gap: 8px;
}

.catalog-search-row input {
  flex: 1;
}

.catalog-results {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 18px;
}

.catalog-pill {
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 4px 10px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  cursor: pointer;
  font-size: 0.78rem;
}

.catalog-pill:hover {
  border-color: var(--accent-2);
}

.rule-channel-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 28px;
}

.rule-channel-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 4px 10px;
  background: rgba(255, 255, 255, 0.03);
  font-size: 0.82rem;
}

.stack-list {
  display: grid;
  gap: 8px;
}

.stack-item {
  border: 1px solid var(--border);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
  padding: 10px;
  display: grid;
  gap: 6px;
}

.stack-item-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.stack-item-head strong {
  font-size: 0.9rem;
}

.stack-item-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  color: var(--muted);
  font-size: 0.8rem;
}

.stack-item-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.stack-muted {
  color: var(--muted);
  font-size: 0.85rem;
}

.event-status-sent {
  color: #7ef2a5;
}

.event-status-failed {
  color: #ff9797;
}

.event-status-stored {
  color: #ffdc7b;
}

.events-box {
  margin-top: 2px;
}

.billing-panel {
  display: grid;
  gap: 12px;
}

.billing-grid {
  align-items: start;
}

.plan-compare-grid {
  align-items: start;
}

.plan-card {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.02);
  display: grid;
  gap: 8px;
}

.plan-card h4 {
  margin: 0;
  font-size: 0.95rem;
}

.plan-card-free {
  border-color: rgba(255, 220, 123, 0.3);
}

.plan-card-premium {
  border-color: rgba(126, 242, 165, 0.3);
}

.billing-form {
  gap: 10px;
}

.billing-invoice {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.03);
  display: grid;
  gap: 8px;
}

.billing-kv {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 8px 10px;
  background: rgba(255, 255, 255, 0.03);
}

.billing-kv span {
  color: var(--muted);
  font-size: 0.82rem;
}

#billing-wallet {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.82rem;
}

#billing-status {
  min-height: 20px;
  margin: 0;
}

#login-mode-toggle {
  justify-self: start;
}

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

.contact-form {
  display: grid;
  gap: 10px;
}

#login-status,
#contact-status {
  min-height: 20px;
  margin: 8px 0 0;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 25;
  display: grid;
  place-items: center;
  padding: 16px;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(3, 9, 14, 0.72);
  backdrop-filter: blur(3px);
}

.modal-card {
  position: relative;
  z-index: 1;
  width: min(440px, 100%);
  border: 1px solid var(--border);
  border-radius: 14px;
  background: linear-gradient(145deg, var(--surface-strong), var(--surface));
  padding: 16px;
  display: grid;
  gap: 12px;
}

.modal-card h3 {
  margin: 0;
  font-size: 1.12rem;
}

.login-form {
  display: grid;
  gap: 10px;
}

#login-error {
  min-height: 20px;
  margin: 0;
}

.history-list {
  display: grid;
  gap: 8px;
}

.history-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.03);
}

.history-item strong {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.86rem;
}

.history-item small {
  color: var(--muted);
}

@media (max-width: 980px) {
  .topbar {
    flex-direction: column;
  }

  .topbar-right {
    justify-items: start;
    width: 100%;
    gap: 8px;
  }

  .topbar-utility-row {
    justify-content: flex-start;
    align-items: flex-start;
    width: 100%;
  }

  .lang-control {
    width: auto;
    justify-content: flex-start;
  }

  .lang-control select {
    min-width: 138px;
  }

  .badge-group {
    justify-content: flex-start;
    width: 100%;
  }

  .auth-strip {
    justify-content: flex-start;
    width: auto;
    max-width: 100%;
  }

  .app-tabs {
    width: 100%;
  }

  .app-tab {
    flex: 1 1 calc(50% - 8px);
    text-align: center;
  }

  .result-view-tabs {
    width: 100%;
  }

  .view-tab {
    flex: 1;
    text-align: center;
  }

  .exchange-tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 4px;
    -webkit-overflow-scrolling: touch;
  }

  .exchange-tab {
    flex: 0 0 auto;
    white-space: nowrap;
    min-height: 40px;
  }

  .app-tab,
  .view-tab,
  .actions .btn {
    min-height: 42px;
  }

  .site-footer {
    flex-wrap: wrap;
  }

  .filter-panel-summary {
    flex-wrap: wrap;
  }

  .filter-panel-summary .muted {
    width: 100%;
    text-align: left;
    margin-right: 0;
  }

  .four-cols,
  .three-cols,
  .two-cols,
  .stat-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 640px) {
  .layout {
    width: calc(100% - 16px);
    margin-top: 10px;
    gap: 10px;
  }

  .topbar {
    gap: 12px;
  }

  .brand-wrap p {
    font-size: 0.9rem;
  }

  .topbar-utility-row {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }

  .lang-control {
    width: 100%;
    justify-content: space-between;
    border-radius: 12px;
    padding: 8px 10px;
  }

  .lang-control span {
    font-size: 0.75rem;
  }

  .lang-control select {
    width: 100%;
    min-width: 0;
    height: 40px;
    font-size: 0.88rem;
  }

  .lang-flag {
    width: 30px;
    height: 21px;
  }

  .auth-strip {
    width: 100%;
    justify-content: flex-start;
  }

  #plan-badge,
  #usage-badge {
    min-height: 34px;
    padding: 7px 10px;
  }

  #auth-action-btn {
    width: 100%;
    min-height: 44px;
    border-radius: 12px;
  }

  .badge-group {
    width: 100%;
  }

  .badge {
    white-space: normal;
    line-height: 1.2;
  }

  .app-nav-panel {
    padding: 8px;
  }

  .app-tabs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .app-tab {
    width: 100%;
    min-height: 44px;
    border-radius: 12px;
    padding: 10px 8px;
  }

  .hero-strip-logo {
    width: 38px;
    height: 38px;
    font-size: 0.84rem;
  }

  .hero-strip-chip {
    font-size: 0.7rem;
    letter-spacing: 0.06em;
  }

  .four-cols,
  .three-cols,
  .two-cols,
  .stat-grid {
    grid-template-columns: 1fr;
  }

  .panel {
    padding: 12px;
  }

  .panel-title-row {
    align-items: flex-start;
    flex-direction: column;
    gap: 6px;
  }

  .exchange-tabs {
    padding-bottom: 2px;
    gap: 6px;
  }

  .exchange-tab {
    min-height: 40px;
    padding: 8px 12px;
  }

  .quote-options {
    flex-wrap: wrap;
    min-height: auto;
  }

  .check-option {
    min-height: 34px;
  }

  .actions {
    gap: 8px;
  }

  .actions .btn {
    flex: 1 1 calc(50% - 8px);
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .result-view-tabs {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    width: 100%;
    gap: 6px;
  }

  .view-tab {
    min-height: 42px;
    border-radius: 10px;
    padding: 8px 6px;
  }

  .table-wrap {
    border: none;
    overflow: visible;
  }

  table {
    min-width: 0;
  }

  thead {
    display: none;
  }

  tbody {
    display: grid;
    gap: 10px;
  }

  tbody tr {
    display: grid;
    gap: 7px;
    padding: 10px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.03);
  }

  tbody tr:nth-child(even) {
    background: rgba(255, 255, 255, 0.03);
  }

  td {
    padding: 0;
    border-bottom: none;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 10px;
    font-size: 0.86rem;
  }

  td::before {
    content: attr(data-label);
    color: var(--muted);
    font-size: 0.7rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    flex: 0 0 40%;
  }

  td[colspan] {
    display: block;
  }

  td[colspan]::before {
    display: none;
  }

  .catalog-search-row {
    flex-direction: column;
  }

  .alerts-inline-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .billing-kv {
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
  }

  #billing-wallet {
    font-size: 0.78rem;
  }

  .modal {
    padding: 8px;
  }

  .modal-card {
    width: 100%;
    padding: 14px;
  }

  .login-form .actions {
    gap: 8px;
  }

  .login-form .actions .btn {
    flex: 1 1 100%;
  }
}
