.smart-insight {
    --si-green: #0f766e;
    --si-green-bright: #16a34a;
    --si-green-soft: #ecfdf5;
    --si-blue: #2563eb;
    --si-blue-soft: #eff6ff;
    --si-cyan: #0891b2;
    --si-amber: #d97706;
    --si-amber-soft: #fffbeb;
    --si-rose: #e11d48;
    --si-rose-soft: #fff1f2;
    --si-ink: #0f172a;
    --si-ink-soft: #334155;
    --si-muted: #64748b;
    --si-line: #e2e8f0;
    --si-canvas: #ffffff;
    --si-surface: #f8fafc;
    --si-grid: #eef2f7;
    --si-chart-bg: #ffffff;
    --si-tooltip-bg: #0f172a;
    --si-tooltip-text: #f8fafc;
    --si-shadow: 0 24px 70px -32px rgba(15, 23, 42, 0.28), 0 8px 24px -16px rgba(15, 23, 42, 0.12);
    position: relative;
    max-width: 1280px;
    margin: 0 auto 46px;
    padding: 0;
    color: var(--si-ink);
    font-family: "Montserrat", "Segoe UI", Tahoma, Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
}

.smart-insight *,
.smart-insight *::before,
.smart-insight *::after {
    box-sizing: border-box;
}

.smart-insight-shell {
    position: relative;
    overflow: hidden;
    padding: 30px;
    border: 1px solid rgba(37, 99, 235, 0.1);
    border-radius: 28px;
    background: var(--si-canvas);
    box-shadow: var(--si-shadow);
}

.smart-insight-shell::before {
    content: "";
    position: absolute;
    inset: 0 0 auto;
    height: 5px;
    background: linear-gradient(90deg, #0f766e 0%, #2563eb 52%, #22d3ee 100%);
}

.smart-insight-shell::after {
    content: "";
    position: absolute;
    top: -160px;
    right: -120px;
    width: 420px;
    height: 420px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(37, 99, 235, 0.08) 0%, rgba(37, 99, 235, 0) 68%);
    pointer-events: none;
}

.smart-insight-header {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
    padding: 8px 2px 24px;
    border-bottom: 1px solid var(--si-line);
}

.smart-insight-header-main {
    min-width: 0;
}

.smart-insight-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    border: 1px solid #bbf7d0;
    border-radius: 999px;
    background: var(--si-green-soft);
    color: #15803d;
    font-size: 10.5px;
    font-weight: 800;
    letter-spacing: 0.9px;
    line-height: 1.2;
    text-transform: uppercase;
}

.smart-insight-eyebrow i {
    font-size: 11px;
}

.smart-insight-title {
    margin: 13px 0 8px;
    color: #0b2530;
    font-size: clamp(22px, 2.25vw, 32px);
    font-weight: 800;
    letter-spacing: -0.6px;
    line-height: 1.18;
}

.smart-insight-subtitle {
    max-width: 800px;
    margin: 0;
    color: var(--si-muted);
    font-size: 13.5px;
    line-height: 1.7;
}

.smart-insight-status {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 10px;
    padding: 11px 15px;
    border: 1px solid #bbf7d0;
    border-radius: 14px;
    background: #f0fdf4;
}

.smart-insight-status-dot {
    position: relative;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #22c55e;
    box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.14);
}

.smart-insight-status-dot::after {
    content: "";
    position: absolute;
    inset: -4px;
    border: 1px solid rgba(34, 197, 94, 0.45);
    border-radius: 50%;
    animation: smart-insight-pulse 2.2s ease-out infinite;
}

.smart-insight-status-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    line-height: 1.2;
}

.smart-insight-status-text strong {
    color: #15803d;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.8px;
}

.smart-insight-status-text small {
    color: #4b5563;
    font-size: 10.5px;
    font-weight: 500;
}

.smart-insight-tabs {
    display: flex;
    align-items: center;
    gap: 4px;
    width: fit-content;
    margin: 22px 0 20px;
    padding: 5px;
    border: 1px solid var(--si-line);
    border-radius: 999px;
    background: #f1f5f9;
}

.smart-insight-tab {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 10px 18px;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: var(--si-muted);
    font-family: inherit;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.7px;
    line-height: 1;
    cursor: pointer;
    transition: background 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}

.smart-insight-tab i {
    font-size: 11px;
}

.smart-insight-tab:hover {
    color: var(--si-green);
}

.smart-insight-tab.is-active {
    background: var(--si-canvas);
    color: var(--si-green);
    box-shadow: 0 3px 10px rgba(15, 23, 42, 0.08);
}

.smart-insight-tab:focus-visible {
    outline: 2px solid var(--si-blue);
    outline-offset: 2px;
}

.smart-insight-panel[hidden] {
    display: none !important;
}

.smart-insight-panel.is-active {
    animation: smart-insight-fade 0.32s ease both;
}

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

.smart-insight-card {
    --si-accent: var(--si-green);
    --si-accent-soft: var(--si-green-soft);
    --si-accent-ink: #15803d;
    position: relative;
    overflow: hidden;
    min-width: 0;
    padding: 18px;
    border: 1px solid var(--si-line);
    border-radius: 18px;
    background: var(--si-canvas);
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.smart-insight-card::before {
    content: "";
    position: absolute;
    inset: 0 0 auto;
    height: 3px;
    background: var(--si-accent);
    opacity: 0.82;
}

.smart-insight-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 30px -20px rgba(15, 23, 42, 0.35);
}

.smart-insight-card--green {
    --si-accent: #16a34a;
    --si-accent-soft: #ecfdf5;
    --si-accent-ink: #15803d;
}

.smart-insight-card--blue {
    --si-accent: #2563eb;
    --si-accent-soft: #eff6ff;
    --si-accent-ink: #1d4ed8;
}

.smart-insight-card--amber {
    --si-accent: #d97706;
    --si-accent-soft: #fffbeb;
    --si-accent-ink: #b45309;
}

.smart-insight-card--teal {
    --si-accent: #0d9488;
    --si-accent-soft: #f0fdfa;
    --si-accent-ink: #0f766e;
}

.smart-insight-card-top {
    display: flex;
    align-items: center;
    gap: 10px;
}

.smart-insight-card-icon {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 12px;
    background: var(--si-accent-soft);
    color: var(--si-accent-ink);
    font-size: 15px;
}

.smart-insight-card-label {
    min-width: 0;
    color: var(--si-muted);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.8px;
    line-height: 1.3;
}

.smart-insight-card-value {
    margin: 14px 0 5px;
    color: var(--si-ink);
    font-size: clamp(25px, 2vw, 34px);
    font-weight: 800;
    letter-spacing: -0.7px;
    line-height: 1.05;
    font-variant-numeric: tabular-nums;
}

.smart-insight-card-value.is-positive {
    color: #15803d;
}

.smart-insight-card-value.is-negative {
    color: #dc2626;
}

.smart-insight-card-caption {
    color: var(--si-ink-soft);
    font-size: 11.5px;
    font-weight: 600;
    line-height: 1.4;
}

.smart-insight-card-meta {
    margin-top: 8px;
    color: var(--si-muted);
    font-size: 10.5px;
    line-height: 1.5;
}

.smart-insight-card-meta strong {
    color: var(--si-accent-ink);
    font-weight: 800;
}

.smart-insight-card-split {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 12px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px dashed var(--si-line);
    color: var(--si-muted);
    font-size: 10.5px;
}

.smart-insight-card-split span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    min-width: 0;
}

.smart-insight-card-split i {
    color: var(--si-accent-ink);
    font-size: 10px;
}

.smart-insight-card-split strong {
    color: var(--si-ink);
    font-weight: 800;
    font-variant-numeric: tabular-nums;
}

.smart-insight-main-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
    gap: 16px;
    margin-top: 16px;
}

.smart-insight-panel-card {
    min-width: 0;
    padding: 20px;
    border: 1px solid var(--si-line);
    border-radius: 20px;
    background: var(--si-canvas);
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03);
}

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

.smart-insight-panel-kicker {
    display: block;
    color: var(--si-blue);
    font-size: 9.5px;
    font-weight: 800;
    letter-spacing: 1px;
    line-height: 1.3;
}

.smart-insight-panel-head h3,
.smart-insight-chart-head h3 {
    margin: 4px 0 0;
    color: var(--si-ink);
    font-size: 15px;
    font-weight: 800;
    letter-spacing: -0.2px;
    line-height: 1.35;
}

.smart-insight-panel-icon {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 12px;
    background: var(--si-blue-soft);
    color: var(--si-blue);
    font-size: 14px;
}

.smart-insight-table-wrap {
    overflow-x: auto;
    border: 1px solid var(--si-line);
    border-radius: 13px;
    -webkit-overflow-scrolling: touch;
}

.smart-insight-table {
    width: 100%;
    min-width: 520px;
    border-collapse: collapse;
}

.smart-insight-table th,
.smart-insight-table td {
    padding: 11px 12px;
    border-bottom: 1px solid #eef2f7;
    color: var(--si-ink-soft);
    font-size: 11.5px;
    text-align: right;
    white-space: nowrap;
}

.smart-insight-table thead th {
    background: var(--si-surface);
    color: var(--si-muted);
    font-size: 9.5px;
    font-weight: 800;
    letter-spacing: 0.6px;
    text-transform: uppercase;
}

.smart-insight-table thead th:first-child,
.smart-insight-table tbody th {
    text-align: left;
}

.smart-insight-table tbody th {
    color: var(--si-ink);
    font-weight: 700;
}

.smart-insight-table tbody tr:last-child th,
.smart-insight-table tbody tr:last-child td {
    border-bottom: 0;
}

.smart-insight-table tbody tr:hover {
    background: #f8fbff;
}

.smart-insight-table-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    margin-right: 8px;
    border-radius: 8px;
    font-size: 10px;
    vertical-align: middle;
}

.smart-insight-table-icon--green {
    background: #ecfdf5;
    color: #15803d;
}

.smart-insight-table-icon--rose {
    background: #fff1f2;
    color: #e11d48;
}

.smart-insight-table-icon--blue {
    background: #eff6ff;
    color: #1d4ed8;
}

.smart-insight-table-icon--amber {
    background: #fffbeb;
    color: #b45309;
}

.smart-insight-diff {
    display: inline-flex;
    min-width: 42px;
    align-items: center;
    justify-content: center;
    padding: 3px 8px;
    border-radius: 999px;
    font-size: 10.5px;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
}

.smart-insight-diff--up {
    background: #ecfdf5;
    color: #15803d;
}

.smart-insight-diff--down {
    background: #fff1f2;
    color: #e11d48;
}

.smart-insight-diff--flat {
    background: #f1f5f9;
    color: #64748b;
}

.smart-insight-table-empty {
    padding: 22px 12px !important;
    color: var(--si-muted) !important;
    text-align: center !important;
    white-space: normal !important;
}

.smart-insight-net {
    margin-top: 14px;
    padding: 14px 16px;
    border: 1px solid #d1fae5;
    border-radius: 14px;
    background: linear-gradient(135deg, #ecfdf5 0%, #eff6ff 100%);
}

.smart-insight-net-main {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

.smart-insight-net-main span {
    color: var(--si-ink-soft);
    font-size: 11.5px;
    font-weight: 700;
}

.smart-insight-net-main strong {
    color: #15803d;
    font-size: 22px;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.5px;
}

.smart-insight-net-main strong.is-negative {
    color: #dc2626;
}

.smart-insight-net-main strong.is-positive {
    color: #15803d;
}

.smart-insight-net small {
    display: block;
    margin-top: 5px;
    color: var(--si-muted);
    font-size: 10px;
    line-height: 1.5;
}

.smart-insight-composition-total {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 12px;
    padding: 2px 0 0;
}

.smart-insight-composition-total span {
    color: var(--si-muted);
    font-size: 11.5px;
    font-weight: 600;
}

.smart-insight-composition-total strong {
    color: var(--si-ink);
    font-size: 30px;
    font-weight: 800;
    letter-spacing: -0.7px;
    line-height: 1;
    font-variant-numeric: tabular-nums;
}

.smart-insight-progress {
    display: flex;
    overflow: hidden;
    width: 100%;
    height: 14px;
    margin: 16px 0 4px;
    border-radius: 999px;
    background: #f1f5f9;
}

.smart-insight-progress-male {
    height: 100%;
    background: linear-gradient(90deg, #0f766e, #22c55e);
    transition: width 0.6s ease;
}

.smart-insight-progress-female {
    height: 100%;
    background: linear-gradient(90deg, #2563eb, #38bdf8);
    transition: width 0.6s ease;
}

.smart-insight-composition-legend {
    margin-top: 10px;
}

.smart-insight-legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 0;
    border-bottom: 1px dashed var(--si-line);
}

.smart-insight-legend-item:last-child {
    border-bottom: 0;
}

.smart-insight-legend-dot {
    flex: 0 0 auto;
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.smart-insight-legend-dot--male {
    background: #16a34a;
}

.smart-insight-legend-dot--female {
    background: #2563eb;
}

.smart-insight-legend-label {
    flex: 1;
    color: var(--si-ink-soft);
    font-size: 11.5px;
    font-weight: 600;
}

.smart-insight-legend-item strong {
    color: var(--si-ink);
    font-size: 12.5px;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
}

.smart-insight-legend-item small {
    min-width: 62px;
    color: var(--si-muted);
    font-size: 10.5px;
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.smart-insight-chart-card {
    min-width: 0;
    padding: 20px 20px 12px;
    border: 1px solid var(--si-line);
    border-radius: 20px;
    background: var(--si-canvas);
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03);
}

.smart-insight-chart-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 8px;
}

.smart-insight-chart-tag {
    flex: 0 0 auto;
    padding: 4px 9px;
    border: 1px solid #bfdbfe;
    border-radius: 999px;
    background: #eff6ff;
    color: #1d4ed8;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.4px;
    line-height: 1.3;
    text-transform: uppercase;
}

.smart-insight-chart {
    width: 100%;
    min-width: 0;
    min-height: 300px;
}

.smart-insight-chart-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 300px;
    padding: 24px;
    border: 1px dashed var(--si-line);
    border-radius: 14px;
    background: var(--si-surface);
    color: var(--si-muted);
    font-size: 12px;
    line-height: 1.6;
    text-align: center;
}

.smart-insight-chart-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.95fr) minmax(300px, 1fr);
    gap: 16px;
    align-items: stretch;
}

.smart-insight-chart-card--growth,
.smart-insight-chart-card--age {
    display: flex;
    flex-direction: column;
    padding: 20px;
}

.smart-insight-chart-head-copy {
    min-width: 0;
}

.smart-insight-chart-desc {
    max-width: 540px;
    margin: 6px 0 0;
    color: var(--si-muted);
    font-size: 11.5px;
    line-height: 1.6;
}

.smart-insight-chart-tools {
    display: flex;
    flex: 0 0 auto;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
}

.smart-insight-periods {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 3px;
    padding: 4px;
    border: 1px solid var(--si-line);
    border-radius: 999px;
    background: var(--si-surface);
}

.smart-insight-period {
    padding: 7px 10px;
    border: 1px solid transparent;
    border-radius: 999px;
    background: transparent;
    color: var(--si-muted);
    font-family: inherit;
    font-size: 10px;
    font-weight: 700;
    line-height: 1;
    white-space: nowrap;
    cursor: pointer;
    transition: background 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}

.smart-insight-period:hover {
    background: var(--si-canvas);
    color: var(--si-green);
}

.smart-insight-period.is-active {
    background: var(--si-green);
    color: #ffffff;
    box-shadow: 0 3px 10px rgba(15, 118, 110, 0.24);
}

.smart-insight-period:focus-visible,
.smart-insight-download:focus-visible {
    outline: 2px solid var(--si-blue);
    outline-offset: 2px;
}

.smart-insight-download {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 9px 13px;
    border: 1px solid #bbf7d0;
    border-radius: 11px;
    background: #f0fdf4;
    color: #15803d;
    font-family: inherit;
    font-size: 10px;
    font-weight: 800;
    line-height: 1;
    white-space: nowrap;
    cursor: pointer;
    transition: background 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}

.smart-insight-download:hover {
    border-color: #86efac;
    background: #dcfce7;
    transform: translateY(-1px);
}

.smart-insight-download i {
    font-size: 10px;
}

.smart-insight-chart--growth {
    flex: 1;
    min-height: 360px;
    margin-top: 6px;
}

.smart-insight-chart-note {
    margin: 6px 0 0;
    color: var(--si-muted);
    font-size: 10px;
    line-height: 1.5;
}

.smart-insight-donut-wrap {
    position: relative;
    display: flex;
    flex: 1;
    align-items: center;
    justify-content: center;
    min-height: 280px;
    margin: 6px 0 2px;
}

.smart-insight-chart--donut {
    width: 100%;
    min-height: 280px;
}

.smart-insight-donut-center {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    pointer-events: none;
    text-align: center;
}

.smart-insight-donut-center span {
    color: var(--si-muted);
    font-size: 9.5px;
    font-weight: 700;
    letter-spacing: 0.4px;
    text-transform: uppercase;
}

.smart-insight-donut-center strong {
    color: var(--si-ink);
    font-size: 26px;
    font-weight: 800;
    letter-spacing: -0.6px;
    line-height: 1;
    font-variant-numeric: tabular-nums;
}

.smart-insight-donut-legend {
    margin-top: 8px;
    border-top: 1px solid var(--si-line);
}

.smart-insight-donut-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px dashed var(--si-line);
}

.smart-insight-donut-item:last-child {
    padding-bottom: 0;
    border-bottom: 0;
}

.smart-insight-donut-dot {
    flex: 0 0 auto;
    width: 9px;
    height: 9px;
    border-radius: 50%;
}

.smart-insight-donut-item--productive .smart-insight-donut-dot {
    background: #15803d;
}

.smart-insight-donut-item--elderly .smart-insight-donut-dot {
    background: #2563eb;
}

.smart-insight-donut-item--children .smart-insight-donut-dot {
    background: #d97706;
}

.smart-insight-donut-copy {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.smart-insight-donut-copy strong {
    color: var(--si-ink);
    font-size: 11.5px;
    font-weight: 700;
    line-height: 1.3;
}

.smart-insight-donut-copy small {
    color: var(--si-muted);
    font-size: 10px;
    line-height: 1.3;
}

.smart-insight-donut-value {
    display: flex;
    flex: 0 0 auto;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
    text-align: right;
}

.smart-insight-donut-value strong {
    color: var(--si-ink);
    font-size: 13px;
    font-weight: 800;
    line-height: 1.2;
    font-variant-numeric: tabular-nums;
}

.smart-insight-donut-value small {
    color: var(--si-muted);
    font-size: 10px;
    font-weight: 600;
    line-height: 1.2;
}

.smart-insight-insight-grid {

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

.smart-insight-insight-card {
    --si-insight-accent: #0f766e;
    --si-insight-soft: #ecfdf5;
    display: flex;
    align-items: flex-start;
    gap: 14px;
    min-width: 0;
    padding: 18px;
    border: 1px solid var(--si-line);
    border-radius: 18px;
    background: var(--si-canvas);
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.smart-insight-insight-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 30px -22px rgba(15, 23, 42, 0.35);
}

.smart-insight-insight-card--green {
    --si-insight-accent: #15803d;
    --si-insight-soft: #ecfdf5;
}

.smart-insight-insight-card--blue {
    --si-insight-accent: #1d4ed8;
    --si-insight-soft: #eff6ff;
}

.smart-insight-insight-card--amber {
    --si-insight-accent: #b45309;
    --si-insight-soft: #fffbeb;
}

.smart-insight-insight-card--slate {
    --si-insight-accent: #475569;
    --si-insight-soft: #f1f5f9;
}

.smart-insight-insight-icon {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 13px;
    background: var(--si-insight-soft);
    color: var(--si-insight-accent);
    font-size: 16px;
}

.smart-insight-insight-body {
    min-width: 0;
}

.smart-insight-insight-body h3 {
    margin: 0 0 6px;
    color: var(--si-ink);
    font-size: 13.5px;
    font-weight: 800;
    letter-spacing: -0.15px;
    line-height: 1.4;
}

.smart-insight-insight-body p {
    margin: 0;
    color: var(--si-muted);
    font-size: 12px;
    line-height: 1.7;
}

@keyframes smart-insight-pulse {
    0% {
        opacity: 0.8;
        transform: scale(0.85);
    }
    70% {
        opacity: 0;
        transform: scale(1.7);
    }
    100% {
        opacity: 0;
        transform: scale(1.7);
    }
}

@keyframes smart-insight-fade {
    from {
        opacity: 0;
        transform: translateY(5px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

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

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

@media (max-width: 767px) {
    .smart-insight {
        margin: 0 10px 24px;
    }

    .smart-insight-shell {
        padding: 18px 14px;
        border-radius: 20px;
    }

    .smart-insight-header {
        flex-direction: column;
        gap: 15px;
        padding: 6px 0 18px;
    }

    .smart-insight-title {
        margin-top: 10px;
        font-size: 21px;
        letter-spacing: -0.4px;
    }

    .smart-insight-subtitle {
        font-size: 12px;
        line-height: 1.65;
    }

    .smart-insight-status {
        width: 100%;
        padding: 10px 12px;
    }

    .smart-insight-tabs {
        width: 100%;
        margin: 16px 0;
    }

    .smart-insight-tab {
        flex: 1;
        gap: 5px;
        padding: 9px 6px;
        font-size: 9.5px;
        letter-spacing: 0.3px;
    }

    .smart-insight-tab i {
        font-size: 9px;
    }

    .smart-insight-stats {
        gap: 10px;
    }

    .smart-insight-card {
        padding: 14px;
    }

    .smart-insight-card-icon {
        width: 32px;
        height: 32px;
        border-radius: 10px;
        font-size: 13px;
    }

    .smart-insight-card-value {
        margin-top: 11px;
        font-size: 23px;
    }

    .smart-insight-card-split {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }

    .smart-insight-panel-card,
    .smart-insight-chart-card {
        padding: 14px;
        border-radius: 16px;
    }

    .smart-insight-chart {
        min-height: 260px;
    }

    .smart-insight-chart-empty {
        min-height: 260px;
    }

    .smart-insight-chart-card--growth .smart-insight-chart-head {
        flex-direction: column;
    }

    .smart-insight-chart-card--age .smart-insight-chart-head {
        flex-direction: row;
        align-items: center;
    }

    .smart-insight-chart-tools {
        width: 100%;
        justify-content: flex-start;
    }

    .smart-insight-periods {
        width: 100%;
    }

    .smart-insight-period {
        flex: 1;
        padding: 8px 6px;
        text-align: center;
    }

    .smart-insight-download {
        justify-content: center;
        width: 100%;
    }

    .smart-insight-chart--growth {
        min-height: 320px;
    }

    .smart-insight-donut-wrap,
    .smart-insight-chart--donut {
        min-height: 240px;
    }

    .smart-insight-donut-center strong {
        font-size: 23px;
    }

    .smart-insight-insight-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .smart-insight-insight-card {
        padding: 14px;
    }

    .smart-insight-insight-icon {
        width: 36px;
        height: 36px;
        border-radius: 11px;
        font-size: 14px;
    }

    .smart-insight-composition-total strong {
        font-size: 25px;
    }
}

@media (max-width: 480px) {
    .smart-insight-stats {
        grid-template-columns: 1fr;
    }

    .smart-insight-card-split {
        flex-direction: row;
        flex-wrap: wrap;
    }

    .smart-insight-legend-item {
        flex-wrap: wrap;
    }

    .smart-insight-legend-item small {
        width: 100%;
        min-width: 0;
        padding-left: 18px;
        text-align: left;
    }
}

@media (prefers-reduced-motion: reduce) {
    .smart-insight-status-dot::after,
    .smart-insight-panel.is-active {
        animation: none;
    }

    .smart-insight-card,
    .smart-insight-insight-card {
        transition: none;
    }
}

html.dark-mode .smart-insight {
    --si-green: #22c55e;
    --si-green-bright: #4ade80;
    --si-green-soft: rgba(34, 197, 94, 0.14);
    --si-blue: #60a5fa;
    --si-blue-soft: rgba(59, 130, 246, 0.16);
    --si-cyan: #22d3ee;
    --si-amber: #fbbf24;
    --si-amber-soft: rgba(245, 158, 11, 0.16);
    --si-rose: #fb7185;
    --si-rose-soft: rgba(244, 63, 94, 0.16);
    --si-ink: #f8fafc;
    --si-ink-soft: #cbd5e1;
    --si-muted: #94a3b8;
    --si-line: #273449;
    --si-canvas: #111c2e;
    --si-surface: #0d1726;
    --si-grid: #1e293b;
    --si-chart-bg: #111c2e;
    --si-tooltip-bg: #020617;
    --si-tooltip-text: #e2e8f0;
    --si-shadow: 0 24px 70px -32px rgba(0, 0, 0, 0.75), 0 8px 24px -16px rgba(0, 0, 0, 0.5);
    color: var(--si-ink);
}

html.dark-mode .smart-insight-shell {
    border-color: #1e293b;
    background: #0b1220;
}

html.dark-mode .smart-insight-shell::after {
    background: radial-gradient(circle, rgba(37, 99, 235, 0.14) 0%, rgba(37, 99, 235, 0) 68%);
}

html.dark-mode .smart-insight-title {
    color: #ffffff;
}

html.dark-mode .smart-insight-eyebrow {
    border-color: rgba(34, 197, 94, 0.3);
    background: rgba(22, 163, 74, 0.15);
    color: #86efac;
}

html.dark-mode .smart-insight-status {
    border-color: rgba(34, 197, 94, 0.28);
    background: rgba(22, 163, 74, 0.12);
}

html.dark-mode .smart-insight-status-text strong {
    color: #86efac;
}

html.dark-mode .smart-insight-status-text small {
    color: #cbd5e1;
}

html.dark-mode .smart-insight-tabs {
    border-color: #273449;
    background: #0d1726;
}

html.dark-mode .smart-insight-tab {
    color: #94a3b8;
}

html.dark-mode .smart-insight-tab:hover {
    color: #86efac;
}

html.dark-mode .smart-insight-tab.is-active {
    background: #15803d;
    color: #ffffff;
    box-shadow: 0 3px 12px rgba(21, 128, 61, 0.35);
}

html.dark-mode .smart-insight-card,
html.dark-mode .smart-insight-panel-card,
html.dark-mode .smart-insight-chart-card,
html.dark-mode .smart-insight-insight-card {
    border-color: #273449;
    background: #111c2e;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

html.dark-mode .smart-insight-card:hover,
html.dark-mode .smart-insight-insight-card:hover {
    box-shadow: 0 18px 40px -24px rgba(0, 0, 0, 0.8);
}

html.dark-mode .smart-insight-card--green {
    --si-accent: #22c55e;
    --si-accent-soft: rgba(34, 197, 94, 0.14);
    --si-accent-ink: #86efac;
}

html.dark-mode .smart-insight-card--blue {
    --si-accent: #60a5fa;
    --si-accent-soft: rgba(59, 130, 246, 0.16);
    --si-accent-ink: #93c5fd;
}

html.dark-mode .smart-insight-card--amber {
    --si-accent: #fbbf24;
    --si-accent-soft: rgba(245, 158, 11, 0.16);
    --si-accent-ink: #fcd34d;
}

html.dark-mode .smart-insight-card--teal {
    --si-accent: #2dd4bf;
    --si-accent-soft: rgba(20, 184, 166, 0.16);
    --si-accent-ink: #5eead4;
}

html.dark-mode .smart-insight-card-label,
html.dark-mode .smart-insight-card-meta {
    color: #94a3b8;
}

html.dark-mode .smart-insight-card-value {
    color: #f8fafc;
}

html.dark-mode .smart-insight-card-value.is-positive {
    color: #4ade80;
}

html.dark-mode .smart-insight-card-value.is-negative {
    color: #fb7185;
}

html.dark-mode .smart-insight-card-caption {
    color: #cbd5e1;
}

html.dark-mode .smart-insight-card-split {
    border-top-color: #273449;
    color: #94a3b8;
}

html.dark-mode .smart-insight-card-split strong {
    color: #f8fafc;
}

html.dark-mode .smart-insight-panel-kicker {
    color: #60a5fa;
}

html.dark-mode .smart-insight-panel-head h3,
html.dark-mode .smart-insight-chart-head h3 {
    color: #f8fafc;
}

html.dark-mode .smart-insight-panel-icon {
    background: rgba(59, 130, 246, 0.16);
    color: #93c5fd;
}

html.dark-mode .smart-insight-table-wrap {
    border-color: #273449;
}

html.dark-mode .smart-insight-table th,
html.dark-mode .smart-insight-table td {
    border-bottom-color: #273449;
    color: #cbd5e1;
}

html.dark-mode .smart-insight-table thead th {
    background: #0d1726;
    color: #94a3b8;
}

html.dark-mode .smart-insight-table tbody th {
    color: #f8fafc;
}

html.dark-mode .smart-insight-table tbody tr:hover {
    background: #162033;
}

html.dark-mode .smart-insight-table-icon--green {
    background: rgba(34, 197, 94, 0.14);
    color: #86efac;
}

html.dark-mode .smart-insight-table-icon--rose {
    background: rgba(244, 63, 94, 0.16);
    color: #fda4af;
}

html.dark-mode .smart-insight-table-icon--blue {
    background: rgba(59, 130, 246, 0.16);
    color: #93c5fd;
}

html.dark-mode .smart-insight-table-icon--amber {
    background: rgba(245, 158, 11, 0.16);
    color: #fcd34d;
}

html.dark-mode .smart-insight-diff--up {
    background: rgba(34, 197, 94, 0.14);
    color: #86efac;
}

html.dark-mode .smart-insight-diff--down {
    background: rgba(244, 63, 94, 0.16);
    color: #fda4af;
}

html.dark-mode .smart-insight-diff--flat {
    background: #1e293b;
    color: #cbd5e1;
}

html.dark-mode .smart-insight-net {
    border-color: #166534;
    background: linear-gradient(135deg, rgba(21, 128, 61, 0.16) 0%, rgba(37, 99, 235, 0.12) 100%);
}

html.dark-mode .smart-insight-net-main span {
    color: #cbd5e1;
}

html.dark-mode .smart-insight-net-main strong.is-positive {
    color: #4ade80;
}

html.dark-mode .smart-insight-net-main strong.is-negative {
    color: #fb7185;
}

html.dark-mode .smart-insight-net small {
    color: #94a3b8;
}

html.dark-mode .smart-insight-composition-total span {
    color: #94a3b8;
}

html.dark-mode .smart-insight-composition-total strong {
    color: #f8fafc;
}

html.dark-mode .smart-insight-progress {
    background: #1e293b;
}

html.dark-mode .smart-insight-legend-item {
    border-bottom-color: #273449;
}

html.dark-mode .smart-insight-legend-label {
    color: #cbd5e1;
}

html.dark-mode .smart-insight-legend-item strong {
    color: #f8fafc;
}

html.dark-mode .smart-insight-legend-item small {
    color: #94a3b8;
}

html.dark-mode .smart-insight-chart-tag {
    border-color: rgba(59, 130, 246, 0.3);
    background: rgba(59, 130, 246, 0.14);
    color: #93c5fd;
}

html.dark-mode .smart-insight-chart-desc,
html.dark-mode .smart-insight-chart-note {
    color: #94a3b8;
}

html.dark-mode .smart-insight-periods {
    border-color: #273449;
    background: #0d1726;
}

html.dark-mode .smart-insight-period {
    color: #94a3b8;
}

html.dark-mode .smart-insight-period:hover {
    background: #162033;
    color: #86efac;
}

html.dark-mode .smart-insight-period.is-active {
    background: #15803d;
    color: #ffffff;
}

html.dark-mode .smart-insight-download {
    border-color: #2f4a35;
    background: #162033;
    color: #86efac;
}

html.dark-mode .smart-insight-download:hover {
    border-color: #3f6b4a;
    background: #1b2b3f;
}

html.dark-mode .smart-insight-chart-empty {
    border-color: #273449;
    background: #0d1726;
    color: #94a3b8;
}

html.dark-mode .smart-insight-donut-legend {
    border-top-color: #273449;
}

html.dark-mode .smart-insight-donut-item {
    border-bottom-color: #273449;
}

html.dark-mode .smart-insight-donut-center span {
    color: #94a3b8;
}

html.dark-mode .smart-insight-donut-center strong,
html.dark-mode .smart-insight-donut-copy strong,
html.dark-mode .smart-insight-donut-value strong {
    color: #f8fafc;
}

html.dark-mode .smart-insight-donut-copy small,
html.dark-mode .smart-insight-donut-value small {
    color: #94a3b8;
}

html.dark-mode .smart-insight-insight-card--green {
    --si-insight-accent: #86efac;
    --si-insight-soft: rgba(34, 197, 94, 0.14);
}

html.dark-mode .smart-insight-insight-card--blue {
    --si-insight-accent: #93c5fd;
    --si-insight-soft: rgba(59, 130, 246, 0.16);
}

html.dark-mode .smart-insight-insight-card--amber {
    --si-insight-accent: #fcd34d;
    --si-insight-soft: rgba(245, 158, 11, 0.16);
}

html.dark-mode .smart-insight-insight-card--slate {
    --si-insight-accent: #cbd5e1;
    --si-insight-soft: rgba(148, 163, 184, 0.14);
}

html.dark-mode .smart-insight-insight-body h3 {
    color: #f8fafc;
}

html.dark-mode .smart-insight-insight-body p {
    color: #94a3b8;
}
