@font-face {
  font-family: system-ui-fa;
  src: local("Tahoma");
}

:root {
  --bg: #0f172a;
  --panel: #111827;
  --panel-2: #1f2937;
  --text: #f9fafb;
  --muted: #9ca3af;
  --border: rgba(255, 255, 255, 0.08);
  --gold: #fbbf24;
  --green: #22c55e;
  --red: #ef4444;
  --blue: #38bdf8;
  --shadow: 0 20px 50px rgba(0, 0, 0, 0.28);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Tahoma, system-ui-fa, Arial, sans-serif;
  background:
    radial-gradient(circle at top right, rgba(251, 191, 36, 0.18), transparent 32rem),
    radial-gradient(circle at bottom left, rgba(56, 189, 248, 0.12), transparent 30rem),
    var(--bg);
  color: var(--text);
  min-height: 100vh;
}

.app-shell {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  padding: 32px 0;
}

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

.eyebrow {
  color: var(--gold);
  margin: 0 0 8px;
  font-size: 14px;
}

h1 {
  margin: 0;
  font-size: clamp(28px, 4vw, 46px);
  line-height: 1.25;
}

.subtitle {
  margin: 12px 0 0;
  color: var(--muted);
  max-width: 720px;
  line-height: 2;
}

.header-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.btn {
  border: 0;
  border-radius: 16px;
  padding: 12px 18px;
  font-family: inherit;
  cursor: pointer;
  color: var(--text);
  transition: 0.2s ease;
  white-space: nowrap;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn.primary {
  background: linear-gradient(135deg, #f59e0b, #d97706);
}

.btn.secondary {
  background: var(--panel-2);
  border: 1px solid var(--border);
}

.hidden {
  display: none;
}

.status-bar {
  background: rgba(17, 24, 39, 0.78);
  border: 1px solid var(--border);
  border-radius: 22px;
  padding: 16px 18px;
  margin-bottom: 28px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
  color: var(--muted);
}

.status-bar strong {
  color: var(--text);
}

.status-times {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.status-times span {
  white-space: nowrap;
}

.status-dot {
  width: 10px;
  height: 10px;
  background: var(--gold);
  display: inline-block;
  border-radius: 999px;
  margin-left: 8px;
}

.status-dot.ok {
  background: var(--green);
}

.status-dot.error {
  background: var(--red);
}

.section {
  margin-bottom: 34px;
}

.section-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.section-title h2 {
  margin: 0;
  font-size: 22px;
}

.section-title span {
  color: var(--muted);
  font-size: 13px;
}

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

.card {
  background: rgba(17, 24, 39, 0.88);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 18px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
  min-height: 150px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.card-title {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.8;
}

.price {
  font-size: 25px;
  font-weight: 800;
  letter-spacing: -0.5px;
  margin: 0;
}

.unit {
  color: var(--muted);
  font-size: 12px;
  margin-right: 4px;
}

.change {
  margin-top: 12px;
  display: inline-flex;
  width: fit-content;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 13px;
}

.change.up {
  color: #86efac;
  background: rgba(34, 197, 94, 0.12);
}

.change.down {
  color: #fca5a5;
  background: rgba(239, 68, 68, 0.12);
}

.change.neutral {
  color: var(--muted);
  background: rgba(156, 163, 175, 0.12);
}

.footer {
  color: var(--muted);
  line-height: 2;
  border-top: 1px solid var(--border);
  padding-top: 20px;
  margin-top: 30px;
}

code {
  background: rgba(255, 255, 255, 0.08);
  padding: 3px 7px;
  border-radius: 8px;
  direction: ltr;
  display: inline-block;
}

.skeleton {
  opacity: 0.6;
  animation: pulse 1.2s infinite;
}

@keyframes pulse {
  0%, 100% {
    opacity: 0.45;
  }

  50% {
    opacity: 0.85;
  }
}

@media (max-width: 1100px) {
  .grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 820px) {
  .header {
    flex-direction: column;
  }

  .status-bar {
    flex-direction: column;
  }

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

@media (max-width: 520px) {
  .app-shell {
    width: min(100% - 20px, 1280px);
    padding: 18px 0;
  }

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

  .card {
    min-height: 130px;
  }

  .price {
    font-size: 22px;
  }
}

.card-extra {
  margin-top: 12px;
  display: grid;
  gap: 4px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.8;
}

.card-extra strong {
  color: var(--gold);
  font-weight: 700;
}

.card-extra small {
  color: var(--muted);
}
.opportunity-card {
  border-color: rgba(245, 158, 11, 0.35);
}

.opportunity-card.strong-buy {
  border-color: rgba(52, 211, 153, 0.65);
  background: linear-gradient(
    135deg,
    rgba(52, 211, 153, 0.14),
    rgba(255, 255, 255, 0.06)
  );
}

.opportunity-card.buy {
  border-color: rgba(52, 211, 153, 0.45);
}

.opportunity-card.light-buy,
.opportunity-card.weak {
  border-color: rgba(251, 191, 36, 0.45);
}

.opportunity-card.warning-sell {
  border-color: rgba(251, 146, 60, 0.6);
  background: linear-gradient(
    135deg,
    rgba(251, 146, 60, 0.12),
    rgba(255, 255, 255, 0.06)
  );
}

.opportunity-card.sell {
  border-color: rgba(251, 113, 133, 0.65);
  background: linear-gradient(
    135deg,
    rgba(251, 113, 133, 0.14),
    rgba(255, 255, 255, 0.06)
  );
}

.opportunity-card.strong-sell {
  border-color: rgba(239, 68, 68, 0.75);
  background: linear-gradient(
    135deg,
    rgba(239, 68, 68, 0.18),
    rgba(255, 255, 255, 0.06)
  );
}

.opportunity-card.neutral {
  border-color: rgba(148, 163, 184, 0.35);
}

.opportunity-extra {
  border-top: 1px solid var(--line);
  padding-top: 10px;
}
/* ===== Ayarbin Pro UI / Login / Mobile polish ===== */
:root {
  --bg: #07111f;
  --panel: rgba(15, 23, 42, 0.78);
  --panel-2: rgba(30, 41, 59, 0.82);
  --panel-3: rgba(2, 6, 23, 0.55);
  --text: #f8fafc;
  --muted: #94a3b8;
  --border: rgba(148, 163, 184, 0.16);
  --gold: #fbbf24;
  --green: #22c55e;
  --red: #ef4444;
  --blue: #38bdf8;
  --violet: #a78bfa;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.34);
}

body {
  background:
    radial-gradient(circle at 86% 8%, rgba(251, 191, 36, 0.18), transparent 26rem),
    radial-gradient(circle at 12% 28%, rgba(56, 189, 248, 0.14), transparent 25rem),
    linear-gradient(180deg, #07111f 0%, #0f172a 46%, #020617 100%);
}

.app-shell {
  width: min(1220px, calc(100% - 28px));
  padding: clamp(16px, 3vw, 34px) 0 calc(22px + env(safe-area-inset-bottom));
}

.hero-header {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(310px, 0.55fr);
  gap: 18px;
  align-items: stretch;
  margin-bottom: 18px;
}

.hero-header.compact {
  grid-template-columns: 1fr auto;
}

.hero-copy,
.account-card,
.admin-panel,
.auth-card,
.auth-hero {
  border: 1px solid var(--border);
  background: linear-gradient(145deg, rgba(15, 23, 42, 0.88), rgba(2, 6, 23, 0.68));
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
  border-radius: 30px;
}

.hero-copy {
  padding: clamp(20px, 4vw, 34px);
  position: relative;
  overflow: hidden;
}

.hero-copy::after {
  content: "";
  position: absolute;
  inset: auto -70px -90px auto;
  width: 220px;
  height: 220px;
  border-radius: 999px;
  background: rgba(251, 191, 36, 0.12);
  filter: blur(8px);
}

.brand-pill {
  width: fit-content;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(251, 191, 36, 0.22);
  color: #fde68a;
  background: rgba(251, 191, 36, 0.08);
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 13px;
  margin-bottom: 14px;
}

.brand-dot {
  width: 9px;
  height: 9px;
  background: var(--gold);
  border-radius: 999px;
  box-shadow: 0 0 0 6px rgba(251, 191, 36, 0.1);
}

.hero-metrics,
.auth-benefits {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 18px;
}

.hero-metrics span,
.auth-benefits span,
.quick-nav a {
  color: #cbd5e1;
  background: rgba(148, 163, 184, 0.08);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 8px 11px;
  font-size: 12px;
  text-decoration: none;
}

.account-card {
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 18px;
}

.account-label {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 8px;
}

.account-card strong {
  display: block;
  font-size: 20px;
  line-height: 1.7;
}

.account-plan {
  display: inline-flex;
  margin-top: 6px;
  font-size: 12px;
  border-radius: 999px;
  padding: 6px 10px;
}

.account-plan.ok { color: #86efac; background: rgba(34, 197, 94, 0.12); }
.account-plan.warn { color: #fcd34d; background: rgba(245, 158, 11, 0.12); }

.account-actions,
.header-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.btn {
  min-height: 44px;
  border-radius: 15px;
  font-weight: 700;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.16);
}

.btn.accent { background: linear-gradient(135deg, #38bdf8, #2563eb); }
.btn.ghost { background: rgba(255, 255, 255, 0.045); border: 1px solid var(--border); }
.full-width { width: 100%; justify-content: center; }

.status-bar,
.quick-nav {
  background: rgba(2, 6, 23, 0.56);
  border: 1px solid var(--border);
  box-shadow: 0 16px 45px rgba(0, 0, 0, 0.22);
}

.quick-nav {
  position: sticky;
  top: 10px;
  z-index: 5;
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 10px;
  border-radius: 22px;
  margin-bottom: 24px;
  backdrop-filter: blur(18px);
  scrollbar-width: none;
}

.quick-nav::-webkit-scrollbar { display: none; }
.quick-nav a { white-space: nowrap; }

.section {
  scroll-margin-top: 92px;
  margin-bottom: 30px;
}

.section-title {
  padding: 0 2px;
}

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

.card {
  position: relative;
  overflow: hidden;
  background: linear-gradient(160deg, rgba(15, 23, 42, 0.92), rgba(30, 41, 59, 0.66));
  border-color: rgba(148, 163, 184, 0.14);
  border-radius: 26px;
  padding: 17px;
  min-height: 158px;
}

.card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: linear-gradient(90deg, rgba(251,191,36,0.9), rgba(56,189,248,0.65), transparent);
  opacity: 0.75;
}

.card-title { font-size: 13px; }
.price {
  font-size: clamp(22px, 2.5vw, 28px);
  line-height: 1.5;
  word-break: break-word;
}

.card-extra {
  border-top: 1px solid var(--border);
  margin-top: 13px;
  padding-top: 11px;
}

.card-extra small,
.lock-text {
  color: var(--muted);
  line-height: 1.9;
}

.premium-lock-card {
  grid-column: 1 / -1;
  min-height: 220px;
  justify-content: center;
  gap: 18px;
}

/* Auth */
.auth-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 18px;
}

.auth-shell {
  width: min(1040px, 100%);
  display: grid;
  grid-template-columns: 1fr 420px;
  gap: 18px;
  align-items: stretch;
}

.auth-hero,
.auth-card {
  padding: clamp(22px, 4vw, 36px);
}

.auth-hero h1 { margin: 0; }
.auth-hero p { color: var(--muted); line-height: 2; }

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: rgba(148, 163, 184, 0.08);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 5px;
  margin-bottom: 18px;
}

.tab {
  border: 0;
  border-radius: 14px;
  background: transparent;
  color: var(--muted);
  padding: 12px;
  cursor: pointer;
  font-family: inherit;
  font-weight: 700;
}

.tab.active {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: var(--text);
}

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

.auth-form label {
  display: grid;
  gap: 8px;
  color: #cbd5e1;
  font-size: 13px;
}

.auth-form input {
  width: 100%;
  border: 1px solid var(--border);
  background: rgba(2, 6, 23, 0.46);
  color: var(--text);
  border-radius: 15px;
  padding: 14px 14px;
  font-family: inherit;
  outline: none;
}

.auth-form input:focus {
  border-color: rgba(56, 189, 248, 0.45);
  box-shadow: 0 0 0 4px rgba(56, 189, 248, 0.1);
}

.auth-message { min-height: 24px; margin: 14px 0 0; line-height: 1.8; }
.auth-message.ok { color: #86efac; }
.auth-message.error { color: #fca5a5; }
.auth-note { color: var(--muted); line-height: 1.9; font-size: 12px; }

/* Admin */
.admin-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 18px;
}

.admin-panel {
  padding: 20px;
}

.admin-panel h2 { margin-top: 0; }
.responsive-table { overflow-x: auto; }
.responsive-table table {
  width: 100%;
  border-collapse: collapse;
  min-width: 720px;
}
.responsive-table th,
.responsive-table td {
  border-bottom: 1px solid var(--border);
  padding: 12px;
  text-align: right;
  color: #cbd5e1;
}
.responsive-table th { color: var(--text); }

@media (max-width: 1024px) {
  .hero-header,
  .auth-shell {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 760px) {
  .app-shell { width: min(100% - 20px, 1220px); padding-top: 12px; }

  .hero-copy,
  .account-card,
  .status-bar,
  .card,
  .auth-card,
  .auth-hero,
  .admin-panel {
    border-radius: 22px;
  }

  .hero-copy { padding: 20px; }
  .hero-header.compact { grid-template-columns: 1fr; }

  h1 { font-size: clamp(26px, 9vw, 36px); }
  .subtitle { font-size: 13px; line-height: 1.9; }

  .account-card { padding: 16px; }
  .account-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .account-actions .btn { padding-inline: 10px; }

  .status-bar {
    display: grid;
    gap: 10px;
    font-size: 13px;
    padding: 14px;
  }

  .status-times {
    justify-content: flex-start;
    gap: 8px;
  }

  .status-times span {
    white-space: normal;
  }

  .section-title h2 { font-size: 18px; }
  .section-title span { display: none; }

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

  .card {
    padding: 14px;
    min-height: 148px;
  }

  .card-title { font-size: 12px; margin-bottom: 7px; }
  .price { font-size: 20px; }
  .unit { display: block; margin: 4px 0 0; }
  .change { font-size: 12px; padding: 5px 8px; }
  .card-extra small { display: block; font-size: 11px; }

  .auth-page { padding: 12px; align-items: start; }
  .auth-shell { gap: 12px; }
  .auth-hero, .auth-card { padding: 20px; }
  .auth-benefits span { font-size: 11px; }

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

@media (max-width: 430px) {
  .grid { grid-template-columns: 1fr; }
  .account-actions { grid-template-columns: 1fr; }
  .quick-nav { top: 6px; }
}

/* Login clean redesign - mobile first, premium dark/gold */
:root {
  --bg: #07111f;
  --panel: #0d1728;
  --panel-2: #101d31;
  --text: #f5f7fb;
  --muted: #93a4b8;
  --border: rgba(214, 179, 90, 0.13);
  --gold: #d6b35a;
  --gold-2: #e7cf86;
  --green: #22c55e;
  --red: #ef4444;
  --blue: #60a5fa;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.34);
}

body {
  background:
    radial-gradient(circle at 80% -10%, rgba(214, 179, 90, 0.13), transparent 34rem),
    radial-gradient(circle at 10% 100%, rgba(34, 197, 94, 0.07), transparent 28rem),
    linear-gradient(180deg, #07111f 0%, #050b16 100%);
}

.btn.primary,
.tab.active {
  background: linear-gradient(135deg, #d6b35a, #b99032);
  color: #08111f;
  font-weight: 800;
  box-shadow: 0 14px 34px rgba(214, 179, 90, 0.18);
}

.btn.primary:hover { box-shadow: 0 18px 42px rgba(214, 179, 90, 0.24); }
.btn:disabled { opacity: 0.58; cursor: not-allowed; transform: none; box-shadow: none; }

.brand-pill.soft {
  background: rgba(214, 179, 90, 0.08);
  border-color: rgba(214, 179, 90, 0.20);
  color: #ead28c;
}

.auth-page-clean {
  min-height: 100dvh;
  padding: max(18px, env(safe-area-inset-top)) 18px max(18px, env(safe-area-inset-bottom));
  display: grid;
  place-items: center;
}

.auth-clean-shell {
  width: min(100%, 440px);
}

.auth-clean-card {
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(13, 23, 40, 0.96), rgba(8, 15, 28, 0.96));
  border: 1px solid rgba(214, 179, 90, 0.16);
  border-radius: 30px;
  padding: clamp(22px, 6vw, 34px);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.auth-clean-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, rgba(214, 179, 90, 0.8), transparent);
}

.auth-logo {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--text);
  text-decoration: none;
  margin-bottom: 28px;
}

.auth-logo-mark {
  width: 44px;
  height: 44px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, rgba(214, 179, 90, 0.92), rgba(185, 144, 50, 0.92));
  color: #07111f;
  font-weight: 900;
  font-size: 20px;
  box-shadow: 0 12px 30px rgba(214, 179, 90, 0.18);
}

.auth-logo strong { display: block; font-size: 17px; }
.auth-logo small { display: block; color: var(--muted); margin-top: 4px; font-size: 12px; }

.auth-heading { margin-bottom: 22px; }
.auth-heading h1 {
  margin: 14px 0 8px;
  font-size: clamp(28px, 8vw, 38px);
  letter-spacing: -0.03em;
}
.auth-heading p {
  margin: 0;
  color: var(--muted);
  line-height: 1.9;
  font-size: 14px;
}

.clean-form { gap: 15px; }
.clean-form label {
  color: #d8e1ee;
  font-size: 13px;
  font-weight: 700;
}

.clean-form input {
  min-height: 54px;
  border-radius: 18px;
  background: rgba(3, 8, 20, 0.58);
  border-color: rgba(148, 164, 184, 0.16);
  color: var(--text);
  font-size: 15px;
}

.clean-form input::placeholder { color: rgba(147, 164, 184, 0.78); }
.clean-form input:focus {
  border-color: rgba(214, 179, 90, 0.48);
  box-shadow: 0 0 0 4px rgba(214, 179, 90, 0.10);
}

.auth-clean-card .btn.full-width,
.payment-placeholder .btn.full-width {
  width: 100%;
  min-height: 52px;
  border-radius: 18px;
  font-size: 15px;
}

.auth-switch-box {
  margin-top: 18px;
  padding: 14px;
  border: 1px solid rgba(148, 164, 184, 0.12);
  background: rgba(255, 255, 255, 0.025);
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}

.auth-switch-box a {
  color: #ead28c;
  text-decoration: none;
  font-weight: 800;
}

.auth-trust {
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.9;
  text-align: center;
}

.payment-placeholder {
  margin-top: 18px;
  padding: 16px;
  border-radius: 22px;
  border: 1px solid rgba(214, 179, 90, 0.16);
  background: rgba(214, 179, 90, 0.055);
  display: grid;
  gap: 14px;
}

.payment-placeholder strong { display: block; color: var(--text); margin-bottom: 4px; }
.payment-placeholder span { color: var(--muted); font-size: 12px; line-height: 1.8; }

.auth-message { font-size: 13px; }
.auth-message.ok { color: #86efac; }
.auth-message.error { color: #fca5a5; }

@media (max-width: 520px) {
  .auth-page-clean { padding: 12px; place-items: start center; }
  .auth-clean-card { border-radius: 26px; padding: 22px; }
  .auth-logo { margin-bottom: 22px; }
  .auth-switch-box { flex-direction: column; gap: 6px; }
}


.source-badge {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  margin-top: 0.45rem;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(148, 163, 184, 0.1);
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  direction: ltr;
}

.source-tgju {
  color: #f4d87a;
  border-color: rgba(244, 216, 122, 0.25);
  background: rgba(244, 216, 122, 0.1);
}

.source-brs {
  color: #93c5fd;
  border-color: rgba(147, 197, 253, 0.25);
  background: rgba(59, 130, 246, 0.1);
}

.source-nobitex {
  color: #86efac;
  border-color: rgba(134, 239, 172, 0.25);
  background: rgba(34, 197, 94, 0.1);
}

.source-rahavard {
  color: #c4b5fd;
  border-color: rgba(196, 181, 253, 0.25);
  background: rgba(139, 92, 246, 0.1);
}

.source-calculated {
  color: #cbd5e1;
  border-color: rgba(203, 213, 225, 0.18);
  background: rgba(203, 213, 225, 0.08);
}

/* ===== Insight Cards v2: combined asset view ===== */
.insight-card {
  position: relative;
  overflow: hidden;
  display: grid;
  gap: 16px;
  grid-column: span 2;
  min-height: 260px;
  padding: clamp(16px, 2.4vw, 22px);
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 30px;
  background:
    radial-gradient(circle at 14% 6%, rgba(251, 191, 36, 0.12), transparent 16rem),
    linear-gradient(160deg, rgba(15, 23, 42, 0.96), rgba(2, 6, 23, 0.78));
  box-shadow: 0 22px 64px rgba(0, 0, 0, 0.28);
}

.insight-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: linear-gradient(90deg, rgba(214, 179, 90, 0.95), rgba(56, 189, 248, 0.65), transparent);
}

.insight-card.buy {
  border-color: rgba(34, 197, 94, 0.34);
  background:
    radial-gradient(circle at 12% 0%, rgba(34, 197, 94, 0.16), transparent 16rem),
    linear-gradient(160deg, rgba(15, 23, 42, 0.96), rgba(2, 6, 23, 0.78));
}

.insight-card.sell {
  border-color: rgba(248, 113, 113, 0.28);
  background:
    radial-gradient(circle at 12% 0%, rgba(248, 113, 113, 0.12), transparent 16rem),
    linear-gradient(160deg, rgba(15, 23, 42, 0.96), rgba(2, 6, 23, 0.78));
}

.insight-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.insight-head h3 {
  margin: 0;
  font-size: clamp(17px, 2.1vw, 22px);
  letter-spacing: -0.03em;
}

.insight-head p {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.9;
}

.insight-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 7px;
}

.status-chip {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 0.22rem 0.58rem;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  color: #cbd5e1;
  background: rgba(148, 163, 184, 0.08);
  font-size: 0.72rem;
  font-weight: 900;
  white-space: nowrap;
}

.status-chip.buy {
  color: #86efac;
  border-color: rgba(134, 239, 172, 0.24);
  background: rgba(34, 197, 94, 0.1);
}

.status-chip.sell {
  color: #fda4af;
  border-color: rgba(253, 164, 175, 0.24);
  background: rgba(244, 63, 94, 0.1);
}

.insight-main {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px;
  padding: 2px 0 8px;
}

.insight-main small,
.insight-secondary-price span {
  color: var(--muted);
  font-size: 12px;
}

.insight-price {
  font-size: clamp(28px, 4.5vw, 42px);
  font-weight: 950;
  line-height: 1.25;
  letter-spacing: -0.045em;
}

.insight-price span {
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  margin-inline-start: 5px;
}

.insight-secondary-price {
  min-width: 145px;
  display: grid;
  gap: 4px;
  padding: 11px 13px;
  border-radius: 18px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  background: rgba(15, 23, 42, 0.6);
}

.insight-secondary-price strong {
  color: var(--text);
  font-size: 13px;
}

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

.insight-metric {
  display: grid;
  gap: 5px;
  padding: 12px;
  border-radius: 18px;
  background: rgba(148, 163, 184, 0.065);
  border: 1px solid rgba(148, 163, 184, 0.11);
}

.insight-metric small {
  color: var(--muted);
  font-size: 11px;
}

.insight-metric strong {
  color: var(--text);
  font-size: 13px;
  word-break: break-word;
}

.insight-metric.buy strong { color: #86efac; }
.insight-metric.sell strong { color: #fda4af; }

.insight-summary {
  display: grid;
  gap: 5px;
  padding: 13px 14px;
  border-radius: 20px;
  background: rgba(2, 6, 23, 0.42);
  border: 1px solid rgba(148, 163, 184, 0.11);
}

.insight-summary strong {
  color: var(--gold);
  font-size: 13px;
}

.insight-summary span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.9;
}

.insight-details {
  border-top: 1px solid rgba(148, 163, 184, 0.12);
  padding-top: 10px;
}

.insight-details summary {
  cursor: pointer;
  color: #cbd5e1;
  font-weight: 800;
  font-size: 12px;
  list-style: none;
}

.insight-details summary::-webkit-details-marker { display: none; }
.insight-details summary::before { content: "＋"; margin-left: 6px; color: var(--gold); }
.insight-details[open] summary::before { content: "−"; }

.insight-details > div {
  display: grid;
  gap: 4px;
  margin-top: 10px;
  color: var(--muted);
  font-size: 12px;
}

.insight-details .card-extra {
  margin: 0;
  padding: 0;
  border: 0;
}

@media (max-width: 1100px) {
  .insight-card { grid-column: span 3; }
}

@media (max-width: 820px) {
  .insight-card { grid-column: span 2; }
  .insight-main { align-items: stretch; flex-direction: column; }
  .insight-secondary-price { min-width: 0; }
}

@media (max-width: 520px) {
  .insight-card {
    grid-column: 1 / -1;
    border-radius: 24px;
    min-height: 0;
    gap: 13px;
  }

  .insight-head {
    flex-direction: column;
  }

  .insight-badges {
    justify-content: flex-start;
  }

  .insight-metrics {
    grid-template-columns: 1fr;
  }

  .insight-price {
    font-size: 30px;
  }
}

/* Currency pair merged card */
.currency-combo {
  grid-column: 1 / -1;
}

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

.currency-price-tile {
  display: grid;
  gap: 7px;
  padding: 16px;
  border-radius: 22px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  background: rgba(15, 23, 42, 0.62);
}

.currency-price-tile.primary {
  background:
    radial-gradient(circle at 8% 0%, rgba(214, 179, 90, 0.13), transparent 12rem),
    rgba(15, 23, 42, 0.68);
}

.currency-price-tile small,
.currency-price-tile span {
  color: var(--muted);
  font-size: 12px;
}

.currency-price-tile strong {
  color: var(--text);
  font-size: clamp(27px, 4vw, 44px);
  font-weight: 950;
  letter-spacing: -0.045em;
}

.insight-metrics.compact-four {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

@media (max-width: 760px) {
  .currency-pair,
  .insight-metrics.compact-four {
    grid-template-columns: 1fr;
  }

  .currency-price-tile {
    padding: 14px;
  }
}

/* Portfolio tracker */
.portfolio-section {
  scroll-margin-top: 20px;
}

.portfolio-panel {
  display: grid;
  gap: 18px;
}

.portfolio-layout,
.portfolio-bottom-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(320px, 0.75fr);
  gap: 18px;
}

.portfolio-bottom-grid {
  grid-template-columns: minmax(320px, 0.85fr) minmax(0, 1.15fr);
}

.portfolio-summary-card,
.portfolio-form-card,
.portfolio-card {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 30px;
  padding: 20px;
  background:
    radial-gradient(circle at 12% 0%, rgba(214, 179, 90, 0.12), transparent 16rem),
    linear-gradient(145deg, rgba(15, 23, 42, 0.86), rgba(2, 6, 23, 0.72));
  box-shadow: 0 22px 60px rgba(2, 6, 23, 0.24);
}

.portfolio-form-card,
.portfolio-card {
  background:
    radial-gradient(circle at 90% 10%, rgba(56, 189, 248, 0.08), transparent 15rem),
    rgba(15, 23, 42, 0.72);
}

.portfolio-summary-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 18px;
}

.portfolio-summary-head span,
.portfolio-summary-head small,
.portfolio-form-card p,
.portfolio-note,
.portfolio-card small,
.portfolio-table-row small,
.portfolio-empty-mini,
.portfolio-empty-state span {
  color: var(--muted);
}

.portfolio-summary-head strong {
  display: block;
  margin-top: 6px;
  color: var(--text);
  font-size: clamp(28px, 4vw, 48px);
  font-weight: 950;
  letter-spacing: -0.05em;
}

.portfolio-donut-wrap {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 18px;
  align-items: center;
}

.portfolio-donut {
  width: 220px;
  height: 220px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.12), 0 28px 70px rgba(0,0,0,0.22);
}

.portfolio-donut > div {
  width: 128px;
  height: 128px;
  display: grid;
  place-items: center;
  text-align: center;
  border-radius: 999px;
  background: rgba(2, 6, 23, 0.88);
  border: 1px solid rgba(148, 163, 184, 0.14);
}

.portfolio-donut strong {
  color: var(--text);
  font-size: 28px;
  font-weight: 950;
}

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

.portfolio-legend {
  display: grid;
  gap: 10px;
}

.portfolio-legend-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.55);
  border: 1px solid rgba(148, 163, 184, 0.1);
}

.legend-dot {
  width: 12px;
  height: 12px;
  flex: 0 0 auto;
  border-radius: 999px;
  background: var(--legend-color);
  box-shadow: 0 0 0 4px rgba(214, 179, 90, 0.08);
}

.portfolio-mini-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
}

.portfolio-mini-stats > div {
  padding: 14px;
  border-radius: 20px;
  background: rgba(255,255,255,0.045);
  border: 1px solid rgba(148, 163, 184, 0.12);
}

.portfolio-mini-stats strong {
  display: block;
  margin-top: 4px;
  color: var(--text);
}

.portfolio-form-card h3,
.portfolio-card h3 {
  margin: 0 0 8px;
  color: var(--text);
  font-size: 18px;
}

.portfolio-form {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.portfolio-form label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
}

.portfolio-form select,
.portfolio-form input {
  width: 100%;
  min-height: 48px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 16px;
  padding: 0 14px;
  color: var(--text);
  background: rgba(2, 6, 23, 0.66);
  outline: none;
}

.portfolio-form select:focus,
.portfolio-form input:focus {
  border-color: rgba(214, 179, 90, 0.7);
  box-shadow: 0 0 0 4px rgba(214, 179, 90, 0.1);
}

.portfolio-note {
  display: block;
  margin-top: 12px;
  line-height: 1.8;
}

.portfolio-bars {
  display: grid;
  gap: 14px;
  margin-top: 16px;
}

.portfolio-bar-row {
  display: grid;
  gap: 8px;
}

.portfolio-bar-row > div:first-child {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  color: var(--text);
}

.portfolio-bar-row > div:first-child span {
  color: var(--muted);
  font-size: 13px;
}

.portfolio-bar-track {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.12);
}

.portfolio-bar-track span {
  display: block;
  height: 100%;
  min-width: 4px;
  border-radius: inherit;
  background: var(--bar-color);
  box-shadow: 0 0 20px rgba(214, 179, 90, 0.16);
}

.portfolio-table {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.portfolio-table-row {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 13px;
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: 20px;
  background: rgba(2, 6, 23, 0.42);
}

.portfolio-table-row strong,
.portfolio-table-row span {
  color: var(--text);
}

.portfolio-table-row small {
  display: block;
  margin-top: 4px;
}

.portfolio-delete {
  min-height: 38px;
  border: 1px solid rgba(248, 113, 113, 0.26);
  border-radius: 14px;
  padding: 0 12px;
  color: #fecaca;
  background: rgba(127, 29, 29, 0.18);
  cursor: pointer;
}

.portfolio-delete:hover {
  border-color: rgba(248, 113, 113, 0.5);
}

.portfolio-empty-state {
  display: grid;
  gap: 8px;
  margin-top: 14px;
  padding: 18px;
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.52);
  border: 1px dashed rgba(148, 163, 184, 0.2);
}

.portfolio-empty-state strong {
  color: var(--text);
}



/* UX update: friendly empty state for portfolio */
.portfolio-empty-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
  gap: 18px;
  align-items: stretch;
}

.portfolio-empty-card {
  min-height: 330px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 14px;
  text-align: right;
}

.portfolio-empty-icon {
  width: 50px;
  height: 50px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  color: #0f172a;
  background: linear-gradient(135deg, var(--accent), #f3d477);
  box-shadow: 0 16px 36px rgba(214, 179, 90, 0.18);
  font-size: 26px;
  font-weight: 950;
}

.portfolio-kicker {
  width: max-content;
  max-width: 100%;
  padding: 6px 12px;
  border-radius: 999px;
  color: #fde68a;
  background: rgba(214, 179, 90, 0.1);
  border: 1px solid rgba(214, 179, 90, 0.28);
  font-size: 12px;
  font-weight: 800;
}

.portfolio-empty-card h3 {
  margin: 0;
  color: var(--text);
  font-size: clamp(22px, 3vw, 34px);
  font-weight: 950;
  letter-spacing: -0.04em;
}

.portfolio-empty-card p {
  max-width: 620px;
  margin: 0;
  color: var(--muted);
  line-height: 2;
}

.portfolio-first-add {
  width: max-content;
  min-width: 190px;
  margin-top: 4px;
}

.portfolio-example-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}

.portfolio-example-list span {
  padding: 7px 11px;
  border-radius: 999px;
  color: var(--muted);
  background: rgba(15, 23, 42, 0.66);
  border: 1px solid rgba(148, 163, 184, 0.14);
  font-size: 12px;
}

@media (max-width: 980px) {
  .portfolio-empty-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 620px) {
  .portfolio-empty-card {
    min-height: auto;
  }

  .portfolio-first-add {
    width: 100%;
  }
}

@media (max-width: 980px) {
  .portfolio-layout,
  .portfolio-bottom-grid,
  .portfolio-donut-wrap {
    grid-template-columns: 1fr;
  }

  .portfolio-donut {
    margin: 0 auto;
  }
}

@media (max-width: 620px) {
  .portfolio-summary-card,
  .portfolio-form-card,
  .portfolio-card {
    border-radius: 24px;
    padding: 16px;
  }

  .portfolio-summary-head,
  .portfolio-mini-stats,
  .portfolio-table-row {
    grid-template-columns: 1fr;
  }

  .portfolio-table-row {
    align-items: stretch;
  }

  .portfolio-delete {
    width: 100%;
  }
}

/* Opportunity conversion engine */
.opportunity-engine-section {
  scroll-margin-top: 20px;
}

.opportunity-engine-panel {
  display: grid;
  gap: 18px;
}

.engine-summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  border: 1px solid rgba(214, 179, 90, 0.22);
  border-radius: 28px;
  padding: 18px 20px;
  background:
    radial-gradient(circle at 0% 0%, rgba(214, 179, 90, 0.18), transparent 16rem),
    linear-gradient(135deg, rgba(15, 23, 42, 0.82), rgba(2, 6, 23, 0.72));
  box-shadow: 0 22px 60px rgba(2, 6, 23, 0.24);
}

.engine-summary span,
.engine-summary p,
.engine-card small,
.engine-note,
.engine-empty span {
  color: var(--muted);
}

.engine-summary strong {
  display: block;
  margin-top: 5px;
  color: var(--text);
  font-size: clamp(20px, 3vw, 34px);
  font-weight: 950;
}

.engine-summary p {
  max-width: 560px;
  margin: 0;
  line-height: 1.9;
}

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

.engine-card {
  position: relative;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 14px;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 26px;
  padding: 16px;
  background: rgba(15, 23, 42, 0.66);
}

.engine-card.strong-buy,
.engine-card.buy {
  border-color: rgba(34, 197, 94, 0.42);
  background:
    radial-gradient(circle at 0% 0%, rgba(34, 197, 94, 0.14), transparent 14rem),
    rgba(15, 23, 42, 0.72);
}

.engine-card.light-buy {
  border-color: rgba(251, 191, 36, 0.38);
}

.engine-card.warning-sell,
.engine-card.sell,
.engine-card.strong-sell {
  border-color: rgba(251, 113, 133, 0.48);
  background:
    radial-gradient(circle at 0% 0%, rgba(251, 113, 133, 0.13), transparent 14rem),
    rgba(15, 23, 42, 0.72);
}

.engine-rank {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  color: var(--gold);
  font-weight: 950;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(148, 163, 184, 0.13);
}

.engine-card-main {
  display: grid;
  gap: 10px;
}

.engine-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.engine-card-head span {
  color: var(--muted);
  font-size: 12px;
}

.engine-card-head strong {
  display: block;
  margin-top: 4px;
  color: var(--text);
  font-size: 17px;
  font-weight: 900;
}

.engine-score {
  min-width: 68px;
  text-align: center;
  border-radius: 18px;
  padding: 8px 9px;
  background: rgba(2, 6, 23, 0.5);
  border: 1px solid rgba(148, 163, 184, 0.12);
}

.engine-score strong {
  display: inline;
  color: var(--gold);
  font-size: 22px;
}

.engine-score span {
  color: var(--muted);
}

.engine-card p {
  margin: 0;
  color: var(--text);
  line-height: 1.9;
  font-size: 13px;
}

.engine-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.engine-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 28px;
  border: 1px solid rgba(148, 163, 184, 0.15);
  border-radius: 999px;
  padding: 4px 10px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.045);
  font-size: 12px;
}

.engine-badge.personal {
  color: #bbf7d0;
  border-color: rgba(34, 197, 94, 0.28);
  background: rgba(22, 101, 52, 0.18);
}

.engine-note {
  line-height: 1.8;
}

.engine-empty {
  display: grid;
  gap: 8px;
  border: 1px dashed rgba(148, 163, 184, 0.22);
  border-radius: 26px;
  padding: 20px;
  background: rgba(15, 23, 42, 0.58);
}

.engine-empty strong {
  color: var(--text);
}

@media (max-width: 780px) {
  .engine-summary,
  .engine-card-head {
    align-items: stretch;
    flex-direction: column;
  }

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

  .engine-card {
    grid-template-columns: 38px minmax(0, 1fr);
    border-radius: 22px;
    padding: 13px;
  }

  .engine-rank {
    width: 38px;
    height: 38px;
  }
}

/* GUI update: portfolio details toggle, messages and split opportunities */
.portfolio-bottom-grid.single {
  grid-template-columns: 1fr;
}

.category-card {
  display: grid;
  gap: 14px;
}

.portfolio-details-toggle {
  width: 100%;
  min-height: 54px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 4px;
  border: 1px solid rgba(214, 179, 90, 0.3);
  border-radius: 20px;
  color: var(--text);
  background: rgba(214, 179, 90, 0.09);
  cursor: pointer;
}

.portfolio-details-toggle span {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #111827;
  background: var(--gold);
  font-size: 24px;
  font-weight: 950;
  line-height: 1;
}

.portfolio-details-panel {
  display: none;
}

.portfolio-details-panel.open {
  display: block;
}

.messages-section {
  scroll-margin-top: 20px;
}

.messages-panel,
.messages-layout {
  display: grid;
  gap: 18px;
}

.messages-layout {
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
}

.messages-card {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 30px;
  padding: 20px;
  background:
    radial-gradient(circle at 5% 0%, rgba(56, 189, 248, 0.12), transparent 15rem),
    rgba(15, 23, 42, 0.72);
  box-shadow: 0 22px 60px rgba(2, 6, 23, 0.22);
}

.messages-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.messages-card h3,
.engine-block-title h3 {
  margin: 0 0 6px;
  color: var(--text);
  font-size: 18px;
}

.messages-card p,
.messages-card small,
.message-empty,
.engine-block-title span {
  color: var(--muted);
}

.btn.tiny {
  min-height: 36px;
  padding: 0 12px;
  font-size: 12px;
}

.message-list,
.alert-rules {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.message-item,
.alert-rule {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 13px;
  border: 1px solid rgba(148, 163, 184, 0.13);
  border-radius: 20px;
  background: rgba(2, 6, 23, 0.42);
}

.message-item.unread {
  border-color: rgba(214, 179, 90, 0.34);
  background: rgba(214, 179, 90, 0.08);
}

.message-item strong,
.alert-rule strong {
  color: var(--text);
}

.message-item p {
  margin: 7px 0;
  line-height: 1.9;
  color: var(--text);
  font-size: 13px;
}

.message-read,
.alert-delete {
  flex: 0 0 auto;
  min-height: 36px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 14px;
  padding: 0 12px;
  color: var(--text);
  background: rgba(255,255,255,0.055);
  cursor: pointer;
}

.alert-delete {
  color: #fecaca;
  border-color: rgba(248, 113, 113, 0.24);
  background: rgba(127, 29, 29, 0.15);
}

.message-empty {
  padding: 16px;
  border: 1px dashed rgba(148, 163, 184, 0.22);
  border-radius: 20px;
  background: rgba(15, 23, 42, 0.5);
  line-height: 1.9;
}

.message-empty.compact {
  padding: 12px;
}

.alert-form {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(150px, 0.8fr) minmax(120px, 0.7fr);
  gap: 10px;
  margin-top: 16px;
}

.alert-form label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
}

.alert-form select,
.alert-form input {
  width: 100%;
  min-height: 46px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 16px;
  padding: 0 12px;
  color: var(--text);
  background: rgba(2, 6, 23, 0.66);
  outline: none;
}

.alert-form button {
  grid-column: 1 / -1;
}

.engine-split {
  display: grid;
  gap: 22px;
}

.engine-block {
  display: grid;
  gap: 14px;
}

.engine-block-title {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 12px;
  padding: 0 4px;
}

@media (max-width: 900px) {
  .messages-layout,
  .alert-form {
    grid-template-columns: 1fr;
  }

  .engine-block-title,
  .message-item,
  .alert-rule {
    flex-direction: column;
    align-items: stretch;
  }

  .message-read,
  .alert-delete {
    width: 100%;
  }
}

/* Improved alert builder */
.improved-alerts .alert-card {
  display: grid;
  gap: 14px;
}

.alert-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  padding: 6px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 20px;
  background: rgba(2, 6, 23, 0.34);
}

.alert-tab {
  flex: 1 1 130px;
  min-height: 42px;
  border: 0;
  border-radius: 15px;
  padding: 0 12px;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  font-weight: 800;
}

.alert-tab.active {
  color: var(--text);
  background: linear-gradient(135deg, rgba(214, 179, 90, 0.22), rgba(56, 189, 248, 0.12));
  box-shadow: inset 0 0 0 1px rgba(214, 179, 90, 0.18);
}

.alert-tab-panel {
  display: none;
  gap: 12px;
}

.alert-tab-panel.active {
  display: grid;
}

.suggested-alert-list,
.alert-template-grid {
  display: grid;
  gap: 10px;
}

.alert-template-grid {
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
}

.alert-template-card,
.alert-template-chip {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 20px;
  padding: 13px;
  background: rgba(2, 6, 23, 0.42);
}

.alert-template-chip {
  width: 100%;
  min-height: 126px;
  flex-direction: column;
  text-align: right;
  color: var(--text);
  cursor: pointer;
}

.alert-template-chip.selected {
  opacity: 0.58;
  border-color: rgba(34, 197, 94, 0.25);
}

.alert-template-card strong,
.alert-template-chip strong,
.alert-rule-title strong {
  display: block;
  margin-top: 7px;
  color: var(--text);
}

.alert-template-card p,
.alert-template-card small,
.alert-template-chip small {
  margin: 7px 0 0;
  color: var(--muted);
  line-height: 1.8;
  font-size: 12px;
}

.severity-pill {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 900;
  border: 1px solid rgba(148, 163, 184, 0.16);
  color: var(--muted);
  background: rgba(148, 163, 184, 0.08);
}

.severity-pill.urgent {
  color: #fecaca;
  border-color: rgba(248, 113, 113, 0.28);
  background: rgba(127, 29, 29, 0.18);
}

.severity-pill.important {
  color: #fde68a;
  border-color: rgba(214, 179, 90, 0.34);
  background: rgba(214, 179, 90, 0.12);
}

.severity-pill.info {
  color: #bae6fd;
  border-color: rgba(56, 189, 248, 0.28);
  background: rgba(56, 189, 248, 0.11);
}

.message-item.severity-urgent {
  border-color: rgba(248, 113, 113, 0.25);
}

.message-item.severity-important {
  border-color: rgba(214, 179, 90, 0.26);
}

.alert-rule.disabled {
  opacity: 0.58;
}

.alert-rule-actions {
  display: flex;
  gap: 8px;
  flex: 0 0 auto;
}

.alert-toggle {
  min-height: 36px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 14px;
  padding: 0 12px;
  color: var(--text);
  background: rgba(255,255,255,0.055);
  cursor: pointer;
}

.alert-form.improved {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

@media (max-width: 900px) {
  .alert-form.improved,
  .alert-template-grid {
    grid-template-columns: 1fr;
  }

  .alert-template-card,
  .alert-rule,
  .alert-rule-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .alert-toggle,
  .alert-delete,
  .add-template-alert {
    width: 100%;
  }
}

/* Simple manual alerts */
.simple-alerts .alert-card {
  display: grid;
  gap: 16px;
}

.simple-manual-alert {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: end;
}

.alert-help-box {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  border: 1px solid rgba(214, 179, 90, 0.16);
  border-radius: 18px;
  padding: 12px;
  background: rgba(214, 179, 90, 0.07);
  color: var(--muted);
  line-height: 1.8;
}

.alert-help-box strong {
  color: var(--text);
}

.alert-help-box span {
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 999px;
  padding: 3px 9px;
  background: rgba(2, 6, 23, 0.32);
  font-size: 12px;
}

.active-alerts-block {
  display: grid;
  gap: 10px;
}

.active-alerts-block h4 {
  margin: 0;
  color: var(--text);
}

@media (max-width: 900px) {
  .simple-manual-alert {
    grid-template-columns: 1fr;
  }
}


/* Manual alerts collapsed panel */
.manual-alerts-toggle-row {
  margin-top: 4px;
}

.manual-alerts-toggle {
  width: 100%;
  justify-content: flex-start;
  text-align: right;
}

.manual-alerts-toggle .plus {
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(214, 179, 90, 0.12);
  border: 1px solid rgba(214, 179, 90, 0.22);
  color: var(--gold);
  font-size: 20px;
  line-height: 1;
}

.manual-alerts-toggle small {
  margin-right: auto;
  color: var(--muted);
  font-weight: 500;
}

.manual-alerts-panel {
  display: none;
}

.manual-alerts-panel.open {
  display: grid;
}

@media (max-width: 640px) {
  .manual-alerts-toggle {
    align-items: flex-start;
  }
  .manual-alerts-toggle small {
    margin-right: 0;
  }
}


.message-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
}

.message-delete {
  border: 1px solid rgba(248, 113, 113, 0.45);
  background: rgba(127, 29, 29, 0.18);
  color: #fecaca;
  border-radius: 999px;
  padding: 8px 12px;
  cursor: pointer;
}

.message-delete:hover {
  border-color: rgba(248, 113, 113, 0.8);
  background: rgba(127, 29, 29, 0.32);
}

/* Opportunity engine clarity: make from/to explicit */
.engine-action-title strong {
  font-size: clamp(17px, 2.2vw, 24px);
  line-height: 1.65;
}

.engine-flow {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: stretch;
  gap: 8px;
  margin: 2px 0 4px;
}

.engine-flow-box {
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 18px;
  padding: 10px 12px;
  background: rgba(2, 6, 23, 0.35);
  min-width: 0;
}

.engine-flow-box small {
  display: block;
  color: var(--muted);
  font-size: 11px;
  margin-bottom: 4px;
}

.engine-flow-box b {
  display: block;
  color: var(--text);
  font-size: 14px;
  line-height: 1.55;
  word-break: break-word;
}

.engine-flow-box.to {
  border-color: rgba(34, 197, 94, 0.3);
  background: rgba(34, 197, 94, 0.07);
}

.engine-flow-box.from {
  border-color: rgba(214, 179, 90, 0.22);
}

.engine-flow-arrow {
  display: grid;
  place-items: center;
  color: var(--gold);
  font-weight: 950;
  font-size: 20px;
  padding: 0 2px;
}

.engine-reason-lead {
  color: var(--gold);
  font-weight: 900;
}

@media (max-width: 620px) {
  .engine-flow {
    grid-template-columns: 1fr;
  }
  .engine-flow-arrow {
    transform: rotate(-90deg);
    padding: 0;
  }
}

.engine-pair-line {
  margin: 10px 0 6px;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(212, 175, 55, 0.08);
  border: 1px solid rgba(212, 175, 55, 0.18);
  color: var(--text);
}

.engine-action-title strong {
  line-height: 1.45;
}

/* Opportunity details collapsed under + */
.engine-card-compact-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 2px;
}

.engine-extra-details {
  margin-top: 2px;
  border: 1px solid rgba(214, 179, 90, 0.18);
  border-radius: 16px;
  background: rgba(2, 6, 23, 0.25);
  overflow: hidden;
}

.engine-extra-details > summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  padding: 10px 12px;
  color: var(--text);
  user-select: none;
}

.engine-extra-details > summary::-webkit-details-marker {
  display: none;
}

.engine-plus {
  width: 26px;
  height: 26px;
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 999px;
  background: rgba(214, 179, 90, 0.14);
  border: 1px solid rgba(214, 179, 90, 0.32);
  color: var(--gold);
  font-weight: 950;
  line-height: 1;
}

.engine-extra-details[open] .engine-plus {
  transform: rotate(45deg);
}

.engine-extra-body {
  display: grid;
  gap: 10px;
  padding: 0 12px 12px;
}

.engine-analysis-text {
  display: grid;
  gap: 8px;
  line-height: 2;
  color: var(--text);
}

.engine-analysis-text p {
  margin: 0;
}

.engine-analysis-text strong {
  color: var(--gold);
}


.account-tier-box {
  margin-top: 8px;
}

.account-tier {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 11px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
  border: 1px solid rgba(148, 163, 184, .24);
}

.account-tier.gold {
  color: #f8e08e;
  background: rgba(234, 179, 8, .14);
  border-color: rgba(234, 179, 8, .42);
}

.account-tier.silver {
  color: #dbeafe;
  background: rgba(148, 163, 184, .14);
  border-color: rgba(203, 213, 225, .28);
}

.sms-toggle-wrap {
  margin-top: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-size: 13px;
  cursor: pointer;
}

.sms-toggle-wrap input {
  width: 18px;
  height: 18px;
  accent-color: #d6b35a;
}

.sms-toggle-wrap.locked {
  opacity: .8;
}

.sms-toggle-hint {
  display: block;
  margin-top: 7px;
  line-height: 1.8;
  font-size: 12px;
}

.sms-toggle-hint.ok { color: #86efac; }
.sms-toggle-hint.warn { color: #fcd34d; }

.plan-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 64px;
  padding: 6px 10px;
  border-radius: 999px;
  font-weight: 800;
  font-size: 12px;
  border: 1px solid rgba(148, 163, 184, .25);
  background: rgba(148, 163, 184, .12);
  color: var(--muted);
}
.plan-badge.vip,
.plan-badge.gold {
  border-color: rgba(234, 179, 8, .42);
  background: rgba(234, 179, 8, .14);
  color: #f8e08e;
}
.plan-badge.normal,
.plan-badge.silver {
  border-color: rgba(96, 165, 250, .28);
  background: rgba(96, 165, 250, .10);
  color: #bfdbfe;
}

.portfolio-clear-all {
  width: 100%;
  margin-top: 12px;
  border: 1px solid rgba(251, 113, 133, 0.45);
  color: #fecdd3;
  background: rgba(127, 29, 29, 0.18);
  border-radius: 16px;
  padding: 12px 14px;
  font-weight: 800;
  cursor: pointer;
}
.portfolio-clear-all:hover { background: rgba(127, 29, 29, 0.32); }

/* Admin destructive action */
.btn.tiny.danger {
  border-color: rgba(248, 113, 113, 0.55);
  color: #fecaca;
  background: rgba(127, 29, 29, 0.22);
}
.btn.tiny.danger:hover {
  border-color: rgba(248, 113, 113, 0.9);
  background: rgba(127, 29, 29, 0.36);
}

/* Compact pairwise opportunity cards */
.engine-summary {
  padding: 12px 16px;
  border-radius: 22px;
}
.engine-summary strong {
  font-size: clamp(18px, 2.2vw, 28px);
}
.engine-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.engine-card.compact {
  display: block;
  padding: 12px;
  border-radius: 20px;
  min-height: auto;
}
.engine-card.compact .engine-card-main {
  gap: 8px;
}
.engine-card-head.compact {
  align-items: center;
  gap: 8px;
}
.engine-card-head.compact .engine-rank {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  font-size: 15px;
  flex: 0 0 auto;
}
.engine-title-wrap {
  min-width: 0;
  flex: 1 1 auto;
}
.engine-title-wrap span {
  display: block;
  font-size: 11px;
  color: var(--muted);
}
.engine-title-wrap strong {
  display: block;
  margin-top: 2px;
  color: var(--text);
  font-size: clamp(14px, 1.45vw, 18px);
  line-height: 1.45;
  white-space: normal;
}
.engine-card.compact .engine-score {
  min-width: 56px;
  padding: 6px 7px;
  border-radius: 14px;
  flex: 0 0 auto;
}
.engine-card.compact .engine-score strong {
  font-size: 18px;
}
.engine-mini-flow {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  gap: 6px;
  align-items: center;
}
.engine-mini-flow > span {
  min-width: 0;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 14px;
  padding: 7px 9px;
  background: rgba(2, 6, 23, 0.32);
  color: var(--muted);
  font-size: 11px;
  line-height: 1.55;
}
.engine-mini-flow b {
  display: block;
  color: var(--text);
  font-size: 13px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.engine-mini-flow .to {
  border-color: rgba(34, 197, 94, 0.28);
  background: rgba(34, 197, 94, 0.07);
}
.engine-mini-flow .arrow {
  border: 0;
  background: transparent;
  padding: 0;
  color: var(--gold);
  font-weight: 950;
  font-size: 16px;
}
.engine-card.compact .engine-card-compact-meta {
  gap: 6px;
}
.engine-card.compact .engine-badge {
  min-height: 24px;
  padding: 3px 8px;
  font-size: 11px;
}
.engine-extra-details.compact > summary {
  min-height: 34px;
  padding: 7px 9px;
}
.engine-extra-details.compact .engine-plus {
  width: 22px;
  height: 22px;
}
.engine-extra-details.compact .engine-extra-body {
  padding: 0 10px 10px;
}
.engine-extra-details.compact .engine-analysis-text {
  line-height: 1.8;
  font-size: 13px;
}

@media (max-width: 1100px) {
  .engine-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 680px) {
  .engine-grid {
    grid-template-columns: 1fr;
  }
  .engine-mini-flow {
    grid-template-columns: 1fr;
  }
  .engine-mini-flow .arrow {
    transform: rotate(-90deg);
    text-align: center;
  }
}


/* Mobile GUI compact fix: readable quick menu + smaller opportunity cards */
@media (max-width: 680px) {
  .app-shell {
    padding-inline: 10px;
  }

  .quick-nav {
    position: static;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
    overflow: visible;
    padding: 7px;
    border-radius: 16px;
    margin-bottom: 14px;
  }

  .quick-nav a {
    min-width: 0;
    width: 100%;
    padding: 8px 4px;
    font-size: 11px;
    text-align: center;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .section {
    margin-bottom: 20px;
    scroll-margin-top: 14px;
  }

  .engine-summary {
    display: block;
    padding: 10px 12px;
    border-radius: 18px;
  }

  .engine-summary span {
    font-size: 11px;
  }

  .engine-summary strong {
    font-size: 22px;
    line-height: 1.5;
    margin-top: 2px;
  }

  .engine-summary p {
    display: none;
  }

  .engine-block-title {
    margin-bottom: 8px;
  }

  .engine-block-title h3 {
    font-size: 18px;
    line-height: 1.5;
  }

  .engine-block-title span {
    font-size: 11px;
  }

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

  .engine-card.compact {
    padding: 9px;
    border-radius: 17px;
  }

  .engine-card.compact .engine-card-main {
    gap: 7px;
  }

  .engine-card-head.compact {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr) 54px;
    gap: 7px;
    align-items: center;
  }

  .engine-card-head.compact .engine-rank {
    width: 30px;
    height: 30px;
    border-radius: 11px;
    font-size: 13px;
  }

  .engine-title-wrap span {
    font-size: 10px;
  }

  .engine-title-wrap strong {
    font-size: 17px;
    line-height: 1.45;
  }

  .engine-card.compact .engine-score {
    min-width: 48px;
    padding: 5px 6px;
    border-radius: 12px;
  }

  .engine-card.compact .engine-score strong {
    font-size: 16px;
  }

  .engine-card.compact .engine-score span {
    font-size: 10px;
  }

  .engine-mini-flow {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 18px minmax(0, 1fr);
    gap: 5px;
    margin-top: 1px;
  }

  .engine-mini-flow .arrow {
    transform: none;
    align-self: center;
    font-size: 14px;
  }

  .engine-mini-flow > span {
    padding: 5px 7px;
    border-radius: 12px;
    font-size: 10px;
    line-height: 1.45;
  }

  .engine-mini-flow b {
    font-size: 12px;
  }

  .engine-card.compact .engine-card-compact-meta {
    display: flex;
    flex-wrap: nowrap;
    gap: 5px;
    overflow-x: auto;
    padding-bottom: 2px;
    scrollbar-width: none;
  }

  .engine-card.compact .engine-card-compact-meta::-webkit-scrollbar {
    display: none;
  }

  .engine-card.compact .engine-badge {
    flex: 0 0 auto;
    min-height: 22px;
    padding: 3px 7px;
    font-size: 10px;
  }

  .engine-extra-details.compact > summary {
    min-height: 30px;
    padding: 5px 8px;
    border-radius: 12px;
    font-size: 12px;
  }

  .engine-extra-details.compact .engine-plus {
    width: 20px;
    height: 20px;
    font-size: 13px;
  }

  .engine-extra-details.compact .engine-extra-body {
    padding: 0 8px 8px;
  }

  .engine-extra-details.compact .engine-analysis-text {
    font-size: 12px;
    line-height: 1.75;
  }
}

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

  .engine-title-wrap strong {
    font-size: 16px;
  }
}

/* Bottom mobile-first navigation */
:root {
  --bottom-nav-height: 78px;
}

.app-shell {
  padding-bottom: calc(var(--bottom-nav-height) + env(safe-area-inset-bottom, 0px) + 18px);
}

.bottom-tab-nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 80;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 4px;
  padding: 8px 10px calc(8px + env(safe-area-inset-bottom, 0px));
  background: rgba(2, 6, 23, 0.92);
  border-top: 1px solid rgba(148, 163, 184, 0.2);
  box-shadow: 0 -18px 42px rgba(0, 0, 0, 0.38);
  backdrop-filter: blur(22px);
}

.bottom-tab,
.price-tab > summary {
  min-width: 0;
  min-height: 56px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: rgba(15, 23, 42, 0.86);
  color: #dbeafe;
  border-radius: 18px;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.2;
  white-space: nowrap;
  cursor: pointer;
  list-style: none;
  -webkit-tap-highlight-color: transparent;
}

.bottom-tab:hover,
.price-tab > summary:hover {
  border-color: rgba(212, 175, 55, 0.5);
  background: rgba(30, 41, 59, 0.96);
}

.price-tab > summary::-webkit-details-marker { display: none; }
.price-tab > summary::marker { content: ''; }

.tab-icon {
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #d4af37;
  font-size: 16px;
  line-height: 1;
}

.bottom-tab,
.price-tab > summary {
  position: relative;
}

.tab-badge {
  position: absolute;
  top: -7px;
  left: 50%;
  transform: translateX(-50%);
  min-width: 22px;
  height: 22px;
  padding: 0 7px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #e11d48;
  color: #ffffff;
  border: 2px solid rgba(2, 6, 23, 0.96);
  box-shadow: 0 8px 20px rgba(225, 29, 72, 0.35);
  font-size: 11px;
  font-weight: 950;
  line-height: 1;
  pointer-events: none;
}

.tab-badge.hidden {
  display: none;
}

.price-tab {
  position: relative;
  min-width: 0;
}

.price-tab-menu {
  position: fixed;
  left: 50vw !important;
  right: auto !important;
  bottom: calc(var(--bottom-nav-height) + env(safe-area-inset-bottom, 0px) + 10px);
  transform: translateX(-50%) !important;
  width: min(calc(100vw - 22px), 430px) !important;
  max-width: calc(100vw - 22px);
  box-sizing: border-box;
  max-height: min(42vh, 300px);
  overflow-y: auto;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  padding: 10px;
  border-radius: 22px;
  border: 1px solid rgba(212, 175, 55, 0.28);
  background: rgba(2, 6, 23, 0.96);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.55);
  scroll-margin-bottom: calc(var(--bottom-nav-height) + 18px);
  backdrop-filter: blur(22px);
}

@supports (width: 100dvw) {
  .price-tab-menu {
    left: 50dvw !important;
    width: min(calc(100dvw - 22px), 430px) !important;
    max-width: calc(100dvw - 22px);
  }
}

.price-tab-menu a {
  color: #e5e7eb;
  background: rgba(148, 163, 184, 0.08);
  border: 1px solid rgba(148, 163, 184, 0.18);
  text-decoration: none;
  text-align: center;
  border-radius: 15px;
  padding: 12px 8px;
  font-size: 12px;
  font-weight: 800;
}


.price-tab-menu a:last-child:nth-child(odd) {
  grid-column: 1 / -1;
}

.price-tab-menu a:hover {
  background: rgba(212, 175, 55, 0.14);
  border-color: rgba(212, 175, 55, 0.45);
}

@media (min-width: 860px) {
  .bottom-tab-nav {
    left: 0;
    right: 0;
    bottom: 18px;
    width: min(720px, calc(100vw - 48px));
    margin-left: auto;
    margin-right: auto;
    transform: none;
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 28px;
    padding: 10px;
  }

  .app-shell {
    padding-bottom: 112px;
  }
}

@media (max-width: 420px) {
  .bottom-tab-nav {
    padding-inline: 6px;
    gap: 3px;
  }

  .bottom-tab,
  .price-tab > summary {
    min-height: 54px;
    border-radius: 15px;
    font-size: 10px;
  }

  .tab-icon {
    width: 20px;
    height: 20px;
    font-size: 15px;
  }

  .price-tab-menu {
    left: 50vw !important;
    width: calc(100vw - 16px) !important;
    max-width: calc(100vw - 16px);
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
    padding: 8px;
    border-radius: 18px;
  }

  .price-tab-menu a {
    padding: 11px 6px;
    font-size: 11px;
  }
}

.price-tab[open] > summary {
  border-color: rgba(212, 175, 55, 0.72);
  box-shadow: inset 0 0 0 1px rgba(212, 175, 55, 0.18);
}
section { scroll-margin-top: 18px; scroll-margin-bottom: calc(var(--bottom-nav-height) + 24px); }


/* Final viewport-safe fix for price submenu */
.price-tab-menu {
  position: fixed !important;
  left: 50vw !important;
  right: auto !important;
  transform: translateX(-50%) !important;
  width: min(calc(100vw - 24px), 430px) !important;
  max-width: calc(100vw - 24px) !important;
  box-sizing: border-box !important;
}
@supports (width: 100dvw) {
  .price-tab-menu {
    left: 50dvw !important;
    width: min(calc(100dvw - 24px), 430px) !important;
    max-width: calc(100dvw - 24px) !important;
  }
}
@media (min-width: 860px) {
  .bottom-tab-nav {
    left: 0 !important;
    right: 0 !important;
    margin-left: auto !important;
    margin-right: auto !important;
    transform: none !important;
  }
}
@media (max-width: 420px) {
  .price-tab-menu {
    width: calc(100vw - 16px) !important;
    max-width: calc(100vw - 16px) !important;
  }
}

/* Ultra compact opportunity cards: compact title/rank/score area */
.engine-card.compact.ultra-compact {
  padding: 9px 10px;
}
.engine-card.compact.ultra-compact .engine-card-main {
  gap: 6px;
}

.engine-card.compact.ultra-compact .engine-card-head.compact {
  gap: 6px;
  margin-bottom: 2px;
}
.engine-card.compact.ultra-compact .engine-card-head.compact .engine-rank {
  width: 28px;
  height: 28px;
  border-radius: 10px;
  font-size: 13px;
}
.engine-card.compact.ultra-compact .engine-title-wrap span {
  font-size: 10px;
}
.engine-card.compact.ultra-compact .engine-title-wrap strong {
  font-size: 14px;
  line-height: 1.35;
}
.engine-card.compact.ultra-compact .engine-score {
  min-width: 46px;
  padding: 4px 6px;
  border-radius: 12px;
}
.engine-card.compact.ultra-compact .engine-score strong {
  font-size: 15px;
}
.engine-card.compact.ultra-compact .engine-score span {
  font-size: 9px;
}
.engine-card.compact.ultra-compact .engine-mini-flow {
  margin-top: 0;
}
.engine-card.compact.ultra-compact .engine-extra-details.compact > summary {
  min-height: 28px;
  padding: 5px 8px;
}
@media (max-width: 680px) {
  .engine-card.compact.ultra-compact {
    padding: 7px 8px;
    border-radius: 15px;
  }
  .engine-card.compact.ultra-compact .engine-card-main {
    gap: 5px;
  }

  .engine-card.compact.ultra-compact .engine-card-head.compact {
    grid-template-columns: 26px minmax(0, 1fr) 44px;
    gap: 5px;
  }
  .engine-card.compact.ultra-compact .engine-card-head.compact .engine-rank {
    width: 24px;
    height: 24px;
    border-radius: 9px;
    font-size: 12px;
  }
  .engine-card.compact.ultra-compact .engine-title-wrap span {
    display: none;
  }
  .engine-card.compact.ultra-compact .engine-title-wrap strong {
    font-size: 13px;
    line-height: 1.3;
  }
  .engine-card.compact.ultra-compact .engine-score {
    min-width: 40px;
    padding: 3px 5px;
    border-radius: 10px;
  }
  .engine-card.compact.ultra-compact .engine-score strong {
    font-size: 13px;
  }
  .engine-card.compact.ultra-compact .engine-score span {
    font-size: 8px;
  }
  .engine-card.compact.ultra-compact .engine-mini-flow > span {
    padding: 5px 6px;
  }
  .engine-card.compact.ultra-compact .engine-extra-details.compact > summary {
    min-height: 26px;
    padding: 4px 7px;
  }
}


/* Final opportunity compact fix: remove duplicate title line, keep rank + score */
.engine-card.compact .engine-card-head.compact.no-title,
.engine-card.compact.ultra-compact .engine-card-head.compact.no-title {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 8px !important;
  margin-bottom: 0 !important;
}
.engine-card.compact .engine-card-head.compact.no-title .engine-rank,
.engine-card.compact.ultra-compact .engine-card-head.compact.no-title .engine-rank {
  flex: 0 0 auto;
}
.engine-card.compact .engine-card-head.compact.no-title .engine-score,
.engine-card.compact.ultra-compact .engine-card-head.compact.no-title .engine-score {
  flex: 0 0 auto;
  margin-inline-start: auto;
}
@media (max-width: 680px) {
  .engine-card.compact.ultra-compact .engine-card-head.compact.no-title {
    display: flex !important;
    grid-template-columns: none !important;
  }
}

/* UX update: mini price trend sparklines and clearer account panel */
.account-overview {
  margin-top: 12px;
}

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

.account-overview-grid.compact {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.account-overview-grid.compact > div:last-child {
  grid-column: 1 / -1;
}

.account-overview-footer.single-link {
  justify-content: flex-start;
}

.account-overview-grid > div {
  min-width: 0;
  padding: 10px 11px;
  border: 1px solid rgba(148, 163, 184, 0.13);
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.55);
}

.account-overview-grid small {
  display: block;
  color: var(--muted);
  font-size: 10.5px;
  margin-bottom: 4px;
}

.account-overview-grid strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text);
  font-size: 12.5px;
  line-height: 1.7;
}

.account-overview-grid strong.good { color: #86efac; }
.account-overview-grid strong.warn { color: #fcd34d; }

.account-overview-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 10px;
  color: var(--muted);
  font-size: 11.5px;
}

.account-overview-footer a {
  color: #93c5fd;
  text-decoration: none;
  font-weight: 800;
}

.account-overview-footer a:hover { color: #bfdbfe; }

.sparkline-block {
  display: grid;
  gap: 5px;
  margin-top: 10px;
  padding: 9px 10px 7px;
  border-radius: 16px;
  border: 1px solid rgba(148, 163, 184, 0.11);
  background: rgba(2, 6, 23, 0.28);
}

.sparkline-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 10.5px;
  color: var(--muted);
}

.sparkline-head small {
  font-weight: 900;
  color: #cbd5e1;
}

.sparkline-block.up .sparkline-head small { color: #86efac; }
.sparkline-block.down .sparkline-head small { color: #fda4af; }
.sparkline-block.muted .sparkline-head small { color: #94a3b8; font-weight: 700; }

.sparkline {
  width: 100%;
  height: 34px;
  display: block;
}

.sparkline path,
.sparkline polyline {
  fill: none;
  stroke: #94a3b8;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0.9;
}

.sparkline-block.up .sparkline polyline { stroke: #22c55e; }
.sparkline-block.down .sparkline polyline { stroke: #fb7185; }
.sparkline-block.neutral .sparkline polyline { stroke: #38bdf8; }

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

.insight-card .sparkline-block {
  margin-top: -4px;
}

.card .sparkline-block {
  margin-top: 12px;
  margin-bottom: 2px;
}

@media (max-width: 720px) {
  .account-overview-grid,
  .sparkline-pair {
    grid-template-columns: 1fr;
  }

  .account-overview-grid strong {
    white-space: normal;
  }
}


/* Login page UX refresh */
.auth-heading h1 span {
  color: #f4f7fb;
}

.auth-benefit-list {
  margin: -4px 0 22px;
  display: grid;
  gap: 10px;
}

.auth-benefit-list div {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 10px 12px;
  border: 1px solid rgba(148, 164, 184, 0.12);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.028);
  color: #dbe7f5;
  font-size: 13px;
  line-height: 1.7;
}

.auth-benefit-list span {
  width: 22px;
  height: 22px;
  min-width: 22px;
  border-radius: 999px;
  display: inline-grid;
  place-items: center;
  color: #86efac;
  background: rgba(34, 197, 94, 0.10);
  border: 1px solid rgba(134, 239, 172, 0.22);
  font-weight: 900;
}

.password-field {
  position: relative;
  display: block;
}

.password-field input {
  width: 100%;
  padding-left: 76px;
}

.password-toggle {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  height: 34px;
  min-width: 58px;
  border: 1px solid rgba(214, 179, 90, 0.22);
  border-radius: 12px;
  background: rgba(214, 179, 90, 0.08);
  color: #ead28c;
  font-family: inherit;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.password-toggle:focus-visible {
  outline: 3px solid rgba(214, 179, 90, 0.24);
  outline-offset: 2px;
}

.auth-register-box {
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
  padding: 16px;
}

.auth-register-box > span {
  text-align: center;
}

.auth-register-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 46px;
  border-radius: 16px;
  border: 1px solid rgba(214, 179, 90, 0.22);
  background: rgba(214, 179, 90, 0.08);
  color: #f4d577 !important;
  font-weight: 900;
}

.auth-register-cta:hover {
  background: rgba(214, 179, 90, 0.13);
}

@media (max-width: 520px) {
  .auth-heading h1 {
    font-size: clamp(27px, 8vw, 34px);
    line-height: 1.45;
  }

  .auth-benefit-list div {
    font-size: 12px;
    padding: 9px 10px;
  }
}

/* Account card cleanup: hide the old duplicated green subscription pill permanently. */
.account-card #accountPlan,
.account-card .account-plan {
  display: none !important;
}


/* First-login onboarding tour */
body.onboarding-tour-open {
  overflow: hidden;
}

.onboarding-tour {
  position: fixed;
  inset: 0;
  z-index: 9999;
  direction: rtl;
  pointer-events: none;
}

.onboarding-tour-dim {
  position: absolute;
  inset: 0;
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  pointer-events: auto;
  z-index: 0;
}

.onboarding-tour-highlight {
  position: fixed;
  border: 2px solid rgba(255, 214, 102, 0.95);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.025);
  box-shadow: 0 0 0 9999px rgba(3, 10, 22, 0.62), 0 18px 55px rgba(0, 0, 0, 0.45), 0 0 22px rgba(255, 214, 102, 0.35);
  transition: top 0.22s ease, left 0.22s ease, width 0.22s ease, height 0.22s ease;
  pointer-events: none;
  z-index: 1;
}

.onboarding-tour-card {
  position: fixed;
  z-index: 2;
  background: linear-gradient(145deg, rgba(13, 24, 42, 0.98), rgba(7, 15, 29, 0.98));
  color: #f8fafc;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 24px;
  padding: 18px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.45);
  pointer-events: auto;
  outline: none;
}

.tour-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  margin-bottom: 10px;
  border-radius: 999px;
  background: rgba(255, 214, 102, 0.13);
  color: #ffe08a;
  font-size: 0.78rem;
  font-weight: 800;
}

.tour-title {
  margin: 0 0 8px;
  font-size: 1.12rem;
  line-height: 1.8;
}

.tour-text {
  margin: 0;
  color: rgba(248, 250, 252, 0.84);
  line-height: 2;
  font-size: 0.94rem;
}

.tour-progress {
  display: flex;
  justify-content: center;
  gap: 7px;
  margin: 16px 0 14px;
}

.tour-progress span {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.28);
  transition: width 0.2s ease, background 0.2s ease;
}

.tour-progress span.active {
  width: 24px;
  background: #ffd666;
}

.tour-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.tour-action-main {
  display: flex;
  align-items: center;
  gap: 8px;
}

.tour-actions .btn {
  min-height: 40px;
  white-space: nowrap;
}

.tour-actions .tour-prev:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

@media (max-width: 640px) {
  .onboarding-tour-card {
    border-radius: 20px;
    padding: 16px;
  }

  .tour-actions {
    flex-direction: column-reverse;
    align-items: stretch;
  }

  .tour-action-main {
    width: 100%;
  }

  .tour-action-main .btn,
  .tour-skip {
    flex: 1;
    width: 100%;
  }
}

/* Core dashboard: make the first screen explain the 4 main jobs of Ayarbin. */
.core-dashboard-section {
  margin: 0 0 28px;
}

.core-dashboard-head {
  border: 1px solid var(--border);
  background: linear-gradient(145deg, rgba(17, 24, 39, 0.88), rgba(2, 6, 23, 0.58));
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
  border-radius: 28px;
  padding: 20px 22px;
  margin-bottom: 14px;
}

.core-kicker {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  gap: 8px;
  color: #fde68a;
  background: rgba(251, 191, 36, 0.08);
  border: 1px solid rgba(251, 191, 36, 0.22);
  border-radius: 999px;
  padding: 7px 12px;
  font-size: 12px;
  margin-bottom: 10px;
}

.core-dashboard-head h2 {
  margin: 0;
  font-size: clamp(22px, 3.4vw, 32px);
  line-height: 1.45;
}

.core-dashboard-head p {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 2;
}

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

.core-action-card {
  position: relative;
  min-height: 210px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  text-decoration: none;
  color: var(--text);
  border: 1px solid var(--border);
  background:
    radial-gradient(circle at top left, rgba(251, 191, 36, 0.10), transparent 11rem),
    rgba(17, 24, 39, 0.88);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
  border-radius: 26px;
  padding: 18px;
  overflow: hidden;
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.core-action-card:hover,
.core-action-card:focus-visible {
  transform: translateY(-2px);
  border-color: rgba(251, 191, 36, 0.36);
  outline: none;
}

.core-action-card::after {
  content: "";
  position: absolute;
  inset: auto -48px -64px auto;
  width: 130px;
  height: 130px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
}

.core-action-icon {
  width: 44px;
  height: 44px;
  display: inline-grid;
  place-items: center;
  border-radius: 16px;
  background: rgba(251, 191, 36, 0.12);
  border: 1px solid rgba(251, 191, 36, 0.22);
  color: #fde68a;
  font-size: 22px;
}

.core-action-card strong {
  font-size: 17px;
  line-height: 1.7;
}

.core-action-card small {
  color: #cbd5e1;
  line-height: 2;
  font-size: 12.5px;
  flex: 1;
}

.core-action-cta {
  position: relative;
  z-index: 1;
  width: fit-content;
  margin-top: auto;
  color: #111827;
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
  border-radius: 999px;
  padding: 8px 12px;
  font-weight: 700;
  font-size: 12px;
}

.core-action-card.opportunities .core-action-icon { background: rgba(56, 189, 248, 0.10); border-color: rgba(56, 189, 248, 0.22); color: #bae6fd; }
.core-action-card.alerts .core-action-icon { background: rgba(34, 197, 94, 0.10); border-color: rgba(34, 197, 94, 0.22); color: #bbf7d0; }
.core-action-card.portfolio .core-action-icon { background: rgba(167, 139, 250, 0.10); border-color: rgba(167, 139, 250, 0.22); color: #ddd6fe; }

@media (max-width: 1024px) {
  .core-action-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .core-dashboard-section {
    margin-bottom: 22px;
  }

  .core-dashboard-head {
    border-radius: 22px;
    padding: 17px;
  }

  .core-dashboard-head p {
    font-size: 13px;
  }

  .core-action-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .core-action-card {
    min-height: 0;
    border-radius: 22px;
    padding: 16px;
  }

  .core-action-card small {
    font-size: 12px;
  }
}

/* Ayarbin Command Center — signature GUI layer, lightweight CSS/SVG-free effects */
.command-center-section {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(245, 158, 11, 0.22);
  background:
    radial-gradient(circle at 22% 12%, rgba(245, 158, 11, 0.18), transparent 34%),
    radial-gradient(circle at 78% 16%, rgba(34, 197, 94, 0.10), transparent 30%),
    linear-gradient(135deg, rgba(9, 14, 27, 0.98), rgba(13, 23, 42, 0.96));
  box-shadow: 0 26px 70px rgba(2, 6, 23, 0.32);
}

.command-center-section::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.28;
  background-image:
    linear-gradient(rgba(255,255,255,0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.05) 1px, transparent 1px);
  background-size: 34px 34px;
  mask-image: linear-gradient(to bottom, #000 0%, transparent 85%);
}

.command-center-head,
.command-center-grid,
.command-panel {
  position: relative;
  z-index: 1;
}

.command-center-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.command-center-head h2 {
  margin: 5px 0 8px;
  color: #fff7ed;
  letter-spacing: -0.03em;
}

.command-center-head p {
  max-width: 720px;
  margin: 0;
  color: rgba(255, 247, 237, 0.74);
  line-height: 1.9;
}

.command-kicker,
.panel-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: #fbbf24;
}

.command-kicker::before,
.panel-eyebrow::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #fbbf24;
  box-shadow: 0 0 0 5px rgba(251, 191, 36, 0.14);
}

.command-head-link,
.command-primary-link,
.tiny-panel-link,
.trigger-live-card a,
.portfolio-dna-live a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 800;
}

.command-head-link {
  padding: 10px 14px;
  color: #1f1300;
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
  box-shadow: 0 14px 30px rgba(245, 158, 11, 0.24);
}

.command-center-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 14px;
}

.command-panel {
  min-width: 0;
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 26px;
  background: rgba(15, 23, 42, 0.74);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.06), 0 18px 42px rgba(2,6,23,0.18);
}

.command-orb-card {
  grid-row: auto;
  min-height: 430px;
  padding: 24px;
  overflow: hidden;
  display: flex;
  align-items: stretch;
}

.command-orb-bg {
  position: absolute;
  inset: 18px;
  pointer-events: none;
}

.orb-ring,
.orb-core {
  position: absolute;
  left: 50%;
  top: 45%;
  transform: translate(-50%, -50%);
  border-radius: 999px;
}

.orb-ring {
  border: 1px solid rgba(251, 191, 36, 0.20);
  animation: ayarbinPulseRing 4.8s ease-in-out infinite;
}

.ring-one { width: 155px; height: 155px; }
.ring-two { width: 235px; height: 235px; animation-delay: .55s; }
.ring-three { width: 320px; height: 320px; animation-delay: 1.1s; }

.orb-core {
  width: 112px;
  height: 112px;
  background:
    radial-gradient(circle at 35% 28%, #fff7cc, transparent 24%),
    radial-gradient(circle, #fbbf24 0%, #f59e0b 44%, rgba(245, 158, 11, 0.06) 72%);
  box-shadow: 0 0 46px rgba(245, 158, 11, 0.50), 0 0 0 18px rgba(245, 158, 11, 0.08);
}

.command-orb-content {
  position: relative;
  z-index: 1;
  width: 100%;
  margin-top: auto;
  padding: 190px 0 4px;
}

.command-orb-content strong {
  display: block;
  margin: 10px 0 10px;
  color: #fff7ed;
  font-size: clamp(1.35rem, 3vw, 2.1rem);
  line-height: 1.45;
  letter-spacing: -0.04em;
}

.command-orb-content p {
  margin: 0;
  color: rgba(255, 247, 237, 0.78);
  line-height: 1.9;
}

.command-metric-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 16px 0;
}

.command-metric-row span {
  padding: 8px 11px;
  border-radius: 999px;
  color: #fde68a;
  background: rgba(245, 158, 11, 0.13);
  border: 1px solid rgba(245, 158, 11, 0.18);
  font-size: 0.82rem;
  font-weight: 800;
}

.command-primary-link {
  width: fit-content;
  padding: 12px 16px;
  color: #111827;
  background: #fbbf24;
}

.panel-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 18px 0;
}

.panel-title-row h3 {
  margin: 5px 0 0;
  color: #fff7ed;
  font-size: 1rem;
}

.tiny-panel-link {
  padding: 7px 10px;
  color: #fef3c7;
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.08);
  font-size: 0.74rem;
}

.command-status-pill {
  padding: 7px 10px;
  border-radius: 999px;
  font-size: 0.73rem;
  font-weight: 900;
  color: rgba(255,255,255,.78);
  background: rgba(255,255,255,.08);
}
.command-status-pill.expensive,
.command-status-pill.danger { color: #fecaca; background: rgba(239, 68, 68, .14); }
.command-status-pill.cheap { color: #bbf7d0; background: rgba(34, 197, 94, .14); }
.command-status-pill.balanced { color: #fde68a; background: rgba(245, 158, 11, .14); }

.market-radar-stage {
  position: relative;
  width: min(260px, 72vw);
  aspect-ratio: 1;
  margin: 18px auto 14px;
  border-radius: 999px;
  overflow: hidden;
  background:
    radial-gradient(circle, rgba(251,191,36,.11) 0 2px, transparent 3px),
    repeating-radial-gradient(circle, rgba(255,255,255,.12) 0 1px, transparent 1px 34px),
    conic-gradient(from 190deg, rgba(245,158,11,.28), transparent 35%, rgba(34,197,94,.14), transparent 62%, rgba(245,158,11,.18));
  border: 1px solid rgba(251, 191, 36, 0.20);
  box-shadow: inset 0 0 36px rgba(2,6,23,.40);
}

.radar-sweep {
  position: absolute;
  inset: 0;
  background: conic-gradient(from 0deg, transparent 0 72%, rgba(251,191,36,.22) 88%, transparent 100%);
  animation: ayarbinRadarSweep 8s linear infinite;
  opacity: .7;
}

.radar-center-label {
  position: absolute;
  inset: 50% auto auto 50%;
  transform: translate(-50%, -50%);
  width: 62px;
  height: 62px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  color: #fef3c7;
  background: rgba(15,23,42,.82);
  border: 1px solid rgba(251,191,36,.24);
  font-size: .72rem;
  font-weight: 900;
}

.radar-dot {
  position: absolute;
  left: var(--x);
  top: var(--y);
  transform: translate(-50%, -50%);
  min-width: 34px;
  height: 34px;
  padding: 0 7px;
  border-radius: 999px;
  display: inline-grid;
  place-items: center;
  color: #fff;
  background: rgba(148,163,184,.24);
  border: 1px solid rgba(255,255,255,.18);
  box-shadow: 0 0 0 6px rgba(148,163,184,.08);
  font-size: .64rem;
  font-weight: 900;
}
.radar-dot.expensive,
.radar-dot.danger { background: rgba(239,68,68,.34); box-shadow: 0 0 0 6px rgba(239,68,68,.10); }
.radar-dot.cheap { background: rgba(34,197,94,.34); box-shadow: 0 0 0 6px rgba(34,197,94,.10); }
.radar-dot.balanced { background: rgba(245,158,11,.34); box-shadow: 0 0 0 6px rgba(245,158,11,.10); }

.radar-asset-list {
  display: grid;
  gap: 8px;
  padding: 0 16px 16px;
}

.radar-asset-row {
  display: grid;
  grid-template-columns: minmax(86px, 1fr) minmax(70px, .9fr) auto;
  align-items: center;
  gap: 8px;
  padding: 10px;
  border-radius: 16px;
  background: rgba(255,255,255,.055);
  border: 1px solid rgba(255,255,255,.065);
}

.radar-asset-row strong,
.radar-asset-row b { color: #fff7ed; font-size: .82rem; }
.radar-asset-row small { display: block; color: rgba(255,247,237,.58); font-size: .68rem; margin-top: 3px; }

.bubble-mini-meter {
  position: relative;
  height: 7px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(34,197,94,.38), rgba(251,191,36,.38), rgba(239,68,68,.42));
}
.bubble-mini-meter span {
  position: absolute;
  top: 50%;
  left: var(--bubble-pos);
  transform: translate(-50%, -50%);
  width: 13px;
  height: 13px;
  border-radius: 999px;
  background: #fff7ed;
  box-shadow: 0 0 0 3px rgba(255,255,255,.16);
}

.flow-map-panel,
.alert-trigger-panel,
.portfolio-dna-panel { min-height: 220px; }

.flow-map-live {
  display: grid;
  grid-template-columns: 1fr 76px 1fr;
  align-items: center;
  gap: 8px;
  padding: 22px 18px 12px;
}

.flow-node {
  min-height: 78px;
  border-radius: 22px;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 10px;
  color: #fff7ed;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.08);
}
.flow-node span { font-size: .72rem; color: rgba(255,247,237,.58); }
.flow-node strong { display:block; margin-top: 4px; font-size: .95rem; }
.flow-node.highlighted {
  background: linear-gradient(135deg, rgba(245,158,11,.30), rgba(251,191,36,.12));
  border-color: rgba(251,191,36,.24);
  box-shadow: 0 12px 28px rgba(245,158,11,.12);
}

.flow-line {
  position: relative;
  height: 54px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.flow-line::before {
  content: "";
  position: absolute;
  left: 4px;
  right: 4px;
  top: 50%;
  height: 3px;
  transform: translateY(-50%);
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(251,191,36,.18), #fbbf24);
}
.flow-line span {
  position: relative;
  z-index: 1;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background: #fbbf24;
  box-shadow: 0 0 0 7px rgba(251,191,36,.12);
  animation: ayarbinFlowPulse 2.5s ease-in-out infinite;
}
.flow-line b {
  position: absolute;
  top: -2px;
  font-size: .62rem;
  color: #fde68a;
}

.flow-reason {
  margin: 0;
  padding: 0 18px 18px;
  color: rgba(255,247,237,.72);
  line-height: 1.8;
  font-size: .82rem;
}

.trigger-live-card,
.portfolio-dna-live {
  padding: 18px;
  color: rgba(255,247,237,.74);
}
.trigger-live-card > strong,
.portfolio-dna-live > strong { display: block; color: #fff7ed; margin-bottom: 6px; }
.trigger-live-card > span,
.portfolio-dna-live > span { display: block; line-height: 1.8; }
.trigger-live-card a,
.portfolio-dna-live a {
  margin-top: 12px;
  padding: 9px 12px;
  width: fit-content;
  color: #111827;
  background: #fbbf24;
}

.trigger-topline {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
}
.trigger-topline strong { color: #fff7ed; }
.trigger-topline span {
  padding: 6px 9px;
  border-radius: 999px;
  font-size: .72rem;
  font-weight: 900;
  color: #fde68a;
  background: rgba(245,158,11,.12);
}
.trigger-topline.active span { color: #bbf7d0; background: rgba(34,197,94,.14); }

.trigger-values {
  display: grid;
  gap: 6px;
  margin: 12px 0;
  font-size: .82rem;
}
.trigger-values b { color: #fff7ed; }

.trigger-scale {
  position: relative;
  height: 30px;
  margin: 10px 0 8px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(34,197,94,.20), rgba(251,191,36,.18), rgba(239,68,68,.22));
  border: 1px solid rgba(255,255,255,.08);
}
.trigger-current,
.trigger-mark {
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  border-radius: 999px;
}
.trigger-current {
  left: var(--current);
  width: 18px;
  height: 18px;
  background: #fff7ed;
  box-shadow: 0 0 0 5px rgba(255,255,255,.14);
}
.trigger-mark {
  left: var(--trigger);
  width: 4px;
  height: 30px;
  background: #fbbf24;
  box-shadow: 0 0 14px rgba(251,191,36,.45);
}
.trigger-live-card small { color: rgba(255,247,237,.62); }

.dna-total {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: baseline;
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.dna-total span { color: rgba(255,247,237,.56); font-size: .78rem; }
.dna-total strong { color: #fff7ed; }

.dna-row { display: grid; gap: 6px; margin: 10px 0; }
.dna-row > div:first-child {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: .82rem;
}
.dna-row strong { color: #fff7ed; }
.dna-row span { color: rgba(255,247,237,.64); }
.dna-track {
  position: relative;
  height: 9px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255,255,255,.08);
}
.dna-track span {
  position: absolute;
  inset: 0 auto 0 0;
  width: var(--dna);
  border-radius: inherit;
  background: linear-gradient(90deg, #fbbf24, #f59e0b);
}
.portfolio-dna-live p {
  margin: 12px 0 0;
  color: rgba(255,247,237,.70);
  line-height: 1.8;
  font-size: .82rem;
}

@keyframes ayarbinPulseRing {
  0%, 100% { opacity: .38; transform: translate(-50%, -50%) scale(.985); }
  50% { opacity: .82; transform: translate(-50%, -50%) scale(1.025); }
}

@keyframes ayarbinRadarSweep {
  to { transform: rotate(360deg); }
}

@keyframes ayarbinFlowPulse {
  0%, 100% { transform: scale(.92); opacity: .82; }
  50% { transform: scale(1.08); opacity: 1; }
}

@media (max-width: 1100px) {
  .command-center-grid { grid-template-columns: 1fr 1fr; }
  .command-orb-card { grid-column: auto; min-height: 390px; }
  .command-orb-content { padding-top: 160px; }
}

@media (max-width: 760px) {
  .command-center-head { display: block; }
  .command-head-link { margin-top: 12px; }
  .command-center-grid { grid-template-columns: 1fr; }
  .command-orb-card { min-height: 430px; padding: 18px; }
  .command-orb-bg { inset: 8px; }
  .ring-one { width: 130px; height: 130px; }
  .ring-two { width: 205px; height: 205px; }
  .ring-three { width: 280px; height: 280px; }
  .command-orb-content { padding-top: 176px; }
  .market-radar-stage { width: min(232px, 78vw); }
  .radar-asset-row { grid-template-columns: 1fr; }
  .flow-map-live { grid-template-columns: 1fr; }
  .flow-line { height: 42px; transform: rotate(90deg); }
  .flow-line b { display: none; }
}

/* Opportunity overview mobile-safe refinements */
.command-center-section,
.command-panel,
.command-orb-content,
.radar-asset-row,
.panel-title-row {
  min-width: 0;
}

.command-center-head h2,
.command-center-head p,
.command-orb-content strong,
.command-orb-content p,
.panel-title-row h3,
.radar-asset-row strong,
.radar-asset-row b {
  overflow-wrap: anywhere;
}

.market-radar-panel {
  min-height: 430px;
}

@media (max-width: 760px) {
  .command-center-section {
    border-radius: 24px;
    padding-inline: 14px;
  }

  .command-center-head h2 {
    font-size: clamp(1.22rem, 6vw, 1.55rem);
    line-height: 1.45;
  }

  .command-center-head p {
    font-size: .84rem;
    line-height: 1.85;
  }

  .command-kicker,
  .panel-eyebrow {
    font-size: .68rem;
    letter-spacing: 0;
  }

  .command-orb-content strong {
    font-size: clamp(1.12rem, 6vw, 1.42rem);
    line-height: 1.65;
  }

  .command-metric-row span {
    font-size: .72rem;
    white-space: normal;
  }

  .panel-title-row {
    align-items: flex-start;
    gap: 8px;
  }

  .panel-title-row h3 {
    font-size: .94rem;
    line-height: 1.55;
  }

  .command-status-pill {
    max-width: 45%;
    white-space: normal;
    text-align: center;
    line-height: 1.55;
    padding: 6px 8px;
  }

  .radar-dot {
    min-width: 30px;
    height: 30px;
    padding: 0 6px;
    font-size: .58rem;
  }

  .radar-asset-row {
    gap: 9px;
    padding: 11px;
  }

  .radar-asset-row strong,
  .radar-asset-row b {
    font-size: .78rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .orb-ring,
  .radar-sweep,
  .flow-line span { animation: none !important; }
}

/* Mobile onboarding cue + lighter opportunity overview layout */
.first-scroll-cue {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  width: 100%;
  padding: 12px 14px;
  border-radius: 18px;
  border: 1px solid rgba(251, 191, 36, 0.24);
  color: #fef3c7;
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.16), rgba(245, 158, 11, 0.08));
  text-decoration: none;
  font-weight: 900;
  line-height: 1.7;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.06), 0 12px 26px rgba(245, 158, 11, 0.10);
}
.first-scroll-cue b {
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  color: #111827;
  background: #fbbf24;
  animation: ayarbinScrollNudge 1.35s ease-in-out infinite;
}

@keyframes ayarbinScrollNudge {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(4px); }
}

.command-center-grid.radar-only {
  grid-template-columns: 1fr;
}
.command-center-grid.radar-only .market-radar-panel {
  min-height: 0;
}
.command-center-grid.radar-only .market-radar-stage {
  width: min(315px, 72vw);
}
.command-center-grid.radar-only .radar-asset-list {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.command-center-grid.radar-only .radar-asset-row:last-child:nth-child(odd) {
  grid-column: 1 / -1;
}

.bottom-tab,
.price-tab > summary,
.bottom-tab span,
.price-tab > summary span,
.core-action-card,
.core-action-card strong,
.core-action-card small,
.command-center-head,
.command-center-head h2,
.command-center-head p,
.panel-title-row,
.panel-title-row h3,
.command-status-pill,
.radar-asset-row,
.radar-asset-row strong,
.radar-asset-row small,
.radar-asset-row b {
  min-width: 0;
  overflow-wrap: anywhere;
}
.bottom-tab,
.price-tab > summary {
  white-space: normal;
  text-align: center;
  line-height: 1.42;
}
.bottom-tab span,
.price-tab > summary span {
  display: block;
}

@media (max-width: 760px) {
  .first-scroll-cue {
    font-size: 13px;
    padding: 11px 12px;
  }
  .command-center-grid.radar-only .radar-asset-list {
    grid-template-columns: 1fr;
  }
  .command-center-grid.radar-only .market-radar-stage {
    width: min(246px, 74vw);
    margin-top: 14px;
  }
  .command-center-grid.radar-only .radar-asset-row:last-child:nth-child(odd) {
    grid-column: auto;
  }
  .bottom-tab-nav {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .bottom-tab,
  .price-tab > summary {
    white-space: normal;
    line-height: 1.45;
    gap: 2px;
  }
  .bottom-tab span:not(.tab-icon),
  .price-tab > summary span:not(.tab-icon) {
    max-width: 100%;
    font-size: 10.5px;
  }
}

@media (max-width: 390px) {
  .bottom-tab,
  .price-tab > summary {
    min-height: 58px;
    padding-inline: 4px;
  }
  .bottom-tab span:not(.tab-icon),
  .price-tab > summary span:not(.tab-icon) {
    font-size: 9.6px;
  }
  .command-status-pill {
    max-width: 52%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .first-scroll-cue b { animation: none !important; }
}
