:root {
  --bg: #0b0d10;
  --bg-soft: #11151b;
  --surface: #151a22;
  --surface-2: #1b222c;
  --text: #f1f5f9;
  --muted: #98a3b3;
  --subtle: #6f7a8b;
  --line: rgba(221, 232, 255, 0.13);
  --line-strong: rgba(221, 232, 255, 0.22);
  --green: #34d27a;
  --cyan: #48b8ff;
  --violet: #6f5cff;
  --amber: #f0b84b;
  --red: #f05d5e;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.35);
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  background:
    linear-gradient(180deg, rgba(16, 18, 24, 0.96), rgba(8, 10, 13, 0.98)),
    var(--bg);
  color: var(--text);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
}

body.adblock-active {
  overflow: hidden;
}

.ad-test-slot {
  position: absolute;
  left: -9999px;
  top: -9999px;
  width: 1px;
  height: 1px;
  pointer-events: none;
  opacity: 0.01;
}

.adblock-lock {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(circle at 50% 35%, rgba(72, 184, 255, 0.12), transparent 34%),
    rgba(5, 8, 12, 0.9);
  backdrop-filter: blur(18px);
}

.adblock-card {
  width: min(440px, 100%);
  border: 1px solid rgba(72, 184, 255, 0.28);
  border-radius: 8px;
  padding: 28px;
  background:
    linear-gradient(145deg, rgba(72, 184, 255, 0.12), transparent 48%),
    rgba(18, 23, 31, 0.96);
  box-shadow: var(--shadow);
  text-align: left;
}

.adblock-card h2 {
  margin: 8px 0 10px;
  font-size: clamp(2rem, 5vw, 3rem);
  line-height: 1;
}

.adblock-card p {
  margin: 0 0 20px;
  color: var(--muted);
  line-height: 1.65;
}

.adblock-card small {
  display: block;
  margin-top: 12px;
  color: var(--subtle);
  line-height: 1.45;
}

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

button {
  cursor: pointer;
}

#marketCanvas {
  position: fixed;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  opacity: 0.42;
  pointer-events: none;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 74px;
  padding: 14px clamp(18px, 5vw, 72px);
  border-bottom: 1px solid var(--line);
  background: rgba(11, 13, 16, 0.82);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 238px;
  height: 60px;
  overflow: hidden;
}

.brand-mark img {
  width: 216px;
  height: auto;
  display: block;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-link,
.primary-nav,
.primary-button,
.secondary-button,
.chip {
  min-height: 42px;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 0 16px;
  color: var(--text);
  transition:
    transform 160ms ease,
    border-color 160ms ease,
    background 160ms ease,
    color 160ms ease;
}

.nav-link {
  background: transparent;
  color: var(--muted);
}

.nav-link:hover,
.nav-link.active {
  border-color: var(--line-strong);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
}

.primary-nav,
.primary-button {
  background: linear-gradient(135deg, var(--green), #1aa765);
  color: #07110b;
  font-weight: 760;
  box-shadow: 0 10px 24px rgba(52, 210, 122, 0.18);
}

.primary-nav:hover,
.primary-button:hover {
  transform: translateY(-1px);
}

.secondary-button {
  border-color: var(--line-strong);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
}

.secondary-button:hover {
  border-color: rgba(72, 184, 255, 0.45);
  background: rgba(72, 184, 255, 0.09);
}

.danger-button {
  border-color: rgba(248, 113, 113, 0.45);
  color: #fecaca;
}

.danger-button:hover {
  border-color: rgba(248, 113, 113, 0.72);
  background: rgba(248, 113, 113, 0.12);
}

.small {
  min-height: 36px;
  padding: 0 12px;
  font-size: 0.9rem;
}

main {
  position: relative;
  z-index: 1;
}

.view {
  display: none;
  min-height: calc(100vh - 74px);
  padding: clamp(34px, 6vw, 74px) clamp(18px, 5vw, 72px);
}

.view.active {
  display: block;
}

#homeView {
  display: none;
  flex-direction: column;
  padding-top: clamp(28px, 4vw, 54px);
  padding-bottom: 14px;
}

#homeView.active {
  display: flex;
}

.hero-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.75fr);
  gap: clamp(28px, 5vw, 70px);
  align-items: center;
  min-height: clamp(360px, 48vh, 500px);
  max-width: 1180px;
  margin: 0 auto;
}

.hero-copy {
  max-width: 720px;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--cyan);
  font-size: 0.8rem;
  font-weight: 760;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 18px;
  font-size: 7.2rem;
  line-height: 0.88;
}

h2 {
  margin-bottom: 16px;
  font-size: 4rem;
  line-height: 1;
}

h3 {
  margin-bottom: 0;
  font-size: 1.55rem;
}

.hero-text {
  max-width: 610px;
  margin-bottom: 28px;
  color: var(--muted);
  font-size: 1.12rem;
  line-height: 1.7;
}

.hero-actions,
.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.market-board,
.auth-aside,
.auth-panel,
.upload-panel,
.admin-table-wrap,
.admin-gate {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(18, 23, 31, 0.82);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.market-board {
  min-height: 372px;
  padding: 20px;
}

.board-head,
.ticker-row,
.section-heading,
.table-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.board-head {
  margin-bottom: 18px;
  color: var(--muted);
}

.board-head span {
  display: grid;
  gap: 3px;
}

.board-head small {
  color: rgba(169, 179, 195, 0.74);
  font-size: 0.72rem;
  font-weight: 650;
}

.board-head strong {
  color: var(--text);
}

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

.ticker-row {
  min-height: 52px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
}

.ticker-row span,
.quick-strip span,
.analysis-meta,
.form-note {
  color: var(--muted);
  font-size: 0.88rem;
}

.ticker-row strong {
  display: block;
  margin-bottom: 3px;
}

.ticker-value {
  text-align: right;
}

.up {
  color: var(--green);
}

.down {
  color: var(--red);
}

.flat {
  color: var(--amber);
}

.quick-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  max-width: 1180px;
  margin: 0 auto;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--line);
}

.quick-strip div {
  min-height: 88px;
  padding: 18px;
  background: rgba(17, 21, 27, 0.92);
}

.quick-strip strong {
  display: block;
  margin-top: 8px;
}

.home-promo {
  display: grid;
  grid-template-columns: minmax(280px, 0.84fr) minmax(320px, 1fr);
  gap: clamp(22px, 4vw, 58px);
  align-items: center;
  max-width: 1180px;
  width: 100%;
  margin: clamp(18px, 3vw, 34px) auto 0;
}

.home-promo-visual {
  display: grid;
  place-items: center;
  min-height: 250px;
}

.home-promo-visual img {
  display: block;
  width: min(100%, 430px);
  height: auto;
  filter: drop-shadow(0 24px 44px rgba(0, 0, 0, 0.45));
  transform-origin: 52% 82%;
  animation:
    promoFloat 4.8s ease-in-out infinite,
    promoPulse 2.2s ease-in-out infinite;
}

.home-promo-copy {
  min-width: 0;
}

.home-promo-copy h2 {
  max-width: 660px;
  margin: 0;
  font-size: clamp(2.35rem, 5vw, 5.45rem);
  line-height: 0.96;
}

.home-promo-copy h2 span {
  display: block;
  opacity: 0;
  transform: translateY(18px);
  animation: promoTextIn 780ms cubic-bezier(0.2, 0.78, 0.28, 1) forwards;
}

.home-promo-copy h2 span + span {
  color: var(--green);
  animation-delay: 240ms;
}

@keyframes promoFloat {
  0%,
  100% {
    transform: translate3d(0, 0, 0) rotate(-0.6deg);
  }

  50% {
    transform: translate3d(0, -12px, 0) rotate(0.8deg);
  }
}

@keyframes promoPulse {
  0%,
  100% {
    filter: drop-shadow(0 24px 44px rgba(0, 0, 0, 0.45));
  }

  50% {
    filter: drop-shadow(0 28px 54px rgba(72, 184, 255, 0.16));
  }
}

@keyframes promoTextIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.social-follow {
  display: grid;
  grid-template-columns: minmax(320px, 0.9fr) minmax(320px, 1fr);
  gap: clamp(24px, 4vw, 58px);
  align-items: center;
  max-width: 1180px;
  width: 100%;
  margin: clamp(30px, 5vw, 72px) auto 0;
  padding: clamp(22px, 4vw, 44px) 0;
  border-top: 1px solid rgba(221, 232, 255, 0.1);
}

.social-follow-copy {
  min-width: 0;
}

.social-follow-copy .eyebrow,
.social-follow-copy h2 {
  opacity: 0;
  transform: translateY(18px);
  animation: socialTextIn 760ms cubic-bezier(0.2, 0.78, 0.28, 1) forwards;
}

.social-follow-copy .eyebrow {
  animation-delay: 80ms;
}

.social-follow-copy h2 {
  max-width: 620px;
  margin: 0 0 24px;
  font-size: 3.35rem;
  line-height: 1.02;
  animation-delay: 180ms;
}

.social-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.social-button {
  display: inline-grid;
  place-items: center;
  width: 68px;
  min-width: 68px;
  min-height: 64px;
  border: 1px solid rgba(221, 232, 255, 0.14);
  border-radius: 8px;
  padding: 0;
  color: var(--text);
  font-weight: 780;
  cursor: pointer;
  opacity: 0;
  transform: translateY(12px);
  animation: socialButtonIn 620ms cubic-bezier(0.2, 0.78, 0.28, 1) forwards;
  transition:
    transform 160ms ease,
    border-color 160ms ease,
    background 160ms ease;
}

.social-button:nth-child(1) {
  animation-delay: 320ms;
}

.social-button:nth-child(2) {
  animation-delay: 420ms;
}

.social-button:nth-child(3) {
  animation-delay: 520ms;
}

.social-button:hover {
  transform: translateY(-2px);
}

.social-icon {
  display: block;
  width: 38px;
  height: 38px;
}

.instagram .social-icon {
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
}

.x-social .social-icon,
.telegram .social-icon {
  fill: currentColor;
}

.telegram .social-icon {
  width: 39px;
  height: 39px;
}

.social-button.instagram {
  border-color: rgba(236, 72, 153, 0.36);
  background: linear-gradient(135deg, rgba(236, 72, 153, 0.28), rgba(245, 158, 11, 0.22));
}

.social-button.x-social {
  border-color: rgba(255, 255, 255, 0.24);
  background: rgba(255, 255, 255, 0.08);
}

.social-button.telegram {
  border-color: rgba(72, 184, 255, 0.38);
  background: rgba(72, 184, 255, 0.16);
}

.social-follow-visual {
  display: grid;
  justify-items: end;
}

.social-follow-visual img {
  display: block;
  width: min(100%, 540px);
  height: auto;
  transform-origin: 55% 75%;
  -webkit-mask-image: radial-gradient(ellipse 82% 86% at 62% 52%, #000 60%, rgba(0, 0, 0, 0.78) 76%, transparent 100%);
  mask-image: radial-gradient(ellipse 82% 86% at 62% 52%, #000 60%, rgba(0, 0, 0, 0.78) 76%, transparent 100%);
  animation:
    socialImageIn 850ms cubic-bezier(0.2, 0.78, 0.28, 1) forwards,
    socialImageFloat 5s ease-in-out 900ms infinite;
}

@keyframes socialTextIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes socialButtonIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes socialImageIn {
  from {
    opacity: 0;
    transform: translate3d(18px, 16px, 0) scale(0.97);
  }

  to {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1);
  }
}

@keyframes socialImageFloat {
  0%,
  100% {
    transform: translate3d(0, 0, 0) rotate(-0.35deg);
  }

  50% {
    transform: translate3d(0, -12px, 0) rotate(0.45deg);
  }
}

.home-footer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, auto);
  grid-template-areas:
    "brand links"
    "brand copy";
  gap: 16px clamp(32px, 6vw, 72px);
  align-items: start;
  max-width: 1180px;
  width: 100%;
  margin: auto auto 0;
  padding: 18px 0 0;
  border-top: 1px solid var(--line);
  color: var(--muted);
}

.footer-brand {
  grid-area: brand;
  display: grid;
  gap: 8px;
  align-items: start;
}

.footer-brand img {
  display: block;
  width: 150px;
  height: auto;
}

.footer-brand span {
  display: none;
  color: var(--muted);
}

.footer-disclaimer {
  max-width: 720px;
  margin: 0;
  color: rgba(169, 179, 195, 0.9);
  font-size: 0.78rem;
  line-height: 1.55;
}

.footer-disclaimer strong {
  color: var(--text);
  font-weight: 780;
}

.footer-links {
  grid-area: links;
  display: grid;
  grid-template-columns: repeat(2, minmax(140px, max-content));
  gap: clamp(22px, 4vw, 44px);
  align-items: start;
  justify-self: end;
}

.footer-link-group {
  display: grid;
  gap: 8px;
  min-width: 140px;
}

.footer-link-group strong {
  color: var(--text);
  font-size: 0.92rem;
  font-weight: 780;
}

.home-footer button,
.home-footer a {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  text-decoration: none;
  text-align: left;
  cursor: pointer;
}

.home-footer button:hover,
.home-footer a:hover {
  color: var(--cyan);
}

.home-footer small {
  grid-area: copy;
  align-self: end;
  justify-self: end;
  text-align: right;
  font-size: 0.82rem;
}

.analysis-hero {
  max-width: 920px;
  margin: 0 auto 42px;
  text-align: center;
}

.analysis-hero h2 {
  margin-bottom: 24px;
}

.search-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  width: min(100%, 820px);
  min-height: 68px;
  margin: 0 auto 16px;
  padding: 8px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.32);
  backdrop-filter: blur(18px);
}

.search-shell input {
  min-width: 0;
  border: 0;
  border-radius: 6px;
  outline: 0;
  padding: 0 18px;
  background: transparent;
  color: var(--text);
  font-size: 1.05rem;
}

.search-shell input::placeholder,
input::placeholder,
textarea::placeholder {
  color: #778295;
}

.filter-row {
  justify-content: center;
}

.chip {
  min-height: 36px;
  padding: 0 13px;
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.05);
  color: var(--muted);
}

.chip.active,
.chip:hover {
  border-color: rgba(72, 184, 255, 0.42);
  background: rgba(72, 184, 255, 0.1);
  color: var(--text);
}

.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 0.55fr);
  gap: 26px;
  max-width: 1180px;
  margin: 0 auto;
}

.section-heading {
  margin-bottom: 16px;
}

.count-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  white-space: nowrap;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--muted);
  font-size: 0.88rem;
}

.analysis-list {
  display: grid;
  gap: 12px;
}

.analysis-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  min-height: 118px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(18, 23, 31, 0.78);
  backdrop-filter: blur(14px);
}

.analysis-card h4 {
  margin: 0 0 8px;
  font-size: 1.05rem;
}

.analysis-card p {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.55;
}

.analysis-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.analysis-meta span {
  display: inline-flex;
  min-height: 26px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 9px;
  background: rgba(255, 255, 255, 0.04);
}

.compact .analysis-card {
  grid-template-columns: 1fr;
  min-height: auto;
}

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

.score-subsection {
  margin: 28px 0 12px;
}

.score-subsection h3 {
  font-size: 1.2rem;
}

.score-row {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  min-height: 76px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(18, 23, 31, 0.78);
  backdrop-filter: blur(14px);
}

.score-rank {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 1px solid rgba(72, 184, 255, 0.34);
  border-radius: 8px;
  background: rgba(72, 184, 255, 0.1);
  color: var(--cyan);
  font-weight: 800;
}

.score-company {
  min-width: 0;
}

.score-company strong,
.score-company span,
.score-value strong,
.score-value span {
  display: block;
}

.score-company strong {
  overflow: hidden;
  color: var(--text);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.score-company span,
.score-value span {
  color: var(--muted);
  font-size: 0.84rem;
}

.score-value {
  min-width: 64px;
  text-align: right;
}

.score-value strong {
  color: var(--green);
  font-size: 1.22rem;
}

.empty-state {
  min-height: 132px;
  display: grid;
  place-items: center;
  border: 1px dashed var(--line-strong);
  border-radius: 8px;
  color: var(--muted);
  text-align: center;
  padding: 24px;
}

.placeholder-shell {
  max-width: 880px;
  margin: 0 auto;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(18, 23, 31, 0.82);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.placeholder-shell h2 {
  margin-bottom: 24px;
}

.latest-balances-shell {
  max-width: 1220px;
  margin: 0 auto;
}

.latest-balances-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.latest-balances-top h2 {
  margin: 0;
  font-size: 3.05rem;
}

.latest-balance-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.latest-balance-controls input,
.latest-balance-controls select {
  width: min(100%, 178px);
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 14px;
  outline: none;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
}

.latest-balance-controls input:focus,
.latest-balance-controls select:focus {
  border-color: rgba(72, 184, 255, 0.58);
  box-shadow: 0 0 0 3px rgba(72, 184, 255, 0.12);
}

.latest-balance-table {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(14, 16, 20, 0.86);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

.latest-balance-head,
.latest-balance-row {
  display: grid;
  grid-template-columns:
    44px
    minmax(136px, 0.95fr)
    minmax(128px, 0.86fr)
    minmax(96px, 0.62fr)
    minmax(150px, 0.9fr)
    minmax(150px, 0.9fr)
    minmax(168px, 1fr);
  min-width: 1010px;
  gap: 14px;
  align-items: center;
}

.latest-balance-head {
  min-height: 54px;
  padding: 0 18px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-weight: 760;
}

.latest-balance-head span:nth-child(3) {
  align-self: stretch;
  display: inline-flex;
  align-items: center;
  color: var(--text);
  border-bottom: 3px solid var(--cyan);
}

.latest-balance-row {
  width: 100%;
  min-height: 58px;
  padding: 10px 18px;
  border: 0;
  border-bottom: 1px solid rgba(221, 232, 255, 0.1);
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.latest-balance-row:nth-child(even) {
  background: rgba(255, 255, 255, 0.025);
}

.latest-balance-row:hover {
  background: rgba(72, 184, 255, 0.07);
}

.latest-balance-row:focus-visible {
  outline: 2px solid rgba(72, 184, 255, 0.72);
  outline-offset: -2px;
}

.latest-balance-index,
.latest-balance-row span {
  color: var(--muted);
}

.latest-balance-company {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 9px;
}

.latest-balance-company strong {
  overflow: hidden;
  color: var(--text);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.latest-balance-logo {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  overflow: hidden;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--cyan);
  font-size: 0.72rem;
  font-weight: 820;
}

.latest-balance-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.latest-balance-row strong {
  color: var(--text);
}

.latest-balance-row .up {
  color: var(--green);
}

.latest-balance-row .down {
  color: var(--red);
}

.balance-shell.latest-balance-detail-shell {
  width: min(100%, 1500px);
  max-width: 1500px;
}

.latest-balance-detail-heading {
  align-items: center;
}

.latest-balance-detail-logo {
  justify-self: end;
}

.latest-balance-detail-logo .latest-balance-logo {
  width: 92px;
  height: 92px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.08);
  font-size: 1.25rem;
}

.latest-balance-detail-grid .up {
  color: var(--green);
}

.latest-balance-detail-grid .down {
  color: var(--red);
}

.financial-summary-section {
  display: grid;
  gap: 20px;
  width: 100%;
}

.financial-summary-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.financial-summary-title h3 {
  margin: 0;
  font-size: 2rem;
}

.financial-summary-actions {
  display: flex;
  gap: 10px;
}

.financial-summary-actions span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 18px;
  background: rgba(0, 0, 0, 0.34);
  color: var(--text);
  font-size: 1rem;
  font-weight: 820;
}

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

.financial-table-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(14, 14, 15, 0.86);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
}

.financial-table-head,
.financial-table-row {
  display: grid;
  grid-template-columns: minmax(300px, 1.45fr) minmax(130px, 0.78fr) minmax(130px, 0.78fr) 90px;
  gap: 18px;
  align-items: center;
}

.financial-table-head {
  min-height: 58px;
  padding: 0 24px;
  background: rgba(8, 8, 9, 0.78);
  color: var(--text);
  font-size: 1rem;
}

.financial-table-head span {
  color: var(--muted);
  font-size: 0.88rem;
}

.financial-table-head strong:not(:first-child),
.financial-table-row span {
  justify-self: end;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.financial-table-row {
  min-height: 68px;
  padding: 0 24px;
  border-top: 1px solid rgba(221, 232, 255, 0.08);
  background: rgba(255, 255, 255, 0.035);
  font-size: 1.02rem;
}

.financial-table-row:nth-child(even) {
  background: rgba(255, 255, 255, 0.018);
}

.financial-table-row strong {
  color: var(--text);
  line-height: 1.35;
}

.financial-table-row span {
  color: var(--text);
  font-size: 1.04rem;
  font-weight: 780;
}

.financial-table-row .up {
  color: var(--green);
}

.financial-table-row .down {
  color: var(--red);
}

.latest-balance-back-row {
  display: flex;
  justify-content: flex-end;
  margin-top: 18px;
}

.financial-ratios-entry {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: 20px;
  border: 1px solid rgba(72, 184, 255, 0.24);
  border-radius: 8px;
  padding: 18px 20px;
  background:
    linear-gradient(90deg, rgba(72, 184, 255, 0.12), rgba(52, 210, 122, 0.08)),
    rgba(18, 23, 31, 0.76);
  box-shadow: var(--shadow);
}

.financial-ratios-entry span,
.financial-ratios-entry strong {
  display: block;
}

.financial-ratios-entry span {
  color: var(--cyan);
  font-size: 0.78rem;
  font-weight: 820;
  text-transform: uppercase;
}

.financial-ratios-entry strong {
  margin-top: 6px;
  color: var(--text);
  font-size: 1.2rem;
}

.financial-ratios-shell {
  max-width: 1180px;
}

.financial-ratios-placeholder {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 28px;
  background: rgba(18, 23, 31, 0.82);
  box-shadow: var(--shadow);
}

.financial-ratios-placeholder h3 {
  margin-bottom: 10px;
  font-size: 2rem;
}

.financial-ratios-placeholder p:not(.eyebrow) {
  margin-bottom: 0;
  color: var(--muted);
}

.ratios-page {
  display: grid;
  gap: 20px;
}

.ratios-page-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.ratios-page-head h3 {
  margin: 0;
  font-size: 2.2rem;
}

.ratios-page-head > span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 14px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  font-weight: 820;
}

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

.ratio-card {
  display: grid;
  gap: 16px;
  min-height: 240px;
  border: 1px solid rgba(72, 184, 255, 0.2);
  border-radius: 8px;
  padding: 22px;
  background:
    linear-gradient(135deg, rgba(72, 184, 255, 0.1), transparent 42%),
    rgba(18, 23, 31, 0.84);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

.ratio-card h3 {
  margin: 0;
  font-size: 1.35rem;
}

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

.ratio-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.04);
}

.ratio-row span {
  color: var(--muted);
  line-height: 1.3;
}

.ratio-row strong {
  color: var(--text);
  font-size: 1.1rem;
  font-variant-numeric: tabular-nums;
}

.ratio-admin-group {
  display: grid;
  gap: 10px;
}

.ratio-admin-group h4 {
  margin: 8px 0 0;
  color: var(--text);
  font-size: 1rem;
}

.news-shell {
  max-width: 1180px;
  margin: 0 auto;
}

.news-shell .section-heading {
  margin-bottom: 18px;
}

.news-table {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(14, 16, 20, 0.82);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

.news-table-head,
.news-row {
  display: grid;
  grid-template-columns: minmax(220px, 1.08fr) minmax(210px, 1.16fr) minmax(180px, 0.82fr) 104px;
  gap: 16px;
  align-items: center;
}

.news-table-head {
  min-height: 52px;
  padding: 0 16px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-weight: 720;
}

.news-row {
  min-height: 68px;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(221, 232, 255, 0.1);
}

.news-row:nth-child(odd) {
  background: rgba(255, 255, 255, 0.025);
}

.news-row:hover {
  background: rgba(72, 184, 255, 0.07);
}

.news-company {
  display: flex;
  min-width: 0;
  gap: 10px;
  align-items: center;
}

.news-photo,
.news-detail-photo {
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--cyan);
  font-weight: 820;
}

.news-photo {
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
}

.news-photo img,
.news-detail-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.news-company strong,
.news-company span,
.news-cell strong {
  display: block;
}

.news-company strong {
  overflow: hidden;
  color: var(--text);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.news-company span {
  color: var(--muted);
  font-size: 0.82rem;
}

.news-cell {
  color: var(--text);
}

.news-business {
  justify-self: start;
  text-align: left;
}

.news-detail-shell {
  max-width: 1040px;
}

.news-detail-heading {
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr);
  gap: 18px;
  align-items: center;
  margin-bottom: 22px;
}

.news-detail-photo {
  width: 86px;
  height: 86px;
}

.news-detail-heading h2 {
  margin-bottom: 12px;
}

.news-detail-grid {
  display: grid;
  gap: 18px;
}

.news-detail-card p {
  white-space: pre-line;
}

.news-detail-card.accent {
  border-color: rgba(72, 184, 255, 0.24);
  background: rgba(12, 25, 36, 0.82);
}

.ipo-shell {
  max-width: 1360px;
  margin: 0 auto;
}

.ipo-shell .section-heading {
  margin-bottom: 22px;
}

.ipo-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(280px, 1fr));
  gap: 18px;
}

.ipo-card {
  display: grid;
  gap: 18px;
  min-height: 342px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(18, 23, 31, 0.8);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

.ipo-card-head,
.ipo-company,
.ipo-fact {
  display: flex;
  align-items: center;
}

.ipo-card-head {
  justify-content: space-between;
  gap: 14px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.ipo-company {
  min-width: 0;
  gap: 12px;
}

.ipo-company strong,
.ipo-company span {
  display: block;
}

.ipo-company strong {
  color: var(--text);
  font-size: 1.05rem;
}

.ipo-company span {
  overflow: hidden;
  color: var(--muted);
  font-size: 0.85rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ipo-logo,
.table-logo,
.ipo-detail-logo {
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.07);
  color: var(--cyan);
  font-weight: 820;
}

.ipo-logo {
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
}

.ipo-logo img,
.table-logo img,
.ipo-detail-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.ipo-status {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 0 10px;
  font-size: 0.78rem;
  font-weight: 800;
  white-space: nowrap;
}

.ipo-status.amber {
  background: rgba(240, 184, 75, 0.2);
  color: #ffd36d;
}

.ipo-status.green {
  background: rgba(52, 210, 122, 0.16);
  color: var(--green);
}

.ipo-status.gray {
  background: rgba(152, 163, 179, 0.18);
  color: var(--text);
}

.ipo-facts {
  display: grid;
}

.ipo-fact {
  justify-content: space-between;
  gap: 12px;
  min-height: 42px;
  border-bottom: 1px solid rgba(221, 232, 255, 0.09);
}

.ipo-fact span {
  color: var(--text);
  font-weight: 700;
}

.ipo-fact strong {
  color: var(--text);
  text-align: right;
}

.ipo-detail-logo {
  width: 96px;
  height: 96px;
  padding: 8px;
}

.balance-grid.ipo-detail-grid {
  grid-template-columns: minmax(0, 1fr);
  margin-bottom: 18px;
}

.balance-grid.ipo-detail-grid .pdf-panel {
  display: none;
}

.ipo-info-card {
  grid-column: 1 / -1;
  width: 100%;
}

.ipo-report-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(18, 23, 31, 0.86);
  box-shadow: var(--shadow);
}

.ipo-report-link {
  display: block;
  color: inherit;
  text-decoration: none;
}

.ipo-report-link img {
  display: block;
  width: 100%;
  height: auto;
}

.balance-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(18, 23, 31, 0.86);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.balance-shell {
  max-width: 1180px;
  margin: 0 auto;
}

.adsense-placement {
  width: 100%;
  min-height: 96px;
  margin: 18px 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(16, 22, 31, 0.72);
}

.adsense-placement .adsbygoogle {
  width: 100%;
  min-height: 90px;
}

.adsense-preview {
  min-height: 112px;
  flex-direction: column;
  gap: 6px;
  border-style: dashed;
  background:
    linear-gradient(90deg, rgba(72, 184, 255, 0.1), rgba(52, 210, 122, 0.07)),
    rgba(16, 22, 31, 0.72);
  color: var(--muted);
}

.adsense-preview span {
  color: var(--cyan);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.adsense-preview strong {
  color: var(--text);
  font-size: 18px;
}

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

.balance-shell > .secondary-button {
  margin-bottom: 18px;
}

.balance-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 20px;
  align-items: start;
  margin-bottom: 22px;
}

.balance-heading h2 {
  margin-bottom: 14px;
}

.score-badge {
  min-width: 134px;
  padding: 18px;
  border: 1px solid rgba(52, 210, 122, 0.34);
  border-radius: 8px;
  background: rgba(52, 210, 122, 0.1);
  text-align: center;
}

.score-badge strong,
.score-badge span {
  display: block;
}

.score-badge strong {
  color: var(--green);
  font-size: 2rem;
}

.score-badge.tone-orange {
  border-color: rgba(240, 184, 75, 0.42);
  background: rgba(240, 184, 75, 0.12);
}

.score-badge.tone-orange strong {
  color: var(--amber);
}

.score-badge.tone-red {
  border-color: rgba(248, 113, 113, 0.42);
  background: rgba(248, 113, 113, 0.12);
}

.score-badge.tone-red strong {
  color: var(--red);
}

.score-badge.tone-green {
  border-color: rgba(52, 210, 122, 0.34);
  background: rgba(52, 210, 122, 0.1);
}

.score-badge span {
  color: var(--muted);
  font-size: 0.88rem;
}

.balance-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.42fr);
  gap: 22px;
}

.balance-card {
  padding: 22px;
}

.balance-card p {
  color: var(--muted);
  line-height: 1.65;
}

.pdf-panel {
  display: grid;
  align-content: start;
}

.pdf-open-card {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  width: 100%;
  min-height: 92px;
  margin: 12px 0 18px;
  border: 1px solid rgba(72, 184, 255, 0.36);
  border-radius: 8px;
  padding: 14px;
  background: rgba(72, 184, 255, 0.08);
  color: var(--text);
  text-align: left;
}

.pdf-open-card:hover {
  border-color: rgba(52, 210, 122, 0.48);
  background: rgba(52, 210, 122, 0.09);
}

.pdf-icon {
  display: grid;
  place-items: center;
  width: 52px;
  height: 62px;
  border: 1px solid rgba(240, 93, 94, 0.45);
  border-radius: 8px;
  background: rgba(240, 93, 94, 0.12);
  color: #ff9b9b;
  font-size: 0.78rem;
  font-weight: 850;
}

.pdf-open-card strong,
.pdf-open-card small,
.pdf-empty strong,
.pdf-empty span {
  display: block;
}

.pdf-open-card strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pdf-open-card small {
  margin-top: 6px;
  color: var(--muted);
}

.pdf-empty {
  margin: 12px 0 18px;
  border: 1px dashed var(--line-strong);
  border-radius: 8px;
  padding: 16px;
  color: var(--muted);
}

.pdf-empty strong {
  color: var(--text);
  margin-bottom: 6px;
}

.insight-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 22px;
}

.insight-grid div {
  min-height: 86px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
}

.insight-grid span,
.insight-grid strong {
  display: block;
}

.insight-grid span {
  color: var(--muted);
  font-size: 0.86rem;
}

.insight-grid strong {
  margin-top: 8px;
  color: var(--text);
  font-size: 1.1rem;
}

.auth-view {
  display: none;
  place-items: center;
}

.auth-view.active {
  display: grid;
}

.auth-shell {
  display: grid;
  grid-template-columns: minmax(280px, 0.82fr) minmax(340px, 430px);
  gap: 18px;
  width: min(100%, 920px);
}

.auth-aside {
  position: relative;
  display: grid;
  align-content: center;
  min-height: 520px;
  overflow: hidden;
  padding: 28px;
}

.auth-aside::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(135deg, rgba(72, 184, 255, 0.12), transparent 42%),
    linear-gradient(315deg, rgba(52, 210, 122, 0.1), transparent 48%);
  pointer-events: none;
}

.auth-aside img,
.auth-market-lines {
  position: relative;
  z-index: 1;
}

.auth-aside img {
  width: min(100%, 320px);
  height: auto;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid rgba(72, 184, 255, 0.18);
  padding: 12px;
}

.auth-market-lines {
  display: grid;
  gap: 18px;
  align-self: center;
}

.auth-market-lines span {
  display: block;
  height: 2px;
  border-radius: 8px;
  background: linear-gradient(90deg, rgba(72, 184, 255, 0.08), rgba(72, 184, 255, 0.8), rgba(52, 210, 122, 0.2));
}

.auth-market-lines span:nth-child(1) {
  width: 62%;
}

.auth-market-lines span:nth-child(2) {
  width: 86%;
}

.auth-market-lines span:nth-child(3) {
  width: 48%;
}

.auth-panel {
  width: min(100%, 420px);
  padding: 30px;
}

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

.auth-heading h2 {
  margin-bottom: 10px;
  font-size: 2.4rem;
}

.auth-heading p:not(.eyebrow) {
  margin-bottom: 0;
  color: var(--muted);
}

.field-label {
  gap: 9px;
  margin-bottom: 18px;
}

.field-label span {
  color: var(--text);
  font-weight: 720;
}

.field-label input {
  min-height: 50px;
  border-color: rgba(221, 232, 255, 0.16);
  background: rgba(255, 255, 255, 0.075);
}

.email-code-panel {
  margin: 2px 0 18px;
  padding: 14px;
  border: 1px solid rgba(69, 180, 255, 0.22);
  border-radius: 8px;
  background: rgba(69, 180, 255, 0.07);
}

.email-code-panel .form-note {
  margin: 0 0 12px;
  text-align: left;
}

.email-code-panel .field-label {
  margin-bottom: 0;
}

.auth-switch {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 18px;
  color: var(--muted);
  font-size: 0.92rem;
}

.auth-switch button {
  border: 0;
  background: transparent;
  color: var(--cyan);
  font-weight: 780;
  padding: 0;
}

.auth-switch button:hover {
  color: var(--green);
}

label {
  display: grid;
  gap: 8px;
  margin-bottom: 16px;
  color: var(--muted);
  font-size: 0.93rem;
}

input,
select,
textarea {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  outline: 0;
  padding: 0 12px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
}

textarea {
  min-height: 108px;
  padding-top: 12px;
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: rgba(72, 184, 255, 0.55);
  box-shadow: 0 0 0 3px rgba(72, 184, 255, 0.12);
}

.full {
  width: 100%;
}

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

.financial-form-panel {
  display: grid;
  gap: 14px;
  border: 1px solid rgba(72, 184, 255, 0.18);
  border-radius: 8px;
  padding: 16px;
  background: rgba(12, 25, 36, 0.36);
}

.financial-entry-group {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.financial-entry-group h4 {
  margin: 8px 0 2px;
  color: var(--text);
  font-size: 0.98rem;
}

.financial-entry-head,
.financial-entry-row {
  display: grid;
  grid-template-columns: minmax(120px, 1.3fr) repeat(3, minmax(64px, 0.74fr));
  gap: 8px;
  align-items: center;
}

.financial-entry-head {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 760;
}

.financial-entry-row span {
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.25;
}

.financial-entry-row input {
  min-width: 0;
  min-height: 34px;
  padding: 0 8px;
  font-size: 0.84rem;
}

.form-message {
  min-height: 24px;
  margin-top: 14px;
  color: var(--cyan);
  line-height: 1.4;
}

.form-message.error {
  color: var(--red);
}

#loginMessage,
#registerMessage {
  display: none !important;
}

.admin-gate {
  max-width: 640px;
  margin: 60px auto;
  padding: 28px;
  text-align: center;
}

.admin-shell {
  max-width: 1220px;
  margin: 0 auto;
}

.admin-grid {
  display: grid;
  grid-template-columns: minmax(300px, 420px) minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}

.admin-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 18px 0 22px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(18, 23, 31, 0.72);
  backdrop-filter: blur(14px);
}

.admin-tabs button {
  min-height: 40px;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 0 16px;
  background: transparent;
  color: var(--muted);
  font-weight: 760;
}

.admin-tabs button:hover,
.admin-tabs button.active {
  border-color: rgba(72, 184, 255, 0.38);
  background: rgba(72, 184, 255, 0.1);
  color: var(--text);
}

.admin-section {
  display: none;
}

.admin-section.active {
  display: grid;
}

.admin-grid-secondary {
  margin-top: 0;
}

.dashboard-section.active {
  display: block;
}

.dashboard-wrap {
  display: block;
}

.dashboard-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.dashboard-card,
.dashboard-panel-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(18, 23, 31, 0.78);
}

.dashboard-card {
  min-height: 152px;
  padding: 18px;
}

.dashboard-card:has(#dashboardTodayVisitors) {
  order: 1;
}

.dashboard-card:has(#dashboardTotalVisitors) {
  order: 2;
}

.dashboard-card:has(#dashboardTodayViews) {
  order: 3;
}

.dashboard-card:has(#dashboardTotalPageViews) {
  order: 4;
}

.dashboard-card:has(#dashboardTotalClicks) {
  order: 5;
}

.dashboard-card:has(#dashboardTodayTopPage) {
  order: 6;
}

.dashboard-card:has(#dashboardAllTimeTopPage) {
  order: 7;
}

.dashboard-card span,
.dashboard-card small,
.dashboard-list-row small,
.dashboard-empty-mini {
  color: var(--muted);
}

.dashboard-card span {
  display: block;
  min-height: 42px;
  font-size: 0.86rem;
  font-weight: 760;
  line-height: 1.35;
}

.dashboard-card strong {
  display: block;
  margin: 10px 0 6px;
  color: var(--text);
  font-size: clamp(1.45rem, 2.7vw, 2.25rem);
  line-height: 1.05;
}

.dashboard-card small {
  font-size: 0.82rem;
}

.dashboard-split {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
  gap: 16px;
  margin-top: 16px;
}

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

.dashboard-panel-card {
  padding: 18px;
}

.dashboard-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.dashboard-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.dashboard-refresh-status {
  min-width: 160px;
  color: var(--muted);
  font-size: 0.82rem;
  text-align: right;
}

.dashboard-refresh-status.success {
  color: var(--green);
}

.dashboard-refresh-status.error {
  color: var(--red);
}

#dashboardRefreshButton:disabled {
  cursor: wait;
  opacity: 0.72;
}

.dashboard-panel-head h4,
.dashboard-content-grid h5 {
  margin: 0;
  color: var(--text);
}

.dashboard-bars {
  display: grid;
  grid-template-columns: repeat(7, minmax(54px, 1fr));
  gap: 12px;
  align-items: end;
  min-height: 220px;
}

.dashboard-bar-item {
  display: grid;
  gap: 8px;
  justify-items: center;
}

.dashboard-bar-track {
  position: relative;
  width: 100%;
  max-width: 58px;
  height: 150px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(11, 14, 20, 0.72);
}

.dashboard-bar-track span {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  border-radius: 8px 8px 0 0;
  background: linear-gradient(180deg, var(--cyan), var(--green));
}

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

.dashboard-bar-item small {
  color: var(--muted);
  font-size: 0.78rem;
  text-align: center;
}

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

.dashboard-list.compact {
  gap: 8px;
}

.dashboard-list-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  background: rgba(23, 29, 38, 0.72);
}

.dashboard-list-row span {
  overflow: hidden;
  color: var(--text);
  font-weight: 760;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-list-row strong {
  color: var(--green);
}

.dashboard-list-row small {
  grid-column: 1 / -1;
  font-size: 0.78rem;
}

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

.dashboard-content-grid h5 {
  margin-bottom: 10px;
  font-size: 0.95rem;
}

.dashboard-empty-mini {
  border: 1px dashed var(--line-strong);
  border-radius: 8px;
  padding: 12px;
  font-size: 0.86rem;
}

.form-block-title {
  margin-bottom: 12px;
}

.form-block-title h3 {
  font-size: 1.35rem;
}

.upload-panel,
.admin-table-wrap {
  padding: 22px;
}

.table-logo {
  width: 38px;
  height: 38px;
  padding: 4px;
}

.table-head {
  margin-bottom: 14px;
}

.table-scroller {
  overflow-x: auto;
}

table {
  width: 100%;
  min-width: 820px;
  border-collapse: collapse;
}

th,
td {
  padding: 14px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  color: var(--muted);
}

th {
  color: var(--text);
  font-weight: 760;
}

td strong {
  color: var(--text);
}

.score-tone-select {
  display: block;
  width: 112px;
  min-height: 32px;
  margin-top: 7px;
  padding: 0 8px;
  font-size: 0.82rem;
  font-weight: 720;
}

.score-tone-select.tone-green {
  border-color: rgba(52, 210, 122, 0.38);
  color: var(--green);
}

.score-tone-select.tone-orange {
  border-color: rgba(240, 184, 75, 0.48);
  color: var(--amber);
}

.score-tone-select.tone-red {
  border-color: rgba(248, 113, 113, 0.48);
  color: var(--red);
}

.status {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border-radius: 8px;
  padding: 0 9px;
  font-size: 0.85rem;
  font-weight: 740;
}

.status.published {
  background: rgba(52, 210, 122, 0.14);
  color: var(--green);
}

.status.draft {
  background: rgba(240, 184, 75, 0.14);
  color: var(--amber);
}

.hidden {
  display: none !important;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 920px) {
  .topbar {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
  }

  .nav-actions {
    width: 100%;
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .hero-layout,
  .home-promo,
  .social-follow,
  .content-grid,
  .admin-grid,
  .auth-shell,
  .balance-grid,
  .ipo-grid,
  .news-table-head,
  .news-row,
  .news-detail-heading,
  .balance-heading {
    grid-template-columns: 1fr;
  }

  .auth-shell {
    max-width: 520px;
  }

  .auth-aside {
    min-height: 240px;
  }

  .market-board {
    min-height: auto;
  }

  .home-promo {
    max-width: 720px;
    text-align: center;
  }

  .home-promo-visual {
    min-height: auto;
  }

  .home-promo-copy h2 {
    margin-inline: auto;
  }

  .social-follow {
    max-width: 720px;
    text-align: center;
  }

  .social-follow-copy h2 {
    margin-inline: auto;
    font-size: 2.45rem;
  }

  .social-actions {
    justify-content: center;
  }

  .social-follow-visual {
    justify-items: center;
  }

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

  .home-footer {
    grid-template-columns: 1fr;
    grid-template-areas:
      "brand"
      "links"
      "copy";
    gap: 12px;
  }

  .footer-links {
    grid-template-columns: repeat(2, minmax(120px, 1fr));
    justify-self: start;
    width: 100%;
  }

  .footer-brand img {
    width: 136px;
  }

  .home-footer small {
    justify-self: start;
    text-align: left;
  }

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

  .ipo-card {
    min-height: auto;
  }

  .news-table-head {
    display: none;
  }

  .latest-balances-top {
    display: grid;
  }

  .latest-balance-controls {
    justify-content: flex-start;
  }

  .latest-balance-controls input,
  .latest-balance-controls select {
    width: min(100%, 220px);
  }

  .financial-summary-title {
    align-items: flex-start;
    flex-direction: column;
  }

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

  .financial-table-head,
  .financial-table-row {
    grid-template-columns: minmax(150px, 1fr) repeat(3, minmax(70px, 0.64fr));
    gap: 10px;
  }

  .financial-entry-head,
  .financial-entry-row {
    grid-template-columns: 1fr;
  }

  .financial-ratios-entry {
    align-items: stretch;
    flex-direction: column;
  }

  .financial-ratios-entry .primary-button {
    width: 100%;
  }

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

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

  .ratios-page-head {
    align-items: flex-start;
    flex-direction: column;
  }

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

  .news-row {
    gap: 12px;
    align-items: stretch;
    padding: 16px;
  }

  .news-business {
    text-align: left;
  }

  .news-row .secondary-button {
    width: 100%;
  }

  h1 {
    font-size: 5.2rem;
  }

  h2 {
    font-size: 3rem;
  }
}

@media (max-width: 620px) {
  .view {
    padding-inline: 16px;
  }

  .brand-mark {
    width: 190px;
    height: 54px;
  }

  .brand-mark img {
    width: 170px;
  }

  .social-follow-copy h2 {
    font-size: 2rem;
  }

  .social-button {
    flex: 0 0 68px;
  }

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

  .nav-link,
  .primary-nav {
    padding: 0 12px;
    white-space: nowrap;
  }

  .search-shell,
  .form-row {
    grid-template-columns: 1fr;
  }

  .ipo-card-head,
  .ipo-fact {
    align-items: flex-start;
  }

  .ipo-card-head {
    flex-direction: column;
  }

  .ipo-fact {
    flex-direction: column;
    gap: 4px;
    padding: 10px 0;
  }

  .ipo-fact strong {
    text-align: left;
  }

  .search-shell .primary-button {
    width: 100%;
  }

  .auth-panel,
  .auth-aside {
    padding: 22px;
  }

  .auth-aside {
    min-height: 210px;
  }

  .dashboard-card-grid,
  .dashboard-content-grid,
  .dashboard-bars {
    grid-template-columns: 1fr;
  }

  .dashboard-bar-item {
    grid-template-columns: 64px 1fr auto;
    justify-items: stretch;
  }

  .dashboard-bar-track {
    width: 64px;
    height: 42px;
  }

  .dashboard-bar-track span {
    top: 0;
    right: auto;
    width: var(--bar-width, 100%);
    height: 100% !important;
    border-radius: 0 8px 8px 0;
  }

  .home-promo {
    gap: 14px;
  }

  .home-promo-visual img {
    width: min(100%, 330px);
  }

  .auth-heading h2 {
    font-size: 2.05rem;
  }

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

  h1 {
    font-size: 3.75rem;
  }

  h2 {
    font-size: 2.15rem;
  }

  h3 {
    font-size: 1.3rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    scroll-behavior: auto !important;
    transition-duration: 0.001ms !important;
  }

  #marketCanvas {
    opacity: 0.22;
  }

  .home-promo-visual img,
  .home-promo-copy h2 span,
  .social-follow-copy .eyebrow,
  .social-follow-copy h2,
  .social-button,
  .social-follow-visual img {
    animation: none !important;
    opacity: 1;
    transform: none;
  }
}
