
:root {
  color-scheme: dark;
  --msai-bg: #020617;
  --msai-bg-2: #071225;
  --msai-panel: rgba(15, 23, 42, .86);
  --msai-panel-2: rgba(2, 6, 23, .72);
  --msai-text: #f8fafc;
  --msai-muted: #94a3b8;
  --msai-line: rgba(148, 163, 184, .20);
  --msai-green: #22c55e;
  --msai-blue: #38bdf8;
  --msai-gold: #fbbf24;
}

html,
body,
input,
select,
textarea,
button,
a {
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at 7% -8%, rgba(34, 197, 94, .14), transparent 32%),
    radial-gradient(circle at 80% -5%, rgba(37, 99, 235, .20), transparent 34%),
    linear-gradient(180deg, var(--msai-bg) 0%, var(--msai-bg-2) 48%, var(--msai-bg) 100%);
  color: var(--msai-text);
}

.msai-topbar {
  position: sticky;
  top: 0;
  z-index: 999;
  border-bottom: 1px solid var(--msai-line);
  background: rgba(2, 6, 23, .86);
  backdrop-filter: blur(18px);
}

.msai-nav {
  width: min(1400px, calc(100% - 32px));
  min-height: 68px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.msai-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--msai-text);
  text-decoration: none;
  font-size: 18px;
  font-weight: 950;
  letter-spacing: -.035em;
}

.msai-brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--msai-green), var(--msai-blue));
  color: #020617;
  font-size: 13px;
  font-weight: 950;
  box-shadow: 0 16px 34px rgba(34, 197, 94, .22);
}

.msai-links {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.msai-link {
  padding: 9px 12px;
  border-radius: 999px;
  color: #cbd5e1;
  text-decoration: none;
  font-size: 14px;
  font-weight: 900;
  background: rgba(148, 163, 184, .08);
  border: 1px solid transparent;
}

.msai-link:hover,
.msai-link.active {
  background: rgba(148, 163, 184, .16);
  color: #fff;
}

.msai-link.primary {
  color: #020617;
  background: linear-gradient(135deg, var(--msai-green), var(--msai-blue));
  border-color: transparent;
}

.msai-note {
  width: min(1400px, calc(100% - 32px));
  margin: 14px auto;
  padding: 13px 16px;
  border: 1px solid rgba(34, 197, 94, .22);
  border-radius: 16px;
  background: rgba(34, 197, 94, .08);
  color: #bbf7d0;
  font-size: 14px;
  font-weight: 800;
}

.msai-note.error {
  border-color: rgba(251, 113, 133, .30);
  background: rgba(251, 113, 133, .10);
  color: #fecdd3;
}

.price-card .btn {
  margin-top: 14px;
  width: 100%;
}

@media (max-width: 760px) {
  .msai-nav {
    width: min(100% - 20px, 1400px);
    min-height: auto;
    padding: 12px 0;
    align-items: flex-start;
    flex-direction: column;
  }

  .msai-links {
    width: 100%;
  }

  .msai-link {
    flex: 1 1 auto;
    text-align: center;
  }

  .msai-note {
    width: min(100% - 20px, 1400px);
  }
}


/* Premium payment modal */
.msai-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: grid;
  place-items: center;
  padding: 20px;
  background:
    radial-gradient(circle at 35% 20%, rgba(34, 197, 94, .14), transparent 34%),
    radial-gradient(circle at 70% 20%, rgba(56, 189, 248, .16), transparent 34%),
    rgba(2, 6, 23, .72);
  backdrop-filter: blur(16px);
}

.msai-modal-card {
  width: min(560px, 100%);
  padding: 26px;
  border: 1px solid rgba(148, 163, 184, .24);
  border-radius: 28px;
  background:
    radial-gradient(circle at top right, rgba(56, 189, 248, .12), transparent 42%),
    rgba(15, 23, 42, .96);
  box-shadow: 0 36px 110px rgba(0, 0, 0, .44);
  color: #f8fafc;
}

.msai-modal-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 11px;
  border-radius: 999px;
  border: 1px solid rgba(34, 197, 94, .28);
  background: rgba(34, 197, 94, .10);
  color: #bbf7d0;
  font-size: 13px;
  font-weight: 950;
}

.msai-modal-card h2 {
  margin: 16px 0 0;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1;
  letter-spacing: -.06em;
}

.msai-modal-card p {
  margin: 12px 0 0;
  color: #cbd5e1;
  line-height: 1.55;
}

.msai-modal-form {
  margin-top: 20px;
  display: grid;
  gap: 12px;
}

.msai-modal-form input {
  min-height: 54px;
  width: 100%;
  border-radius: 16px;
  border: 1px solid rgba(148, 163, 184, .24);
  background: rgba(2, 6, 23, .72);
  color: #f8fafc;
  padding: 0 16px;
  font-size: 16px;
  font-weight: 850;
  outline: none;
}

.msai-modal-form input:focus {
  border-color: rgba(56, 189, 248, .56);
  box-shadow: 0 0 0 4px rgba(56, 189, 248, .10);
}

.msai-modal-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.msai-modal-btn {
  min-height: 48px;
  border-radius: 15px;
  border: 1px solid rgba(148, 163, 184, .20);
  padding: 0 16px;
  cursor: pointer;
  font-weight: 950;
}

.msai-modal-btn.primary {
  border-color: transparent;
  background: linear-gradient(135deg, #22c55e, #38bdf8);
  color: #020617;
}

.msai-modal-btn.secondary {
  background: rgba(148, 163, 184, .12);
  color: #f8fafc;
}

.msai-modal-status {
  min-height: 20px;
  color: #fecdd3;
  font-size: 14px;
  font-weight: 800;
}

@media (max-width: 560px) {
  .msai-modal-card {
    padding: 20px;
    border-radius: 22px;
  }

  .msai-modal-actions {
    grid-template-columns: 1fr;
  }
}



.msai-paid-badge {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(34, 197, 94, .12);
  border: 1px solid rgba(34, 197, 94, .26);
  color: #bbf7d0;
  font-size: 13px;
  font-weight: 950;
  white-space: nowrap;
}



/* =========================================================
   MyStockAI calm UI pass — меньше жирности и визуального шума
   ========================================================= */

body {
  font-weight: 500;
  letter-spacing: -0.01em;
}

/* Не делаем всё подряд жирным */
b,
strong {
  font-weight: 700;
}

/* Шапка спокойнее */
.msai-brand span:last-child,
.msai-link,
.msai-paid-badge {
  font-weight: 750;
}

/* Кнопки без “кирпича” */
button,
.btn,
.btn-link,
.msai-modal-btn,
.msai-link {
  font-weight: 750;
}

/* Заголовки легче */
h1,
h2,
h3,
h4,
.ticker-title,
.side-title,
.eyebrow {
  font-weight: 760;
  letter-spacing: -0.035em;
}

/* Синие заголовки и секции — менее кислотные */
.scan-section h3,
.result-panel h3,
.card h3,
.workspace h2,
.workspace h3 {
  color: #dbeafe;
  font-weight: 720;
}

/* Текст в карточках легче */
.scan-item,
.result-card,
.metric,
.card,
.result-panel,
.workspace,
.panel,
.login-card {
  font-weight: 500;
}

/* Плашки внутри карточек не должны кричать */
.pill,
.badge,
.score span,
.metric span {
  font-weight: 700;
  letter-spacing: 0.01em;
}

/* Чуть меньше размер и жирность мелкой аналитики */
.scan-item,
.scan-item .muted,
.result-card,
.result-card p,
.muted {
  font-size: 14px;
  line-height: 1.5;
}

/* Карточки результатов спокойнее */
.scan-item {
  background: rgba(15, 23, 42, .46);
  border-color: rgba(148, 163, 184, .14);
}

.scan-section,
.result-card {
  background: rgba(2, 6, 23, .28);
  border-color: rgba(148, 163, 184, .14);
}

/* Цена/главные цифры — заметно, но не огромный плакат */
.ticker-title {
  font-size: clamp(26px, 3vw, 42px);
}

.score b {
  font-weight: 760;
}

/* Снижаем визуальный шум в терминале */
.scan-meta {
  gap: 6px;
}

.pill {
  padding: 4px 8px;
}

/* На мобильном не превращаем всё в кашу */
@media (max-width: 760px) {
  h1 { font-size: 38px; }
  h2 { font-size: 28px; }
  .scan-item,
  .result-card,
  .metric {
    padding: 12px;
  }
}


/* =========================================================
   MyStockAI ideas table — compact finance terminal style
   No important overrides.
   ========================================================= */

.ideas-summary {
  margin: 14px 0 10px;
  color: #94a3b8;
  font-size: 13px;
  line-height: 1.45;
  font-weight: 450;
}

.ideas-viewbar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 12px 0;
}

.ideas-view-btn {
  min-height: 34px;
  padding: 7px 11px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, .18);
  background: rgba(15, 23, 42, .58);
  color: #cbd5e1;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.ideas-view-btn.active {
  background: rgba(34, 197, 94, .12);
  border-color: rgba(34, 197, 94, .30);
  color: #bbf7d0;
}

.ideas-table-wrap {
  margin-top: 10px;
  border: 1px solid rgba(148, 163, 184, .16);
  border-radius: 18px;
  overflow: auto;
  background: rgba(2, 6, 23, .26);
}

.ideas-table {
  width: 100%;
  min-width: 980px;
  border-collapse: collapse;
  font-size: 13px;
}

.ideas-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  padding: 10px 11px;
  text-align: left;
  color: #94a3b8;
  background: rgba(15, 23, 42, .96);
  border-bottom: 1px solid rgba(148, 163, 184, .14);
  font-weight: 600;
  white-space: nowrap;
}

.ideas-table td {
  padding: 10px 11px;
  border-bottom: 1px solid rgba(148, 163, 184, .08);
  color: #dbeafe;
  font-weight: 430;
  vertical-align: middle;
  white-space: nowrap;
}

.ideas-table tbody tr {
  cursor: pointer;
}

.ideas-table tbody tr:hover td {
  background: rgba(96, 165, 250, .06);
}

.ideas-table tbody tr.selected td {
  background: rgba(34, 197, 94, .08);
}

.ideas-ticker {
  font-weight: 760;
  color: #f8fafc;
  letter-spacing: .01em;
}

.ideas-comment {
  color: #94a3b8;
  max-width: 430px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ideas-empty {
  padding: 18px;
  color: #94a3b8;
  font-size: 14px;
}

@media (max-width: 760px) {
  .ideas-table {
    min-width: 860px;
    font-size: 12px;
  }

  .ideas-table th,
  .ideas-table td {
    padding: 9px 8px;
  }
}


/* =========================================================
   MyStockAI ideas table polish — quieter terminal UI
   No important overrides.
   ========================================================= */

#scan h2 {
  font-size: clamp(30px, 3.2vw, 44px);
  letter-spacing: -0.045em;
}

#scan textarea {
  font-size: 14px;
  line-height: 1.55;
  font-weight: 520;
  letter-spacing: .01em;
}

#scan .scan-actions {
  align-items: center;
}

#scan .scan-actions .btn {
  min-height: 40px;
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 700;
}

.ideas-table {
  font-size: 12.8px;
}

.ideas-table th {
  padding: 9px 10px;
  font-weight: 580;
  color: #8fa0b8;
}

.ideas-table td {
  padding: 9px 10px;
  font-weight: 420;
}

.ideas-table .pill {
  padding: 3px 7px;
  font-size: 11.5px;
  font-weight: 650;
  background: rgba(96, 165, 250, .10);
  border: 1px solid rgba(148, 163, 184, .12);
}

.ideas-ticker {
  font-weight: 700;
}

.ideas-comment {
  max-width: 520px;
  color: #a8b3c7;
}

.ideas-view-btn {
  min-height: 31px;
  padding: 6px 10px;
  font-size: 12.5px;
  font-weight: 560;
}

.ideas-summary {
  margin-top: 10px;
  font-size: 12.8px;
}
