:root {
  color-scheme: dark;
  --bg: #070a12;
  --bg-soft: #0d1220;
  --panel: rgba(17, 24, 39, 0.72);
  --panel-strong: rgba(20, 28, 46, 0.9);
  --stroke: rgba(255, 255, 255, 0.1);
  --stroke-strong: rgba(255, 255, 255, 0.18);
  --text: #f7f8ff;
  --muted: #a5aec7;
  --muted-2: #6f7892;
  --accent: #92f7d0;
  --accent-2: #f9d976;
  --accent-3: #7b8cff;
  --danger: #ff6b8a;
  --warning: #ffd166;
  --success: #63e6be;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.36);
  --radius-xl: 28px;
  --radius-lg: 22px;
  --radius-md: 16px;
  --radius-sm: 12px;
  --sidebar: 292px;
  --font: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--bg);
}

body {
  min-height: 100vh;
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background:
    radial-gradient(circle at 12% 5%, rgba(123, 140, 255, 0.2), transparent 32rem),
    radial-gradient(circle at 90% 10%, rgba(146, 247, 208, 0.16), transparent 30rem),
    linear-gradient(135deg, #070a12 0%, #0c1020 45%, #05060b 100%);
  overflow-x: hidden;
}

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

button {
  cursor: pointer;
}

.noise {
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.08;
  z-index: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23n)' opacity='0.45'/%3E%3C/svg%3E");
}

.orb {
  position: fixed;
  width: 28rem;
  height: 28rem;
  filter: blur(80px);
  opacity: 0.2;
  pointer-events: none;
  z-index: 0;
}

.orb-one {
  top: 16%;
  left: 22%;
  background: var(--accent-3);
}

.orb-two {
  right: -6rem;
  bottom: 5%;
  background: var(--accent);
}

.app-shell {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: var(--sidebar) minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 26px;
  border-right: 1px solid var(--stroke);
  background: rgba(5, 8, 16, 0.78);
  backdrop-filter: blur(24px);
  display: flex;
  flex-direction: column;
  gap: 26px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px;
}

.brand img {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  box-shadow: 0 14px 34px rgba(146, 247, 208, 0.16);
}

.brand strong,
.brand span {
  display: block;
}

.brand strong {
  font-size: 18px;
  letter-spacing: -0.03em;
}

.brand span {
  margin-top: 2px;
  color: var(--muted);
  font-size: 13px;
}

.nav-list {
  display: grid;
  gap: 8px;
}

.nav-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 48px;
  padding: 0 14px;
  color: var(--muted);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 16px;
  text-align: left;
  transition: 0.2s ease;
}

.nav-icon {
  width: 28px;
  height: 28px;
  display: inline-grid;
  place-items: center;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
}

.nav-item:hover,
.nav-item.active {
  color: var(--text);
  background: rgba(255, 255, 255, 0.07);
  border-color: var(--stroke);
}

.nav-item.active .nav-icon {
  background: linear-gradient(135deg, rgba(146, 247, 208, 0.18), rgba(123, 140, 255, 0.14));
  color: var(--accent);
}

.sidebar-card {
  margin-top: auto;
  padding: 18px;
  border: 1px solid var(--stroke);
  border-radius: 24px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.03));
  box-shadow: var(--shadow);
}

.sidebar-card h3 {
  margin: 6px 0 8px;
  font-size: 18px;
}

.sidebar-card p:not(.eyebrow) {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.main {
  min-width: 0;
  padding: 28px;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 10px 0 22px;
  background: linear-gradient(180deg, rgba(7, 10, 18, 0.92), rgba(7, 10, 18, 0));
  backdrop-filter: blur(12px);
}

.topbar h1 {
  margin: 2px 0 0;
  font-size: clamp(28px, 4vw, 46px);
  letter-spacing: -0.06em;
}

.eyebrow {
  margin: 0;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 11px;
  font-weight: 800;
}

.top-actions,
.inline-actions,
.hero-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.primary-button,
.secondary-button,
.ghost-button,
.upload-btn {
  min-height: 42px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--text);
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease, opacity 0.2s ease;
}

.primary-button {
  background: linear-gradient(135deg, #effff7 0%, #92f7d0 44%, #7b8cff 100%);
  color: #071019;
  font-weight: 850;
  box-shadow: 0 16px 42px rgba(146, 247, 208, 0.18);
}

.secondary-button,
.upload-btn {
  background: rgba(255, 255, 255, 0.06);
  border-color: var(--stroke);
}

.ghost-button {
  width: 100%;
  background: rgba(146, 247, 208, 0.08);
  border-color: rgba(146, 247, 208, 0.2);
  color: var(--accent);
}

.primary-button:hover,
.secondary-button:hover,
.ghost-button:hover,
.upload-btn:hover {
  transform: translateY(-1px);
}

.upload-btn input {
  display: none;
}

.avatar {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid var(--stroke);
  background: rgba(255, 255, 255, 0.07);
  color: var(--accent-2);
  font-weight: 900;
}

.page {
  display: none;
  animation: pageIn 0.28s ease;
}

.page.active {
  display: block;
}

@keyframes pageIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.glass-card {
  border: 1px solid var(--stroke);
  border-radius: var(--radius-xl);
  background: linear-gradient(145deg, rgba(18, 25, 43, 0.84), rgba(13, 18, 32, 0.62));
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(340px, 0.8fr);
  gap: 18px;
}

.hero-card {
  position: relative;
  overflow: hidden;
  min-height: 360px;
  padding: 34px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 24px;
}

.hero-card::before,
.ai-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 80% 12%, rgba(249, 217, 118, 0.14), transparent 22rem),
    radial-gradient(circle at 15% 90%, rgba(146, 247, 208, 0.14), transparent 25rem);
  pointer-events: none;
}

.hero-copy,
.score-panel,
.ai-card > * {
  position: relative;
  z-index: 1;
}

.hero-copy h2 {
  max-width: 790px;
  margin: 12px 0 14px;
  font-size: clamp(34px, 5vw, 66px);
  line-height: 0.95;
  letter-spacing: -0.07em;
}

.hero-copy p:not(.eyebrow) {
  max-width: 710px;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.7;
}

.score-panel {
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 16px;
}

.score-ring {
  width: 200px;
  height: 200px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background:
    radial-gradient(circle at center, #121a2d 0 54%, transparent 55%),
    conic-gradient(var(--accent) 0deg, rgba(255, 255, 255, 0.09) 0deg);
  box-shadow: inset 0 0 40px rgba(0, 0, 0, 0.36), 0 0 70px rgba(146, 247, 208, 0.12);
}

.score-ring span {
  font-size: 58px;
  line-height: 0.9;
  font-weight: 950;
  letter-spacing: -0.07em;
}

.score-ring small {
  display: block;
  margin-top: 64px;
  position: absolute;
  color: var(--muted-2);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.score-caption {
  display: grid;
  gap: 5px;
  text-align: center;
}

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

.ai-card {
  position: relative;
  overflow: hidden;
  padding: 24px;
}

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

.card-head h3,
.section-intro h2,
.forecast-output h3,
.scenario-panel h3,
.integration-card h3,
.roadmap-card h3 {
  margin: 6px 0 0;
  letter-spacing: -0.04em;
}

.card-head h3 {
  font-size: 22px;
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid var(--stroke);
  color: var(--muted);
  background: rgba(255, 255, 255, 0.05);
  font-size: 12px;
  font-weight: 750;
}

.pill.live {
  color: var(--success);
  border-color: rgba(99, 230, 190, 0.26);
  background: rgba(99, 230, 190, 0.09);
}

.ai-summary {
  display: grid;
  gap: 12px;
}

.summary-line {
  display: grid;
  gap: 5px;
  padding: 14px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--stroke);
}

.summary-line strong {
  letter-spacing: -0.02em;
}

.summary-line span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 14px;
  margin: 18px 0;
}

.kpi-card {
  padding: 18px;
  border: 1px solid var(--stroke);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.055);
  min-height: 130px;
}

.kpi-card .kpi-label {
  color: var(--muted);
  font-size: 13px;
}

.kpi-card .kpi-value {
  margin-top: 12px;
  font-size: clamp(24px, 2.6vw, 38px);
  line-height: 1;
  font-weight: 950;
  letter-spacing: -0.07em;
}

.kpi-card .kpi-note {
  margin-top: 10px;
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--muted-2);
  font-size: 12px;
}

.dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--success);
}

.dot.warn { background: var(--warning); }
.dot.danger { background: var(--danger); }

.analytics-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(340px, 0.65fr);
  gap: 18px;
  margin-bottom: 18px;
}

.chart-card,
.insights-card,
.table-card,
.toolbar,
.section-intro,
.scenario-panel,
.forecast-output,
.integration-card,
.roadmap-card {
  padding: 22px;
}

.chart-card canvas,
.forecast-output canvas {
  width: 100%;
  height: 320px;
}

.segmented-control {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--stroke);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
}

.segment {
  border: 0;
  min-height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  color: var(--muted);
  background: transparent;
}

.segment.active {
  color: #081019;
  background: var(--accent);
  font-weight: 850;
}

.insight-list,
.priority-list,
.strategy-plan,
.template-list {
  display: grid;
  gap: 12px;
}

.insight-item,
.priority-item,
.strategy-step,
.template-item {
  padding: 14px;
  border: 1px solid var(--stroke);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.045);
}

.insight-item {
  display: grid;
  grid-template-columns: 36px 1fr;
  gap: 12px;
}

.insight-badge {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: rgba(146, 247, 208, 0.1);
  color: var(--accent);
  font-weight: 900;
}

.insight-item strong,
.priority-item strong,
.strategy-step strong,
.template-item strong {
  display: block;
  margin-bottom: 5px;
}

.insight-item p,
.priority-item p,
.strategy-step p,
.template-item p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.52;
}

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

.two-col-grid > .glass-card {
  padding: 22px;
}

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

.risk-chip {
  min-height: 90px;
  padding: 12px;
  border-radius: 16px;
  border: 1px solid var(--stroke);
  background: rgba(255, 255, 255, 0.044);
}

.risk-chip strong,
.risk-chip span {
  display: block;
}

.risk-chip strong {
  font-size: 13px;
}

.risk-chip span {
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
}

.risk-chip.danger {
  background: rgba(255, 107, 138, 0.1);
  border-color: rgba(255, 107, 138, 0.24);
}

.risk-chip.warning {
  background: rgba(255, 209, 102, 0.1);
  border-color: rgba(255, 209, 102, 0.22);
}

.risk-chip.success {
  background: rgba(99, 230, 190, 0.08);
  border-color: rgba(99, 230, 190, 0.18);
}

.priority-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

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

.status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.status.ok {
  color: var(--success);
  background: rgba(99, 230, 190, 0.09);
  border: 1px solid rgba(99, 230, 190, 0.18);
}

.status.warn {
  color: var(--warning);
  background: rgba(255, 209, 102, 0.09);
  border: 1px solid rgba(255, 209, 102, 0.18);
}

.status.bad {
  color: var(--danger);
  background: rgba(255, 107, 138, 0.09);
  border: 1px solid rgba(255, 107, 138, 0.18);
}

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

.section-intro.slim-card p:not(.eyebrow) {
  max-width: 860px;
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.6;
}

.section-intro h2 {
  font-size: clamp(28px, 4vw, 46px);
}

.toolbar {
  display: grid;
  grid-template-columns: minmax(240px, 1.1fr) minmax(180px, 0.45fr) minmax(180px, 0.45fr);
  gap: 14px;
  margin-bottom: 18px;
}

.toolbar label,
.search-field,
.calc-grid label,
.range-control {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--stroke);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.055);
  color: var(--text);
  outline: none;
  transition: border-color 0.2s ease, background 0.2s ease;
}

input,
select {
  min-height: 46px;
  padding: 0 13px;
}

textarea {
  resize: vertical;
  padding: 14px;
  line-height: 1.55;
}

select option {
  color: #111827;
}

input:focus,
select:focus,
textarea:focus {
  border-color: rgba(146, 247, 208, 0.42);
  background: rgba(255, 255, 255, 0.08);
}

.table-wrap {
  overflow: auto;
}

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

th,
td {
  padding: 15px 12px;
  border-bottom: 1px solid var(--stroke);
  text-align: left;
  font-size: 14px;
}

th {
  color: var(--muted-2);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

tbody tr {
  transition: background 0.18s ease;
}

tbody tr:hover {
  background: rgba(255, 255, 255, 0.045);
}

.sku-cell {
  color: var(--accent);
  font-weight: 850;
}

.product-title-cell {
  display: grid;
  gap: 4px;
}

.product-title-cell small {
  color: var(--muted-2);
}

.negative { color: var(--danger); }
.positive { color: var(--success); }
.warning-text { color: var(--warning); }

.reviews-grid,
.forecast-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 18px;
  margin-bottom: 18px;
}

.reviews-grid > .glass-card {
  padding: 22px;
}

.hint {
  margin-top: 10px;
  color: var(--muted-2);
  font-size: 12px;
  line-height: 1.5;
}

.review-result {
  display: grid;
  gap: 12px;
}

.result-card {
  padding: 16px;
  border: 1px solid var(--stroke);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.045);
}

.result-card strong {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.result-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
  font-size: 13px;
}

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

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

.bar-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 13px;
}

.bar-track {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

.bar-fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), var(--accent-3));
}

.scenario-panel,
.forecast-output {
  min-height: 520px;
}

.range-control {
  margin-bottom: 24px;
}

.range-control span {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

input[type="range"] {
  accent-color: var(--accent);
  padding: 0;
}

.forecast-note {
  margin-top: 22px;
  padding: 16px;
  border-radius: 18px;
  border: 1px solid rgba(146, 247, 208, 0.18);
  background: rgba(146, 247, 208, 0.07);
  color: var(--muted);
  line-height: 1.58;
}

.forecast-note strong {
  color: var(--accent);
}

.forecast-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.forecast-card {
  padding: 16px;
  border: 1px solid var(--stroke);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.045);
}

.forecast-card span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.forecast-card strong {
  display: block;
  margin-top: 8px;
  font-size: 24px;
  letter-spacing: -0.06em;
}

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

.integration-card {
  min-height: 250px;
}

.integration-icon {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(146, 247, 208, 0.14), rgba(123, 140, 255, 0.12));
  color: var(--accent);
  border: 1px solid var(--stroke);
  font-weight: 900;
}

.integration-card p {
  color: var(--muted);
  line-height: 1.6;
}

.status-dot {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.status-dot::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--muted-2);
}

.status-dot.ready::before { background: var(--success); }
.status-dot.planned::before { background: var(--warning); }

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

.roadmap div {
  padding: 18px;
  border: 1px solid var(--stroke);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.045);
}

.roadmap span {
  color: var(--accent);
  font-weight: 900;
}

.roadmap strong {
  display: block;
  margin-top: 14px;
}

.roadmap p {
  color: var(--muted);
  line-height: 1.55;
}

.modal {
  width: min(920px, calc(100vw - 34px));
  border: 1px solid var(--stroke-strong);
  border-radius: 30px;
  padding: 0;
  color: var(--text);
  background: rgba(10, 14, 24, 0.94);
  box-shadow: 0 34px 120px rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(24px);
}

.modal::backdrop {
  background: rgba(1, 3, 9, 0.72);
  backdrop-filter: blur(10px);
}

.modal-content {
  position: relative;
  padding: 30px;
}

.modal-content.compact {
  width: min(720px, 100%);
}

.close-modal {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid var(--stroke);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  font-size: 24px;
}

.product-detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.detail-box {
  padding: 16px;
  border: 1px solid var(--stroke);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.045);
}

.detail-box span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.detail-box strong {
  display: block;
  margin-top: 8px;
  font-size: 24px;
  letter-spacing: -0.06em;
}

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

.calc-result {
  padding: 18px;
  border-radius: 20px;
  border: 1px solid rgba(146, 247, 208, 0.2);
  background: rgba(146, 247, 208, 0.08);
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 22px;
  z-index: 90;
  transform: translateX(-50%) translateY(18px);
  opacity: 0;
  pointer-events: none;
  max-width: min(520px, calc(100vw - 32px));
  padding: 14px 18px;
  border: 1px solid var(--stroke);
  border-radius: 999px;
  color: var(--text);
  background: rgba(14, 20, 34, 0.92);
  box-shadow: var(--shadow);
  transition: 0.2s ease;
}

.toast.visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

@media (max-width: 1180px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: relative;
    height: auto;
    border-right: 0;
    border-bottom: 1px solid var(--stroke);
  }

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

  .sidebar-card {
    display: none;
  }

  .hero-grid,
  .analytics-grid,
  .reviews-grid,
  .forecast-grid,
  .two-col-grid {
    grid-template-columns: 1fr;
  }

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

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

@media (max-width: 760px) {
  .main,
  .sidebar {
    padding: 18px;
  }

  .topbar,
  .section-intro,
  .top-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .top-actions > *,
  .inline-actions > *,
  .hero-actions > * {
    width: 100%;
  }

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

  .hero-card,
  .ai-card,
  .chart-card,
  .insights-card,
  .table-card,
  .toolbar,
  .section-intro,
  .scenario-panel,
  .forecast-output,
  .integration-card,
  .roadmap-card,
  .two-col-grid > .glass-card,
  .reviews-grid > .glass-card {
    padding: 18px;
    border-radius: 22px;
  }

  .hero-copy h2 {
    font-size: 38px;
  }

  .score-ring {
    width: 160px;
    height: 160px;
  }

  .score-ring span {
    font-size: 46px;
  }

  .kpi-grid,
  .forecast-cards,
  .integrations-grid,
  .roadmap,
  .risk-map,
  .toolbar,
  .calc-grid,
  .product-detail-grid {
    grid-template-columns: 1fr;
  }

  .priority-item {
    align-items: flex-start;
    flex-direction: column;
  }
}

/* Подсказки для заказчика: показывают, как адаптировать демо под его сферу */
.rf-client-guide {
  position: fixed;
  right: clamp(12px, 2vw, 24px);
  bottom: clamp(12px, 2vw, 24px);
  z-index: 9999;
  width: min(380px, calc(100vw - 24px));
  color: #f8fafc;
  border: 1px solid rgba(255,255,255,.16);
  background: linear-gradient(135deg, rgba(15,23,42,.86), rgba(2,6,23,.78));
  box-shadow: 0 24px 80px rgba(0,0,0,.44);
  border-radius: 24px;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  overflow: hidden;
}
.rf-client-guide summary {
  cursor: pointer;
  list-style: none;
  padding: 16px 18px;
  font: 700 14px/1.35 Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: -.01em;
}
.rf-client-guide summary::-webkit-details-marker { display: none; }
.rf-client-guide summary::after {
  content: "свернуть";
  float: right;
  color: rgba(248,250,252,.48);
  font-weight: 500;
  font-size: 11px;
}
.rf-client-guide:not([open]) summary::after { content: "открыть"; }
.rf-client-guide__body {
  border-top: 1px solid rgba(255,255,255,.10);
  padding: 0 18px 18px;
  color: rgba(248,250,252,.72);
  font: 500 13px/1.55 Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
.rf-client-guide__body p { margin: 14px 0 10px; }
.rf-client-guide__body ul { margin: 0; padding-left: 18px; }
.rf-client-guide__body li { margin: 7px 0; }
@media (max-width: 720px) {
  .rf-client-guide { left: 12px; right: 12px; bottom: 12px; width: auto; border-radius: 20px; }
  .rf-client-guide__body { max-height: 220px; overflow: auto; }
}


/* Update: значения на графиках видны при наведении */
.has-chart-tooltip {
  position: relative;
}

.chart-tooltip {
  position: absolute;
  z-index: 20;
  min-width: 128px;
  display: grid;
  gap: 4px;
  padding: 10px 12px;
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 14px;
  color: #f8fafc;
  background: rgba(7,12,22,.92);
  box-shadow: 0 20px 55px rgba(0,0,0,.42);
  backdrop-filter: blur(16px);
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, -100%) translateY(-10px);
  transition: opacity .16s ease, transform .16s ease;
}

.chart-tooltip.show {
  opacity: 1;
  transform: translate(-50%, -100%) translateY(-14px);
}

.chart-tooltip strong {
  font-size: 13px;
}

.chart-tooltip span {
  color: rgba(219,234,254,.76);
  font-size: 12px;
}
