/* Shared page-level overrides for login and filter panels */

/* Keep neutral-rate page tabs at the same right edge regardless of toolbar actions. */
.neutral-rate-header-tools {
    gap: 8px;
}

.neutral-rate-tabs {
    display: none;
    flex: 0 0 auto;
    grid-template-columns: repeat(3, 88px);
    gap: 4px;
}

.neutral-rate-tabs > * {
    display: flex;
    min-height: 40px;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    white-space: nowrap;
}

@media (min-width: 768px) {
    .neutral-rate-header-tools {
        gap: 16px;
    }

    .neutral-rate-tabs {
        display: grid;
    }
}

/* Login page glow */
.login-bg-glow {
    position: absolute;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(0, 242, 255, 0.15) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
    z-index: 0;
    animation: float-glow 10s infinite ease-in-out;
}

.login-bg-glow.glow-left {
    top: -100px;
    left: -100px;
}

.login-bg-glow.glow-right {
    bottom: -100px;
    right: -100px;
    background: radial-gradient(circle, rgba(188, 19, 254, 0.15) 0%, transparent 70%);
    animation-delay: -5s;
}

.login-title-glow {
    text-shadow: 0 0 20px rgba(0, 242, 255, 0.3);
}

@keyframes float-glow {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(20px, -20px) scale(1.1); }
}

/* Filter panel controls */
.filter-panel .custom-select-wrapper { display: block; width: 100%; min-width: 0; }
.filter-panel .custom-select-trigger { width: 100%; }
.filter-panel .ocr-filter-item { width: 100%; min-width: 0; }

/* Keep custom-select and input controls visually identical */
.filter-panel .custom-select-trigger,
.filter-panel .filter-control {
    min-height: 42px;
    border: 1px solid rgb(51, 65, 85) !important;
    border-radius: 0.375rem;
}

.filter-panel .filter-control {
    height: 42px;
    background-color: rgb(15, 23, 42);
    line-height: 1.5;
}

.filter-panel .custom-select-trigger:hover,
.filter-panel .filter-control:hover {
    border-color: rgb(71, 85, 105) !important;
}

/* Keep OCR filter rows balanced across common desktop widths */
@media (min-width: 1024px) {
    .filter-panel .ocr-filter-grid {
        max-width: 1180px;
        justify-content: start;
    }
}

@media (min-width: 1280px) {
    .filter-panel .ocr-filter-grid {
        max-width: 1240px;
        justify-content: start;
    }
}

@media (min-width: 1440px) {
    .filter-panel .filter-grid {
        max-width: 1120px;
        justify-content: start;
    }

    .filter-panel .ocr-filter-grid {
        max-width: 1280px;
        justify-content: start;
    }
}

@media (min-width: 1600px) {
    .filter-panel .ocr-filter-grid {
        max-width: 1360px;
        justify-content: start;
    }
}

/* Keep critical OCR whitelist columns readable on narrower screens */
.ocr-whitelist-table {
    min-width: 1180px;
    table-layout: auto;
}

.ocr-whitelist-table .ocr-whitelist-col-title {
    min-width: 180px;
}

.ocr-whitelist-table .ocr-whitelist-col-link {
    min-width: 240px;
}

.ocr-whitelist-table .ocr-whitelist-col-keyword,
.ocr-whitelist-table .ocr-whitelist-col-product {
    min-width: 160px;
}

/* Floating horizontal scrollbar for table containers */
.floating-scrollbar {
    scrollbar-width: thin;
    scrollbar-color: rgba(71, 85, 105, 0.9) transparent;
    height: 14px;
    padding: 2px 0;
}

.floating-scrollbar::-webkit-scrollbar {
    height: 10px;
}

.floating-scrollbar::-webkit-scrollbar-track {
    background: transparent;
}

.floating-scrollbar::-webkit-scrollbar-thumb {
    border-radius: 9999px;
    background: rgba(71, 85, 105, 0.9);
}

/* OCR image preview modal scrollbar */
.ocr-preview-scroll {
    scrollbar-width: thin;
    scrollbar-color: rgba(34, 211, 238, 0.7) rgba(15, 23, 42, 0.85);
}

.ocr-preview-scroll::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

.ocr-preview-scroll::-webkit-scrollbar-track {
    border-radius: 9999px;
    background: rgba(15, 23, 42, 0.85);
}

.ocr-preview-scroll::-webkit-scrollbar-thumb {
    border-radius: 9999px;
    border: 2px solid rgba(15, 23, 42, 0.85);
    background: linear-gradient(180deg, rgba(34, 211, 238, 0.85) 0%, rgba(59, 130, 246, 0.75) 100%);
}

.ocr-preview-scroll::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, rgba(103, 232, 249, 0.95) 0%, rgba(96, 165, 250, 0.85) 100%);
}

/* Insight dashboard cockpit */
.insight-dashboard-shell {
    position: relative;
}

.insight-user-filter {
    min-width: 0;
}

.insight-header-bar {
    width: 8px;
    height: 28px;
    border-radius: 999px;
    background: linear-gradient(180deg, rgba(34, 211, 238, 1) 0%, rgba(56, 189, 248, 0.35) 100%);
    box-shadow: 0 0 16px rgba(34, 211, 238, 0.35);
}

.insight-hero {
    position: relative;
    overflow: hidden;
    background:
        linear-gradient(120deg, rgba(6, 182, 212, 0.08) 0%, rgba(15, 23, 42, 0.76) 44%, rgba(56, 189, 248, 0.05) 100%),
        rgba(2, 6, 23, 0.66);
    box-shadow: inset 0 0 0 1px rgba(56, 189, 248, 0.08), 0 16px 44px rgba(2, 6, 23, 0.36);
}

.insight-hero::after {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: repeating-linear-gradient(
        90deg,
        rgba(56, 189, 248, 0.06) 0,
        rgba(56, 189, 248, 0.06) 1px,
        transparent 1px,
        transparent 22px
    );
    opacity: 0.35;
}

.insight-eyebrow {
    letter-spacing: 0.25em;
}

.insight-filter-panel {
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.88) 0%, rgba(2, 6, 23, 0.88) 100%);
    box-shadow: inset 0 0 0 1px rgba(56, 189, 248, 0.06);
}

.insight-card,
.insight-project-block {
    position: relative;
    min-width: 0;
}

.insight-card::before,
.insight-project-block::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 1px;
    pointer-events: none;
    background: linear-gradient(90deg, transparent, rgba(0, 242, 255, 0.5), transparent);
    opacity: 0.5;
    display: none;
}

.insight-card-loading {
    position: absolute;
    inset: 0;
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    background: transparent;
    backdrop-filter: none;
    color: rgba(148, 163, 184, 0.92);
    font-size: 0.875rem;
    white-space: nowrap;
    transform: translateY(2px);
    transition: opacity 0.18s ease, visibility 0.18s ease, transform 0.18s ease;
}

.insight-card-loading.hidden {
    display: flex;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.insight-project-block.is-loading .insight-card-loading,
.insight-card.is-loading .insight-card-loading {
    opacity: 1;
    visibility: visible;
    pointer-events: none;
    transform: translateY(0);
}

.insight-card-loading__spinner {
    width: 14px;
    height: 14px;
    border: 2px solid rgba(34, 211, 238, 0.14);
    border-top-color: rgba(34, 211, 238, 0.78);
    border-radius: 999px;
    animation: insight-spin 0.8s linear infinite;
}

@keyframes insight-spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.insight-card-head {
    position: relative;
    z-index: 1;
    min-width: 0;
}

.insight-card-toolbar {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    min-width: 0;
}

.insight-card-title-group,
.insight-card-filter {
    min-width: 0;
}

.insight-card-title-group {
    display: flex;
    align-items: center;
    flex: 0 1 auto;
    min-height: 36px;
    max-width: none;
}

.insight-card-title-inline {
    display: inline-flex;
    align-items: center;
    flex-wrap: nowrap;
    gap: 0.5rem;
    min-width: max-content;
    max-width: 100%;
    white-space: nowrap;
}

.insight-card-title {
    margin: 0;
    min-width: auto;
    max-width: none;
    flex: 0 1 auto;
    line-height: 1.25;
    white-space: nowrap;
    overflow: visible;
    text-overflow: clip;
    overflow-wrap: normal;
    word-break: normal;
}

.insight-card-type-tag {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    min-height: 20px;
    padding: 0 0.5rem;
    border: 1px solid rgba(34, 211, 238, 0.28);
    border-radius: 999px;
    background: rgba(8, 47, 73, 0.42);
    color: rgba(103, 232, 249, 0.92);
    font-size: 0.6875rem;
    font-weight: 600;
    line-height: 1;
    letter-spacing: 0.04em;
    white-space: nowrap;
    box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.12);
}

.insight-card-filter {
    position: relative;
    z-index: 1;
    flex: 1 1 auto;
    width: 100%;
    max-width: 100%;
    padding: 0;
}

.insight-card-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    min-width: 0;
}

.top100-dashboard-section {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.top100-dashboard-card .insight-card-title-group {
    min-height: 36px;
}

.top100-card-filter-grid {
    grid-template-columns: minmax(120px, 132px) minmax(120px, 132px) minmax(260px, 320px) auto auto;
}

.top100-filter-spacer {
    min-width: 0;
}

.top100-filter-spacer .insight-filter-control {
    visibility: hidden;
    pointer-events: none;
}

.top100-chart-panel,
.top100-detail-panel {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.top100-detail-panel__head {
    padding-inline: 0;
    justify-content: flex-start;
}

.top100-detail-panel__title {
    margin-right: auto;
    color: rgba(226, 232, 240, 0.92);
}

.top100-detail-table-shell {
    overflow-x: auto;
    width: 100%;
    min-width: 0;
    padding-bottom: 0.1rem;
    scrollbar-width: thin;
    scrollbar-color: rgba(71, 85, 105, 0.9) transparent;
}

.top100-detail-table-shell::-webkit-scrollbar {
    height: 6px;
}

.top100-detail-table-shell::-webkit-scrollbar-track {
    background: transparent;
}

.top100-detail-table-shell::-webkit-scrollbar-thumb {
    border-radius: 999px;
    background: rgba(71, 85, 105, 0.9);
}

.top100-detail-matrix {
    display: inline-grid;
    grid-template-columns: 92px repeat(var(--top100-detail-columns, 1), minmax(68px, 1fr));
    gap: 0.24rem;
    min-width: max-content;
    width: 100%;
    align-items: stretch;
}

.top100-detail-matrix__corner,
.top100-detail-matrix__date,
.top100-detail-matrix__keyword,
.top100-detail-matrix__cell {
    min-height: 28px;
    padding: 0.24rem 0.28rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.top100-detail-matrix__corner {
    background: rgba(2, 6, 23, 0.92);
}

.top100-detail-matrix__date {
    background: rgba(15, 23, 42, 0.58);
    color: rgba(248, 250, 252, 0.96);
    font-size: 0.68rem;
    font-weight: 600;
    white-space: nowrap;
}

.top100-detail-matrix__keyword {
    background: rgba(2, 6, 23, 0.94);
    color: rgba(248, 250, 252, 0.95);
    font-size: 0.68rem;
    font-weight: 600;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.top100-detail-matrix__cell {
    background: rgba(15, 23, 42, 0.58);
}

.top100-detail-badge {
    display: inline;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    background: transparent;
}

.top100-detail-badge--pass {
    color: #4ade80;
}

.top100-detail-badge--fail {
    color: #ef4444;
}

.top100-detail-badge--optimizing {
    color: #cd9b6a;
}

html[data-theme="light"] .top100-detail-badge--optimizing {
    color: #8b5e34;
}

.top100-detail-badge--empty {
    color: rgba(148, 163, 184, 0.9);
}

.top100-detail-empty {
    padding-inline: 0;
    padding-block: 0.65rem 0;
    color: rgba(148, 163, 184, 0.86);
    font-size: 0.74rem;
}

.insight-card-filter-grid {
    display: grid;
    grid-template-columns: minmax(120px, 132px) minmax(120px, 132px) minmax(260px, 320px) auto auto;
    align-items: center;
    justify-content: flex-end;
    justify-items: stretch;
    gap: 0.375rem;
}

.insight-card-filter-grid.insight-card-filter-grid--brand {
    grid-template-columns: minmax(112px, 128px) minmax(112px, 128px) minmax(120px, 156px) 320px auto !important;
}

.insight-filter-field {
    min-width: 0;
}

.insight-filter-field--range {
    width: min(100%, 320px);
    max-width: 320px;
    justify-self: end;
}

.insight-card-filter-grid--brand .insight-filter-field--range {
    grid-column: 4;
    width: 320px;
    min-width: 320px;
}

.insight-card-filter-grid--brand .insight-filter-actions {
    grid-column: 5;
}

.insight-filter-actions {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: max-content;
    align-items: center;
    justify-content: flex-end;
    justify-self: end;
    gap: 0.375rem;
}

.insight-card-filter .custom-select-wrapper {
    display: block;
    width: 100%;
    min-width: 0;
}

.insight-card-filter .custom-select-trigger {
    width: 100%;
    min-height: 36px;
    border: 1px solid rgba(51, 65, 85, 0.92) !important;
    background: rgba(15, 23, 42, 0.92);
    color: rgba(226, 232, 240, 0.96);
    padding: 0.5rem 0.8rem;
    border-radius: 0 !important;
    box-shadow: none;
}

.insight-card-filter .custom-select-trigger:hover,
.insight-card-filter .custom-select-trigger.active {
    border-color: rgba(34, 211, 238, 0.75) !important;
}

.insight-card-filter .custom-select-trigger span {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.insight-card-filter .custom-select-dropdown {
    min-width: 100%;
}

.insight-filter-control {
    width: 100%;
    min-height: 36px;
    border: 1px solid rgba(51, 65, 85, 0.92);
    background: rgba(15, 23, 42, 0.92);
    color: rgba(226, 232, 240, 0.96);
    padding: 0.5rem 0.8rem;
    font-size: 0.875rem;
    border-radius: 0;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.insight-filter-control--range {
    padding-left: 2.4rem;
}

.insight-filter-control--brand {
    min-width: 0;
}

.insight-filter-control:hover {
    border-color: rgba(71, 85, 105, 0.96);
}

.insight-filter-control:focus {
    outline: none;
    border-color: rgba(34, 211, 238, 0.75);
    box-shadow: 0 0 0 1px rgba(34, 211, 238, 0.24);
}

.insight-filter-control option {
    color: rgba(226, 232, 240, 0.96);
    background: rgb(15, 23, 42);
}

.insight-card-submit {
    white-space: nowrap;
    min-height: 36px;
    width: 84px;
    padding: 0 0.9rem;
    font-size: 0.8125rem;
    transition: border-color 0.2s ease, background-color 0.2s ease, color 0.2s ease;
}

.insight-card-submit {
    border: 1px solid rgba(0, 242, 255, 0.28);
    background: rgba(0, 242, 255, 0.08);
    color: rgba(0, 242, 255, 0.96);
}

.insight-card-submit:hover {
    border-color: rgba(0, 242, 255, 0.5);
    background: rgba(0, 242, 255, 0.14);
}

.insight-card-export {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 36px;
    width: 96px;
    min-width: 96px;
    padding: 0 0.9rem;
    font-size: 0.8125rem;
    white-space: nowrap;
    line-height: 1;
}

.insight-card-export.is-exporting {
    gap: 0.42rem;
}

.insight-card-export__spinner {
    width: 0.78rem;
    height: 0.78rem;
    border: 2px solid currentColor;
    border-right-color: transparent;
    border-radius: 999px;
    animation: insight-export-spin 0.78s linear infinite;
    flex: 0 0 auto;
}

@keyframes insight-export-spin {
    to {
        transform: rotate(360deg);
    }
}

.insight-card-submit:disabled,
.insight-card-export:disabled {
    cursor: not-allowed;
    opacity: 0.6;
}

.insight-legend-item {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
}

.insight-legend-dot {
    width: 8px;
    height: 8px;
    border-radius: 999px;
    flex-shrink: 0;
}

.insight-legend-dot--primary {
    background: #f59e0b;
    box-shadow: 0 0 10px rgba(245, 158, 11, 0.32);
}

.insight-legend-dot--secondary {
    background: #10b981;
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.28);
}

.insight-legend-dot--tertiary {
    background: #00f2ff;
    box-shadow: 0 0 10px rgba(0, 242, 255, 0.35);
}

.insight-chart-frame {
    position: relative;
    min-height: var(--insight-chart-height, 280px);
}

.insight-chart-zone {
    --insight-card-padding: clamp(1rem, 1.2vw, 1.5rem);
    --insight-chart-height: clamp(220px, 30vh, 320px);
    --insight-chart-content-left: clamp(12px, 1.2vw, 20px);
    --insight-chart-content-right: clamp(12px, 1.2vw, 20px);
    min-width: 0;
    padding: var(--insight-card-padding);
}

.insight-chart-empty {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    min-width: 220px;
    max-width: 68%;
    padding: 0.85rem 1rem;
    border: 1px dashed rgba(71, 85, 105, 0.72);
    background: rgba(2, 6, 23, 0.78);
    text-align: center;
    pointer-events: none;
}

.insight-chart {
    width: 100%;
    height: var(--insight-chart-height, 280px);
}

.insight-keyword-panel {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    min-width: 0;
    padding-inline: var(--insight-chart-content-left) var(--insight-chart-content-right);
}

.insight-keyword-panel__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.45rem;
    flex-wrap: wrap;
}

.insight-keyword-panel__title {
    margin: 0;
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: rgba(226, 232, 240, 0.92);
}

.insight-keyword-panel__date {
    display: inline-flex;
    align-items: center;
    min-height: 22px;
    padding: 0.08rem 0.4rem;
    font-family: "JetBrains Mono", "SFMono-Regular", Consolas, monospace;
    font-size: 0.68rem;
    color: rgba(148, 163, 184, 0.92);
    background: rgba(15, 23, 42, 0.72);
}

.insight-keyword-matrix-shell {
    overflow-x: auto;
    width: 100%;
    min-width: 0;
    padding-bottom: 0.1rem;
    scrollbar-width: thin;
    scrollbar-color: rgba(71, 85, 105, 0.9) transparent;
}

.insight-keyword-matrix-shell::-webkit-scrollbar {
    height: 6px;
}

.insight-keyword-matrix-shell::-webkit-scrollbar-track {
    background: transparent;
}

.insight-keyword-matrix-shell::-webkit-scrollbar-thumb {
    border-radius: 999px;
    background: rgba(71, 85, 105, 0.9);
}

.insight-keyword-matrix {
    display: inline-grid;
    grid-template-columns: 52px repeat(var(--insight-keyword-columns, 1), max-content);
    gap: 0.24rem;
    min-width: max-content;
    width: max-content;
    align-items: stretch;
}

.insight-keyword-matrix--fill {
    grid-template-columns: 52px repeat(var(--insight-keyword-columns, 1), minmax(max-content, 1fr));
    min-width: 0;
    width: 100%;
}

.insight-keyword-matrix--sparse {
    grid-template-columns: 52px repeat(var(--insight-keyword-columns, 1), minmax(0, 1fr));
    min-width: 0;
    width: 100%;
}

.insight-keyword-matrix__corner,
.insight-keyword-matrix__keyword,
.insight-keyword-matrix__metric,
.insight-keyword-matrix__cell {
    min-height: 28px;
    padding: 0.24rem 0.28rem;
    background: rgba(15, 23, 42, 0.58);
    display: flex;
    align-items: center;
    justify-content: center;
}

.insight-keyword-matrix__corner,
.insight-keyword-matrix__metric {
    position: sticky;
    left: 0;
}

.insight-keyword-matrix__corner {
    z-index: 3;
    background: rgba(2, 6, 23, 0.92);
}

.insight-keyword-matrix__keyword {
    color: rgba(248, 250, 252, 0.96);
    font-size: 0.68rem;
    font-weight: 600;
    line-height: 1.2;
    justify-content: center;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.insight-keyword-matrix__keyword--placeholder,
.insight-keyword-matrix__cell--placeholder {
    color: rgba(100, 116, 139, 0.82);
}

.insight-keyword-matrix__metric {
    z-index: 2;
    justify-content: center;
    text-align: center;
    font-size: 0.66rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: rgba(191, 219, 254, 0.9);
    background: rgba(2, 6, 23, 0.92);
}

.insight-keyword-matrix__metric-label {
    display: block;
    width: 100%;
    white-space: nowrap;
    text-align: center;
    text-align-last: auto;
}

.insight-keyword-matrix__metric[data-metric="1-4"],
.insight-keyword-matrix__cell[data-metric="1-4"] {
    color: #f59e0b;
}

.insight-keyword-matrix__metric[data-metric="4-10"],
.insight-keyword-matrix__cell[data-metric="4-10"] {
    color: #10b981;
}

.insight-keyword-matrix__metric[data-metric="10-20"],
.insight-keyword-matrix__cell[data-metric="10-20"] {
    color: #00f2ff;
}

.insight-keyword-matrix__metric[data-metric-color],
.insight-keyword-matrix__cell[data-metric-color] {
    color: var(--insight-metric-color, rgba(191, 219, 254, 0.9));
}

.insight-keyword-matrix__metric--total,
.insight-keyword-matrix__cell--total {
    color: rgba(248, 250, 252, 0.98);
}

.insight-keyword-matrix__cell--placeholder {
    color: rgba(100, 116, 139, 0.82);
}

.insight-keyword-matrix__cell {
    font-family: "JetBrains Mono", "SFMono-Regular", Consolas, monospace;
    font-size: 0.72rem;
    font-weight: 700;
    text-align: center;
}

.insight-keyword-empty {
    padding: 0.55rem 0.7rem;
    background: rgba(15, 23, 42, 0.42);
    color: rgba(148, 163, 184, 0.86);
    font-size: 0.74rem;
}

.insight-empty-state {
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 240px;
    padding: 1.75rem 1rem 2.25rem;
    background: transparent;
    border: 0;
    box-shadow: none;
}

.insight-empty-state::before {
    content: none;
}

.insight-empty-state::after {
    content: none;
}

.insight-empty-state__inner {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    width: min(100%, 520px);
    min-height: 200px;
    padding: 1rem 1rem 0;
    text-align: center;
}

.insight-empty-state__icon {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    margin-bottom: 0.2rem;
    background: transparent;
    color: rgba(34, 211, 238, 0.96);
    box-shadow: none;
}

.insight-empty-state__ring {
    position: absolute;
    left: 50%;
    top: 50%;
    border: 1px solid rgba(34, 211, 238, 0.08);
    border-radius: 999px;
    transform: translate(-50%, -54%);
    pointer-events: none;
}

.insight-empty-state__ring--outer {
    width: min(60vw, 420px);
    height: min(60vw, 420px);
}

.insight-empty-state__ring--inner {
    width: min(44vw, 280px);
    height: min(44vw, 280px);
    border-color: rgba(34, 211, 238, 0.12);
}

.insight-empty-state__title {
    margin: 0;
    font-size: 1.55rem;
    font-weight: 700;
    line-height: 1.16;
    letter-spacing: 0.02em;
    color: rgba(248, 250, 252, 0.98);
}

.insight-empty-state__subtitle {
    margin: 0;
    font-size: 0.8rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: rgba(95, 130, 175, 0.72);
}

.insight-empty-state__desc {
    margin: 0.45rem 0 0;
    max-width: 28rem;
    font-size: 0.84rem;
    line-height: 1.6;
    color: rgba(148, 163, 184, 0.78);
}

.insight-card-empty {
    background: rgba(15, 23, 42, 0.42);
}

.insight-empty-state,
.insight-chart-zone,
.insight-card-filter,
.insight-card-empty,
.insight-chart-empty,
.insight-filter-control,
.insight-card-filter .custom-select-trigger,
.insight-card-submit,
.insight-card-export {
    border-radius: 0 !important;
}

@media (max-width: 1023px) {
    .insight-card-toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .insight-card-title-group {
        max-width: none;
    }

    .insight-card-filter-grid {
        grid-template-columns: 1fr !important;
        justify-content: stretch;
    }

    .top100-filter-spacer {
        display: none;
    }

    .insight-filter-field,
    .insight-filter-field--range,
    .insight-filter-actions {
        max-width: none;
        min-width: 0;
        justify-self: stretch;
        width: 100%;
    }

    .insight-card-filter-grid--brand .insight-filter-field--range,
    .insight-card-filter-grid--brand .insight-filter-actions {
        grid-column: auto;
    }

    .insight-card-filter-grid--brand .insight-filter-field--range {
        width: 100%;
        max-width: none;
        min-width: 0;
    }

    .insight-filter-actions {
        grid-auto-flow: row;
    }

    .insight-chart-zone {
        --insight-card-padding: clamp(0.95rem, 1.4vw, 1.25rem);
        --insight-chart-height: clamp(210px, 28vh, 280px);
    }

    .insight-keyword-matrix {
        grid-template-columns: 50px repeat(var(--insight-keyword-columns, 1), max-content);
        gap: 0.18rem;
    }

    .insight-keyword-matrix--fill {
        grid-template-columns: 50px repeat(var(--insight-keyword-columns, 1), minmax(max-content, 1fr));
    }

    .insight-keyword-matrix--sparse {
        grid-template-columns: 50px repeat(var(--insight-keyword-columns, 1), minmax(0, 1fr));
    }

    .top100-detail-matrix {
        grid-template-columns: 88px repeat(var(--top100-detail-columns, 1), minmax(68px, 1fr));
        gap: 0.18rem;
    }

    .insight-empty-state__inner {
        width: min(100%, 460px);
        min-height: 190px;
        padding: 0.75rem 0.75rem 0;
    }
}

@media (max-width: 640px) {
    .insight-user-filter {
        gap: 0.35rem;
    }

    .insight-hero {
        padding: 1rem;
    }

    .insight-card {
        padding: 0.9rem;
    }

    .insight-card-filter {
        padding: 0.85rem;
    }

    .insight-filter-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .insight-card-submit,
    .insight-filter-actions .btn-tech {
        width: 100%;
    }

    .insight-chart-zone {
        --insight-card-padding: 0.9rem;
        --insight-chart-height: clamp(190px, 26vh, 240px);
    }

    .insight-keyword-panel__head {
        align-items: flex-start;
    }

    .insight-keyword-matrix {
        grid-template-columns: 48px repeat(var(--insight-keyword-columns, 1), max-content);
        gap: 0.12rem;
    }

    .insight-keyword-matrix--fill {
        grid-template-columns: 48px repeat(var(--insight-keyword-columns, 1), minmax(max-content, 1fr));
    }

    .insight-keyword-matrix--sparse {
        grid-template-columns: 48px repeat(var(--insight-keyword-columns, 1), minmax(0, 1fr));
    }

    .insight-keyword-matrix__corner,
    .insight-keyword-matrix__keyword,
    .insight-keyword-matrix__metric,
    .insight-keyword-matrix__cell {
        min-height: 26px;
        padding: 0.2rem 0.24rem;
    }

    .top100-detail-matrix {
        grid-template-columns: 84px repeat(var(--top100-detail-columns, 1), minmax(62px, 1fr));
        gap: 0.12rem;
    }

    .top100-detail-matrix__corner,
    .top100-detail-matrix__date,
    .top100-detail-matrix__keyword,
    .top100-detail-matrix__cell {
        min-height: 26px;
        padding: 0.2rem 0.24rem;
    }

    .insight-empty-state {
        min-height: 0;
        padding: 1.5rem 0.75rem 2rem;
    }

    .insight-empty-state__inner {
        min-height: 180px;
        padding: 0.5rem 0.5rem 0;
    }

    .insight-empty-state__title {
        font-size: 1.35rem;
    }

    .insight-empty-state__subtitle {
        font-size: 0.72rem;
        letter-spacing: 0.12em;
    }

    .insight-empty-state__desc {
        max-width: 18rem;
        font-size: 0.78rem;
        line-height: 1.55;
    }
}
