:root {
  color-scheme: dark;
  --bg: #090b10;
  --surface: #11151d;
  --surface-2: #161b24;
  --surface-3: #1d2430;
  --line: #2a3341;
  --text: #edf2f7;
  --muted: #8d99aa;
  --green: #2bd576;
  --green-dim: rgba(43, 213, 118, 0.12);
  --amber: #f3b342;
  --amber-dim: rgba(243, 179, 66, 0.13);
  --red: #ff5b66;
  --red-dim: rgba(255, 91, 102, 0.13);
  --cyan: #5dc6ff;
  --shadow: 0 18px 48px rgba(0, 0, 0, 0.34);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  height: 100vh;
  overflow: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
}

.hidden {
  display: none !important;
}

#app {
  height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 10px 12px 12px;
  overflow: hidden;
  background: var(--bg);
}

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

.auth-screen,
.expired-screen {
  position: fixed;
  inset: 0;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px;
  overflow: auto;
  background:
    radial-gradient(circle at 50% 22%, rgba(93, 198, 255, 0.09), transparent 30%),
    radial-gradient(circle at 42% 70%, rgba(43, 213, 118, 0.06), transparent 28%),
    #090b10;
}

.auth-screen {
  align-content: center;
}

.expired-screen {
  z-index: 20;
}

.auth-copy,
.auth-panel,
.expired-screen section {
  width: 100%;
  max-width: 460px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(17, 21, 29, 0.98), rgba(13, 17, 24, 0.98));
  box-shadow: 0 26px 70px rgba(0, 0, 0, 0.42), inset 0 1px 0 rgba(255, 255, 255, 0.035);
  padding: 24px;
}

.auth-copy {
  display: grid;
  gap: 14px;
  align-content: center;
  min-height: 390px;
}

.auth-copy h1,
.expired-screen h1 {
  font-size: 34px;
}

.auth-copy p,
.expired-screen p,
.disclaimer {
  color: var(--muted);
  line-height: 1.5;
  font-size: 14px;
}

.auth-points {
  display: grid;
  gap: 8px;
}

.auth-points span,
.payment-box span {
  display: block;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #0d1118;
  color: #cbd3df;
  font-size: 13px;
}

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 16px;
}

.auth-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.auth-brand img {
  width: 58px;
  height: 58px;
  border-radius: 12px;
  box-shadow: 0 14px 30px rgba(43, 213, 118, 0.1);
}

.auth-brand h1 {
  font-size: 28px;
}

.auth-brand p {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.auth-description {
  margin-bottom: 16px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #0d1118;
  color: #cbd3df;
  font-size: 12px;
  line-height: 1.45;
}

.auth-vpn-note {
  margin-bottom: 16px;
  padding: 11px 12px;
  border: 1px solid rgba(243, 179, 66, 0.28);
  border-radius: 8px;
  background: rgba(243, 179, 66, 0.08);
  color: #d8c6a1;
  font-size: 12px;
  line-height: 1.45;
}

.auth-tab {
  background: #101722;
}

.auth-tab.active {
  background: var(--cyan);
  border-color: var(--cyan);
  color: #061018;
  font-weight: 850;
}

.auth-form {
  display: grid;
  gap: 14px;
}

.auth-form label {
  display: grid;
  gap: 6px;
  color: #cbd3df;
  font-size: 12px;
  font-weight: 800;
}

.auth-form input {
  width: 100%;
  height: 46px;
  background: #0d1118;
}

.auth-form textarea {
  width: 100%;
  min-height: 96px;
  border-radius: 8px;
  background: #0d1118;
  resize: vertical;
}

.link-button {
  min-height: 34px;
  padding: 4px 0;
  border: 0;
  background: transparent;
  color: var(--cyan);
  font-size: 12px;
  font-weight: 800;
  text-align: center;
}

.link-button:hover {
  color: #92d9ff;
}

.recovery-intro {
  display: grid;
  gap: 4px;
  padding: 11px 12px;
  border: 1px solid rgba(93, 198, 255, 0.26);
  border-radius: 8px;
  background: rgba(93, 198, 255, 0.08);
}

.recovery-intro strong {
  color: var(--cyan);
  font-size: 13px;
}

.recovery-intro span {
  color: #cbd3df;
  font-size: 12px;
  line-height: 1.4;
}

.auth-message {
  min-height: 22px;
  margin-top: 12px;
  color: var(--amber);
  font-size: 13px;
  line-height: 1.4;
}

.auth-message.info {
  color: var(--cyan);
}

.auth-message.ok {
  color: var(--green);
}

.payment-box {
  display: grid;
  gap: 8px;
  margin: 16px 0;
}

.payment-box strong {
  color: var(--cyan);
}

.topbar {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(180deg, #0d121a, #0a0e15);
  position: sticky;
  top: 0;
  z-index: 5;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 230px;
  flex: 0 0 274px;
}

.brand-mark {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: linear-gradient(135deg, #253142, #10141c);
  border: 1px solid #3a4658;
  color: var(--cyan);
  font-weight: 800;
  font-size: 13px;
}

.brand-mark img {
  width: 100%;
  height: 100%;
  display: block;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-size: 20px;
  line-height: 1.1;
}

.brand p,
.panel-label,
.sidebar h2 {
  color: var(--muted);
  font-size: 12px;
}

.session-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: nowrap;
  justify-content: flex-end;
  max-width: 1280px;
  flex: 1 1 auto;
  min-width: 0;
  padding: 8px 10px;
  border: 1px solid rgba(42, 51, 65, 0.8);
  border-radius: 8px;
  background: rgba(13, 17, 24, 0.72);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035);
}

.scan-settings,
.scan-actions,
.account-actions {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  min-width: 0;
}

.scan-settings {
  flex: 0 0 auto;
}

.scan-actions {
  flex: 1 1 auto;
  justify-content: flex-end;
}

.account-actions {
  flex: 0 0 auto;
  padding-left: 10px;
  border-left: 1px solid rgba(42, 51, 65, 0.8);
}

.control-field {
  display: grid;
  gap: 6px;
  min-width: 128px;
}

.control-field span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.status-pill,
.timer-pill,
select,
input,
button {
  height: 42px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--text);
  padding: 0 14px;
  font-size: 13px;
}

select {
  min-width: 124px;
}

button {
  min-width: 98px;
}

.status-pill {
  display: flex;
  align-items: center;
  color: var(--cyan);
}

.status-pill.online {
  color: var(--green);
  background: rgba(43, 213, 118, 0.12);
  border-color: rgba(43, 213, 118, 0.34);
}

.status-pill.issue {
  color: var(--amber);
  background: rgba(243, 179, 66, 0.12);
  border-color: rgba(243, 179, 66, 0.32);
}

.status-pill.offline {
  color: var(--red);
  background: rgba(255, 91, 102, 0.12);
  border-color: rgba(255, 91, 102, 0.36);
}

.timer-pill {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 96px;
  color: var(--amber);
  background: rgba(243, 179, 66, 0.1);
  border-color: rgba(243, 179, 66, 0.28);
  font-weight: 800;
}

.timer-pill.scanning {
  color: var(--green);
  background: rgba(43, 213, 118, 0.12);
  border-color: rgba(43, 213, 118, 0.35);
}

.scan-progress {
  width: 138px;
  height: 42px;
  display: grid;
  gap: 5px;
  padding: 6px 9px;
  border: 1px solid rgba(93, 198, 255, 0.28);
  border-radius: 8px;
  background: #101722;
  opacity: 0.72;
}

.scan-progress.active {
  opacity: 1;
}

.scan-progress-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: var(--cyan);
  font-size: 11px;
  font-weight: 850;
}

.scan-dots {
  display: inline-flex;
  gap: 3px;
  visibility: hidden;
}

.scan-progress.active .scan-dots {
  visibility: visible;
}

.scan-dots i {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--cyan);
  animation: scanDot 1s infinite ease-in-out;
}

.scan-dots i:nth-child(2) {
  animation-delay: 0.16s;
}

.scan-dots i:nth-child(3) {
  animation-delay: 0.32s;
}

.scan-progress-track {
  height: 6px;
  overflow: hidden;
  border-radius: 999px;
  background: #263140;
}

.scan-progress-track span {
  display: block;
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--cyan), var(--green));
  transition: width 0.25s ease;
}

@keyframes scanDot {
  0%,
  80%,
  100% {
    opacity: 0.35;
    transform: translateY(0);
  }
  40% {
    opacity: 1;
    transform: translateY(-2px);
  }
}

button {
  cursor: pointer;
}

button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.primary {
  background: linear-gradient(180deg, #32df80, var(--green));
  border-color: var(--green);
  color: #06120b;
  font-weight: 800;
  box-shadow: 0 8px 18px rgba(43, 213, 118, 0.12);
}

.secondary {
  background: linear-gradient(180deg, #273142, #202837);
}

.stop-scan {
  background: rgba(255, 91, 102, 0.14);
  border-color: rgba(255, 91, 102, 0.36);
  color: var(--red);
  font-weight: 850;
}

.danger {
  background: var(--red-dim);
  color: var(--red);
}

.admin-button,
.account-button,
.logout-button {
  min-width: 82px;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(4, 6, 10, 0.72);
  backdrop-filter: blur(10px);
}

.settings-modal {
  width: min(760px, 100%);
  max-height: min(780px, calc(100vh - 40px));
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(180deg, #121721, #0d1118);
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.48);
  padding: 18px;
}

.settings-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.settings-head h2 {
  margin-top: 4px;
  font-size: 22px;
}

.icon-close {
  width: 38px;
  height: 38px;
  padding: 0;
  border-radius: 8px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  color: var(--text);
  font-size: 24px;
  line-height: 1;
}

.settings-tabs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin: 16px 0 12px;
}

.settings-tab {
  min-height: 40px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #0d1118;
  color: var(--muted);
  font-weight: 800;
}

.settings-tab.active {
  border-color: rgba(93, 198, 255, 0.48);
  background: rgba(93, 198, 255, 0.12);
  color: var(--cyan);
}

.settings-message {
  min-height: 22px;
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 13px;
}

.settings-message.ok {
  color: var(--green);
}

.settings-message.warn {
  color: var(--amber);
}

.settings-message.info {
  color: var(--cyan);
}

.settings-pane {
  display: none;
}

.settings-pane.active {
  display: block;
}

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

.settings-grid div,
.settings-note,
.guide-list article {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #0d1118;
}

.settings-grid div {
  display: grid;
  gap: 6px;
  min-height: 76px;
  padding: 12px;
}

.settings-grid span,
.guide-list p {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.settings-grid strong {
  min-width: 0;
  overflow-wrap: anywhere;
}

.settings-note {
  margin-top: 12px;
  padding: 12px;
  color: #cbd3df;
  font-size: 13px;
  line-height: 1.5;
}

.settings-form {
  display: grid;
  gap: 12px;
}

.settings-form label {
  display: grid;
  gap: 7px;
  color: #cbd3df;
  font-size: 13px;
  font-weight: 750;
}

.settings-form input,
.settings-form select,
.settings-form textarea {
  width: 100%;
  border-radius: 8px;
  resize: vertical;
}

.settings-form button {
  justify-self: end;
  min-width: 180px;
}

.wallet-copy-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.wallet-copy-row input {
  overflow-wrap: anywhere;
}

.wallet-copy-row button {
  min-width: 78px;
}

.payment-warning {
  padding: 11px 12px;
  border: 1px solid rgba(255, 91, 102, 0.3);
  border-radius: 8px;
  background: rgba(255, 91, 102, 0.09);
  color: #f2b8bd;
  font-size: 12px;
  line-height: 1.45;
}

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

.guide-list article {
  padding: 12px;
}

.guide-list h3 {
  margin: 0 0 6px;
  font-size: 14px;
}

.shell {
  flex: 1;
  height: auto;
  display: grid;
  grid-template-columns: 200px minmax(560px, 1fr) 300px;
  gap: 10px;
  padding: 0;
  min-height: 0;
  overflow: hidden;
}

.sidebar,
.inspector,
.column {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.sidebar,
.inspector {
  padding: 12px;
  overflow: auto;
}

.sidebar section + section,
.inspector section + section {
  margin-top: 20px;
}

.sidebar h2 {
  margin-bottom: 8px;
  text-transform: uppercase;
  font-weight: 700;
}

.universe-note {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
  margin-bottom: 10px;
}

.data-notice {
  border: 1px solid rgba(93, 198, 255, 0.24);
  border-radius: 8px;
  background: rgba(93, 198, 255, 0.07);
  color: #cbd3df;
  padding: 10px;
  font-size: 11px;
  line-height: 1.45;
}

.data-notice.ok {
  border-color: rgba(43, 213, 118, 0.28);
  background: rgba(43, 213, 118, 0.08);
}

.data-notice.issue {
  border-color: rgba(255, 91, 102, 0.34);
  background: rgba(255, 91, 102, 0.09);
  color: #ffd0d4;
}

.nav-item {
  width: 100%;
  text-align: left;
  margin-bottom: 8px;
  background: transparent;
}

.nav-item.active {
  background: #202938;
  border-color: #40506a;
}

.danger-nav.active {
  color: var(--red);
  background: rgba(255, 91, 102, 0.12);
  border-color: rgba(255, 91, 102, 0.36);
}

textarea {
  width: 100%;
  min-height: 130px;
  resize: vertical;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #0c1017;
  color: var(--text);
  padding: 10px;
  line-height: 1.5;
  font-size: 13px;
}

.universe-groups {
  display: grid;
  gap: 10px;
}

.universe-card {
  border: 1px solid var(--line);
  border-left: 3px solid var(--cyan);
  border-radius: 8px;
  background: #0d1118;
  padding: 9px;
}

.universe-card.hyperbeta {
  border-left-color: var(--amber);
}

.universe-card.manual_quality {
  border-left-color: var(--green);
}

.universe-card.manual_danger {
  border-left-color: var(--red);
}

.universe-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.universe-card-head strong {
  font-size: 13px;
}

.universe-card-head span {
  min-width: 28px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: var(--surface-3);
  color: var(--cyan);
  font-size: 12px;
  font-weight: 850;
}

.universe-card p {
  margin-top: 7px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.4;
}

.universe-symbols {
  max-height: 66px;
  overflow: auto;
  margin-top: 8px;
  padding: 7px;
  border-radius: 8px;
  border: 1px solid #202837;
  background: #090d13;
  color: #cbd3df;
  font-size: 11px;
  line-height: 1.45;
  word-break: break-word;
}

.guardrail {
  display: flex;
  align-items: center;
  gap: 9px;
  color: #c9d2df;
  font-size: 13px;
  margin-top: 10px;
}

.guardrail span {
  width: 7px;
  height: 7px;
  background: var(--cyan);
  border-radius: 50%;
}

.board {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  min-width: 0;
  min-height: 0;
}

.column {
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.column-head {
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 14px;
  border-bottom: 1px solid var(--line);
}

.column-head h2 {
  font-size: 13px;
  letter-spacing: 0;
}

.column-head span {
  min-width: 28px;
  height: 26px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: var(--surface-3);
  font-weight: 800;
}

.column-guide {
  min-height: 54px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 11px;
  line-height: 1.4;
  background: #0d1118;
}

.enter .column-head h2,
.enter .column-head span {
  color: var(--green);
}

.watch .column-head h2,
.watch .column-head span {
  color: var(--amber);
}

.favourable .column-head h2,
.favourable .column-head span {
  color: var(--cyan);
}

.danger-zone .column-head h2,
.danger-zone .column-head span {
  color: var(--red);
}

.cards {
  padding: 12px;
  overflow-y: auto;
  overflow-x: hidden;
  flex: 1;
  min-height: 0;
}

.signal-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 11px;
  background: #0d1118;
  margin-bottom: 10px;
  cursor: pointer;
  transition: border-color 0.15s ease, transform 0.15s ease, background 0.15s ease;
}

.signal-card.enter {
  background: linear-gradient(180deg, rgba(43, 213, 118, 0.09), #0d1118 42%);
  box-shadow: inset 0 0 0 1px rgba(43, 213, 118, 0.18);
}

.signal-card:hover,
.signal-card.selected {
  transform: translateY(-1px);
  border-color: #56677f;
  background: #121824;
}

.signal-card.enter {
  border-left: 3px solid var(--green);
}

.signal-card.side-long {
  box-shadow: inset 0 0 0 1px rgba(43, 213, 118, 0.16);
}

.signal-card.side-short {
  box-shadow: inset 0 0 0 1px rgba(255, 91, 102, 0.18);
}

.signal-card.watch {
  border-left: 3px solid var(--amber);
}

.signal-card.favourable {
  border-left: 3px solid var(--cyan);
  background: linear-gradient(180deg, rgba(93, 198, 255, 0.08), #0d1118 42%);
}

.signal-card.danger {
  border-left: 3px solid var(--red);
}

.card-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
}

.card-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
  min-width: 0;
}

.card-top > div:first-child {
  min-width: 0;
}

.card-badges {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-start;
  min-width: 0;
}

.group-note {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  margin-top: 8px;
  border-radius: 999px;
  padding: 4px 8px;
  background: #182131;
  border: 1px solid #2d394c;
  color: var(--cyan);
  font-size: 11px;
  font-weight: 850;
}

.rank {
  border-radius: 999px;
  padding: 4px 7px;
  background: #232b38;
  color: #b9c4d2;
  font-size: 10px;
  font-weight: 850;
  white-space: nowrap;
}

.side-badge {
  min-width: 48px;
  border-radius: 999px;
  padding: 4px 8px;
  text-align: center;
  font-size: 11px;
  font-weight: 950;
  white-space: nowrap;
}

.side-badge.long {
  background: rgba(43, 213, 118, 0.14);
  color: var(--green);
}

.side-badge.short {
  background: rgba(255, 91, 102, 0.14);
  color: var(--red);
}

.side-badge.none {
  background: #232b38;
  color: var(--muted);
}

.direction-strip,
.inspector-direction {
  margin-top: 9px;
  border-radius: 8px;
  padding: 8px 10px;
  text-align: center;
  font-size: 18px;
  font-weight: 950;
  letter-spacing: 0;
}

.direction-strip.long,
.inspector-direction.long {
  background: rgba(43, 213, 118, 0.12);
  color: var(--green);
  border: 1px solid rgba(43, 213, 118, 0.32);
}

.direction-strip.short,
.inspector-direction.short {
  background: rgba(255, 91, 102, 0.12);
  color: var(--red);
  border: 1px solid rgba(255, 91, 102, 0.34);
}

.direction-strip.none,
.inspector-direction.none {
  background: #111723;
  color: var(--muted);
  border: 1px solid var(--line);
  font-size: 14px;
}

.action-strip {
  margin-top: 10px;
  padding: 8px 9px;
  border-radius: 8px;
  background: var(--green-dim);
  color: var(--green);
  font-size: 11px;
  font-weight: 850;
  line-height: 1.25;
}

.favourable-strip {
  background: rgba(93, 198, 255, 0.1);
  color: var(--cyan);
}

.intent-strip {
  margin-top: 8px;
  padding: 8px 9px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #101722;
  font-size: 11px;
  line-height: 1.25;
}

.intent-strip span {
  display: block;
  color: var(--muted);
  font-size: 10px;
  margin-bottom: 3px;
}

.intent-strip strong {
  display: block;
  font-size: 12px;
}

.intent-strip.good {
  border-color: rgba(43, 213, 118, 0.32);
  color: var(--green);
  background: rgba(43, 213, 118, 0.08);
}

.intent-strip.warn {
  border-color: rgba(243, 179, 66, 0.34);
  color: var(--amber);
  background: rgba(243, 179, 66, 0.08);
}

.intent-strip.bad {
  border-color: rgba(255, 91, 102, 0.36);
  color: var(--red);
  background: rgba(255, 91, 102, 0.08);
}

.intent-strip.neutral {
  color: #cbd3df;
}

.symbol {
  font-size: 16px;
  font-weight: 850;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.side {
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.label {
  border-radius: 999px;
  padding: 4px 8px;
  font-size: 11px;
  font-weight: 850;
  white-space: nowrap;
}

.label.enter {
  background: var(--green-dim);
  color: var(--green);
}

.label.watch {
  background: var(--amber-dim);
  color: var(--amber);
}

.label.favourable {
  background: rgba(93, 198, 255, 0.12);
  color: var(--cyan);
}

.label.danger {
  background: var(--red-dim);
  color: var(--red);
}

.card-row {
  margin-top: 10px;
  color: #cbd3df;
  font-size: 12px;
  flex-wrap: wrap;
}

.metric {
  margin-top: 10px;
}

.metric-label {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 11px;
  margin-bottom: 5px;
}

.bar {
  height: 7px;
  border-radius: 999px;
  overflow: hidden;
  background: #252d3a;
}

.bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
}

.empty {
  min-height: 120px;
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
  border: 1px dashed #354153;
  border-radius: 8px;
}

.limit-note {
  width: 100%;
  height: auto;
  border-radius: 8px;
  border: 1px dashed #394456;
  color: var(--muted);
  padding: 10px;
  text-align: center;
  font-size: 12px;
}

.limit-toggle {
  background: #101722;
  cursor: pointer;
  line-height: 1.35;
}

.limit-toggle:hover {
  border-color: #5b6c85;
  color: var(--cyan);
  background: #131c29;
}

.selected-panel {
  min-height: 260px;
}

.inquiry-controls {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
  margin-top: 10px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #0d1118;
}

.inquiry-controls select,
.inquiry-controls input,
.inquiry-controls button {
  width: 100%;
}

.inquiry-controls .deep-button {
  margin-top: 0;
}

.inquiry-results {
  display: grid;
  gap: 6px;
  min-height: 24px;
}

.search-hint {
  color: var(--muted);
  font-size: 11px;
  padding: 2px 0;
}

.search-result {
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 0 9px;
  background: #111723;
  text-align: left;
}

.search-result span {
  font-size: 12px;
  font-weight: 850;
  overflow: hidden;
  text-overflow: ellipsis;
}

.search-result small {
  color: var(--cyan);
  font-size: 10px;
  white-space: nowrap;
}

.empty-state {
  color: var(--muted);
  padding: 16px 0;
  font-size: 14px;
}

.detail-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 10px;
}

.detail-title.side-long strong {
  color: var(--green);
}

.detail-title.side-short strong {
  color: var(--red);
}

.detail-title strong {
  font-size: 24px;
}

.action-box {
  margin-top: 14px;
  padding: 12px;
  border-radius: 8px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  font-size: 13px;
  line-height: 1.45;
}

.deep-button {
  width: 100%;
  height: 36px;
  margin-top: 12px;
  background: var(--cyan);
  border-color: var(--cyan);
  color: #061018;
  font-weight: 850;
}

.deep-button.stop-scan,
.inquiry-controls .deep-button.stop-scan {
  background: rgba(255, 91, 102, 0.14);
  border-color: rgba(255, 91, 102, 0.42);
  color: var(--red);
  box-shadow: none;
}

.deep-panel {
  margin-top: 10px;
}

.deep-head {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 8px;
}

.deep-head strong {
  color: #f3f6fb;
}

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

.deep-card {
  border: 1px solid var(--line);
  border-left: 3px solid #435166;
  border-radius: 8px;
  background: #0d1118;
  padding: 10px;
}

.deep-card.enter {
  border-left-color: var(--green);
}

.deep-card.favourable {
  border-left-color: var(--cyan);
}

.deep-card.watch {
  border-left-color: var(--amber);
}

.deep-card.danger {
  border-left-color: var(--red);
}

.deep-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.deep-card-top strong {
  color: #f3f6fb;
  font-size: 13px;
}

.deep-card .side-badge {
  display: inline-block;
  margin-bottom: 8px;
}

.deep-reason {
  margin-top: 8px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}

.paper-ticket {
  margin-top: 10px;
  padding: 12px;
  border-radius: 8px;
  border: 1px solid rgba(93, 198, 255, 0.28);
  background: rgba(93, 198, 255, 0.07);
}

.safe-ticket {
  border-color: rgba(43, 213, 118, 0.35);
}

.caution-ticket {
  border-color: rgba(243, 179, 66, 0.38);
  background: rgba(243, 179, 66, 0.07);
}

.block-ticket {
  border-color: rgba(255, 91, 102, 0.4);
  background: rgba(255, 91, 102, 0.07);
}

.muted-ticket {
  color: var(--muted);
  border-color: var(--line);
  background: #0d1118;
  font-size: 13px;
}

.ticket-head,
.position-top,
.position-row {
  display: flex;
  justify-content: space-between;
  gap: 8px;
}

.ticket-head {
  align-items: center;
  color: var(--cyan);
  font-size: 12px;
  font-weight: 850;
}

.ticket-grid,
.portfolio-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 10px;
}

.ticket-grid div,
.portfolio-summary div {
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #0d1118;
}

.ticket-grid span,
.portfolio-summary span {
  display: block;
  color: var(--muted);
  font-size: 10px;
}

.ticket-grid strong,
.portfolio-summary strong {
  display: block;
  margin-top: 3px;
  font-size: 12px;
}

.paper-button,
.close-paper,
.clear-paper {
  width: 100%;
  margin-top: 10px;
}

.paper-button {
  background: var(--cyan);
  border-color: var(--cyan);
  color: #061018;
  font-weight: 850;
}

.paper-button:disabled {
  background: #263140;
  border-color: #354153;
  color: var(--muted);
}

.selector-group {
  margin-top: 10px;
}

.selector-group > span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  margin-bottom: 6px;
}

.selector-group > div {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 6px;
}

.mini-select {
  height: 30px;
  padding: 0;
  font-size: 12px;
  font-weight: 850;
}

.mini-select.active {
  background: var(--cyan);
  border-color: var(--cyan);
  color: #061018;
}

.ticket-warning {
  margin-top: 10px;
  color: var(--amber);
  font-size: 12px;
  line-height: 1.35;
}

.clear-paper {
  height: 32px;
  background: transparent;
  color: var(--muted);
}

.decision-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 10px;
}

.decision-grid div {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #0d1118;
  padding: 9px;
}

.decision-grid span {
  display: block;
  color: var(--muted);
  font-size: 11px;
}

.decision-grid strong {
  display: block;
  margin-top: 3px;
  font-size: 13px;
}

.reason-list {
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
}

.reason-list li {
  padding: 8px 0;
  border-bottom: 1px solid #202837;
  color: #cbd3df;
  font-size: 13px;
}

.history-list {
  margin-top: 10px;
}

.positions-list {
  margin-top: 10px;
}

.account-status {
  margin-top: 10px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #0d1118;
  color: var(--cyan);
  font-size: 12px;
  font-weight: 850;
}

.position-card {
  border: 1px solid var(--line);
  border-left: 3px solid var(--cyan);
  border-radius: 8px;
  background: #0d1118;
  padding: 10px;
  margin-bottom: 10px;
}

.wallet-card {
  border-left-color: var(--green);
}

.live-position {
  border-left-color: var(--amber);
}

.position-top {
  align-items: center;
  margin-bottom: 8px;
}

.position-top strong {
  font-size: 16px;
}

.position-top span {
  color: var(--cyan);
  font-size: 12px;
  font-weight: 850;
}

.position-row {
  color: #cbd3df;
  font-size: 12px;
  padding: 4px 0;
  border-top: 1px solid #202837;
}

.exit-alert {
  margin-top: 8px;
  padding: 8px 9px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 850;
  text-align: center;
}

.exit-profit {
  color: var(--green);
  background: var(--green-dim);
}

.exit-cut {
  color: var(--red);
  background: var(--red-dim);
}

.exit-wait {
  color: var(--amber);
  background: var(--amber-dim);
}

.exit-runner {
  color: var(--cyan);
  background: rgba(93, 198, 255, 0.1);
}

.closed-trade {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  color: var(--muted);
  border-top: 1px solid #202837;
  padding: 8px 0;
  font-size: 12px;
}

.mini-empty {
  min-height: 64px;
}

.pnl-pos {
  color: var(--green);
}

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

.history-item {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 9px 0;
  border-bottom: 1px solid #202837;
  color: #cbd3df;
  font-size: 12px;
}

.statusbar {
  min-height: 32px;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  background: #0c1017;
  font-size: 12px;
  line-height: 1.35;
  flex-shrink: 0;
}

.footer-disclaimer {
  margin-left: auto;
  color: #cbd3df;
  white-space: normal;
  text-align: right;
}

.bybit-ok {
  color: var(--green);
}

.bybit-issue {
  color: var(--red);
  font-weight: 850;
}

.heartbeat-online {
  color: var(--green);
}

.heartbeat-issue {
  color: var(--amber);
  font-weight: 850;
}

.heartbeat-offline {
  color: var(--red);
  font-weight: 850;
}

@media (max-width: 1180px) {
  body {
    height: auto;
    min-height: 100vh;
    overflow: auto;
  }

  .topbar {
    position: sticky;
  }

  .shell {
    height: auto;
    grid-template-columns: 1fr;
    overflow: visible;
  }

  .inspector {
    display: block;
  }

  .sidebar {
    display: block;
  }

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

  textarea {
    min-height: 88px;
  }
}

@media (max-width: 860px) {
  body {
    height: auto;
    min-height: 100vh;
    overflow: auto;
  }

  .topbar {
    height: auto;
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
    padding: 12px;
    position: sticky;
  }

  .brand {
    width: 100%;
    min-width: 0;
    flex: 0 1 auto;
  }

  .session-controls {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    padding: 8px;
  }

  .session-controls > * {
    width: 100%;
    min-width: 0;
  }

  .scan-settings,
  .scan-actions,
  .account-actions {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    padding-left: 0;
    border-left: 0;
  }

  .scan-progress {
    width: 100%;
  }

  .status-pill,
  .timer-pill,
  select,
  input,
  button {
    min-width: 0;
    padding-inline: 10px;
    font-size: 12px;
  }

  .shell {
    height: auto;
    grid-template-columns: 1fr;
    overflow: visible;
    padding: 8px;
    gap: 8px;
  }

  .sidebar {
    display: block;
    order: 1;
    padding: 10px;
  }

  .sidebar section + section {
    margin-top: 12px;
  }

  textarea {
    min-height: 74px;
    max-height: 120px;
  }

  .guardrail {
    font-size: 12px;
    margin-top: 7px;
  }

  .inspector {
    display: block;
    order: 2;
    padding: 10px;
    max-height: none;
    overflow: visible;
  }

  .board {
    order: 3;
    grid-template-columns: 1fr;
    gap: 8px;
    min-height: 0;
  }

  .column {
    overflow: visible;
    min-height: auto;
  }

  .column-head {
    height: 44px;
    padding-inline: 12px;
  }

  .cards {
    max-height: 62vh;
    overflow-y: auto;
    padding: 10px;
  }

  .signal-card {
    padding: 10px;
  }

  .direction-strip,
  .inspector-direction {
    font-size: 16px;
  }

  .detail-title strong {
    font-size: 22px;
  }

  .decision-grid,
  .ticket-grid,
  .portfolio-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .statusbar {
    position: static;
    flex-wrap: wrap;
    height: auto;
    gap: 8px 14px;
    padding: 10px 12px;
    white-space: normal;
  }

  .footer-disclaimer {
    width: 100%;
    margin-left: 0;
    text-align: left;
  }

  .modal-backdrop {
    align-items: start;
    padding: 12px;
  }

  .settings-modal {
    max-height: calc(100vh - 24px);
    padding: 14px;
  }

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

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

@media (max-width: 520px) {
  .auth-screen,
  .expired-screen {
    align-items: center;
    padding: 14px;
  }

  .auth-copy,
  .auth-panel,
  .expired-screen section {
    padding: 16px;
  }

  .auth-copy {
    min-height: auto;
  }

  .auth-copy h1,
  .expired-screen h1 {
    font-size: 28px;
  }

  .auth-brand {
    align-items: center;
  }

  .auth-brand img {
    width: 50px;
    height: 50px;
  }

  .auth-brand h1 {
    font-size: 24px;
  }

  .brand-mark {
    width: 38px;
    height: 38px;
  }

  h1 {
    font-size: 19px;
  }

  .brand p {
    font-size: 11px;
    line-height: 1.3;
  }

  .session-controls {
    grid-template-columns: 1fr;
  }

  .settings-tabs {
    grid-template-columns: 1fr;
  }

  .settings-form button {
    width: 100%;
    justify-self: stretch;
  }

  .wallet-copy-row {
    grid-template-columns: 1fr;
  }

  .universe-groups {
    grid-template-columns: 1fr;
  }

  .scan-settings,
  .scan-actions,
  .account-actions {
    grid-column: auto;
    grid-template-columns: 1fr;
  }

  .status-pill,
  .timer-pill,
  select,
  input,
  button {
    min-height: 40px;
    height: auto;
  }

  .cards {
    max-height: none;
  }

  .card-row,
  .ticket-head,
  .position-top,
  .position-row,
  .history-item {
    align-items: flex-start;
  }

  .decision-grid,
  .ticket-grid,
  .portfolio-summary,
  .selector-group > div {
    grid-template-columns: 1fr;
  }

  .detail-title {
    align-items: flex-start;
    gap: 8px;
    flex-direction: column;
  }
}
