﻿
    .kw-search-section {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: var(--shadow-sm);
    }

    /* Custom Checkbox */
    .gr-checkbox {
        display: inline-flex;
        position: relative;
        cursor: pointer;
        font-size: 22px;
        user-select: none;
        align-items: center;
        justify-content: center;
        width: 18px;
        height: 18px;
    }
    .gr-checkbox input {
        position: absolute;
        opacity: 0;
        cursor: pointer;
        height: 0;
        width: 0;
    }
    .gr-checkbox .checkmark {
        position: absolute;
        top: 0;
        left: 0;
        height: 18px;
        width: 18px;
        background-color: var(--bg-body);
        border: 2px solid var(--border-color);
        border-radius: 4px;
        transition: all 0.2s ease;
    }
    .gr-checkbox:hover input ~ .checkmark {
        border-color: var(--primary-color);
    }
    .gr-checkbox input:checked ~ .checkmark {
        background-color: var(--primary-color);
        border-color: var(--primary-color);
    }
    .gr-checkbox .checkmark:after {
        content: "";
        position: absolute;
        display: none;
        left: 5px;
        top: 2px;
        width: 4px;
        height: 8px;
        border: solid white;
        border-width: 0 2px 2px 0;
        transform: rotate(45deg);
    }
    .gr-checkbox input:checked ~ .checkmark:after {
        display: block;
    }

    .kw-search-bar {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
    }

    .kw-search-input-wrapper {
    flex-grow: 1;
    min-width: 300px;
    position: relative;
    display: flex;
    align-items: center;
    }

    .kw-search-input-wrapper i.search-icon {
    position: absolute;
    left: 16px;
    color: var(--text-muted);
    }

    [dir="rtl"] .kw-search-input-wrapper i.search-icon {
    left: auto;
    right: 16px;
    }

    .kw-search-input {
    width: 100%;
    padding: 16px 16px 16px 48px;
    border-radius: 14px;
    border: 2px solid var(--border-color);
    background: var(--bg-body);
    font-size: 16px;
    font-weight: 700;
    color: var(--text-main);
    outline: none;
    transition: all 0.2s;
    }

    [dir="rtl"] .kw-search-input {
    padding: 16px 48px 16px 16px;
    }

    .kw-search-input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px var(--primary-light);
    }

    .btn-discover {
    background: var(--primary-color);
    color: #fff;
    border: none;
    padding: 16px 32px;
    border-radius: 14px;
    font-size: 16px;
    font-weight: 800;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: 0.2s;
    white-space: nowrap;
    }

    .btn-discover:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 10px 20px var(--primary-shadow);
    }

    /* Custom Select */
    .custom-select-wrapper {
    position: relative;
    user-select: none;
    min-width: 140px;
    width: 100%;
    }

    .custom-select-trigger {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    height: 38px;
    padding: 5px 16px;
    border-radius: 10px;
    border: 1px solid var(--border-color);
    background: var(--bg-body);
    color: var(--text-main);
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: 0.2s;
    }

    .kw-search-bar .custom-select-trigger {
    padding: 5px 16px;
    height: 38px;
    border-width: 1px;
    border-radius: 10px;
    }

    .custom-select-trigger:hover {
    border-color: var(--primary-light);
    }

    .custom-select-wrapper.open .custom-select-trigger {
    border-color: var(--primary-color);
    }

    .custom-select-trigger i {
    width: 16px;
    height: 16px;
    color: var(--text-muted);
    transition: transform 0.3s;
    }

    .custom-select-wrapper.open .custom-select-trigger i {
    transform: rotate(180deg);
    }

    .custom-select-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    z-index: 100;
    max-height: 250px;
    overflow-y: auto;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s;
    }

    .custom-select-wrapper.open .custom-select-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    }

    .custom-option {
    padding: 12px 16px;
    font-size: 14px;
    color: var(--text-main);
    cursor: pointer;
    }

    .custom-option:hover {
    background: var(--bg-body);
    }

    .custom-option.selected {
    color: var(--primary-color);
    font-weight: 700;
    background: var(--primary-light);
    }

    .kw-quick-links {
    display: flex;
    gap: 8px;
    margin-top: 16px;
    flex-wrap: wrap;
    }

    .kw-link-tag {
    background: var(--bg-body);
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: 0.2s;
    }

    .kw-link-tag:hover, .kw-link-tag.active {
    background: var(--primary-light);
    color: var(--primary-color);
    border-color: var(--primary-color);
    }

    /* Overview Stats Grid */
    .kw-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
        margin-bottom: 24px;
    }

    .kw-stat-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 20px;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
/*     justify-content: space-between;
 */    overflow: hidden;
    }

    .kw-stat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    }

    .kw-stat-title {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-muted);
    }

    .kw-stat-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    }

    .kw-stat-val {
    font-size: 28px;
    font-weight: 800;
    color: var(--text-main);
    margin-bottom: 4px;
    display: flex;
    align-items: baseline;
    gap: 4px;
    }

    .kw-stat-sub {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 4px;
    }

    /* ApexCharts Tooltip Overrides */
    .apexcharts-tooltip {
    background: var(--card-bg) !important;
    border: 1px solid var(--border-color) !important;
    color: var(--text-main) !important;
    box-shadow: var(--shadow-sm) !important;
    border-radius: 8px !important;
    }

    .apexcharts-tooltip-title {
    background: var(--bg-body) !important;
    border-bottom: 1px solid var(--border-color) !important;
    font-family: inherit !important;
    font-weight: 700 !important;
    padding: 8px 12px !important;
    }

    .apexcharts-text {
    fill: var(--text-main) !important;
    font-family: inherit !important;
    }

    /* Difficulty Badge */
    .kd-badge {
    background: var(--icon-danger-bg);
    color: var(--danger);
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 800;
    }

    /* Layout Split */
    .kw-layout {
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    gap: 24px;
    align-items: start;
    width: 100%;
    max-width: 100%;
    }
    @media (max-width: 992px) {
    .kw-layout {
    grid-template-columns: 1fr;
    }
    }

    /* Filters Panel (RESTORED FULLY) */
    .kw-filters-panel {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 20px;
    position: sticky;
    top: 24px;
    }

    .kw-filter-header {
    font-size: 16px;
    font-weight: 800;
    color: var(--text-main);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-color);
    }

    .kw-filter-group {
    margin-bottom: 20px;
    }

    .kw-filter-label {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 10px;
    display: block;
    }

    .filter-input {
    width: 100%;
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    background: var(--bg-body);
    color: var(--text-main);
    outline: none;
    font-family: inherit;
    font-size: 13px;
    transition: 0.2s;
    }

    .filter-input:focus {
    border-color: var(--primary-color);
    }

    /* Main Tabs Area */
    .kw-main-content {
    display: flex;
    flex-direction: column;
    gap: 24px;
    min-width: 0;
    max-width: 100%;
    width: 100%;
    overflow: hidden;
    }

    .kw-tabs-nav {
    display: flex;
    gap: 8px;
    background: var(--bg-body);
    padding: 6px;
    border-radius: 14px;
    border: 1px solid var(--border-color);
    overflow-x: auto;
    scrollbar-width: none;
    }

    .kw-tabs-nav::-webkit-scrollbar {
    display: none;
    }

    .kw-tab-btn {
    padding: 10px 20px;
    background: transparent;
    border: none;
    border-radius: 10px;
    color: var(--text-muted);
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: 0.2s;
    white-space: nowrap;
    }

    .kw-tab-btn:hover {
    color: var(--text-main);
    }

    .kw-tab-btn.active {
    background: var(--card-bg);
    color: var(--primary-color);
    box-shadow: var(--shadow-sm);
    }

    .kw-tab-pane {
/*     display: none;
 */    animation: tkFadeIn 0.3s ease;
    }

    .kw-tab-pane.active {
    display: block;
    }

    /* Table & Actions Styling */
    .kw-table-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    overflow: hidden;
    position: relative;
    box-shadow: var(--shadow-sm);
    }

    .kw-table-header {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    background: var(--card-bg);
    }

    .kw-table-header-left {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    }

    .kw-table-stats {
    display: flex;
    align-items: center;
    gap: 8px;
    }

    .kw-stat-badge {
    height: 38px;
    padding: 0 14px;
    border-radius: 10px;
    background: var(--bg-body);
    border: 1px solid var(--border-color);
    font-size: 13px;
    font-weight: 700;
    color: var(--text-main);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
    box-sizing: border-box;
    }

    .kw-table-search {
    position: relative;
    display: inline-flex;
    align-items: center;
    height: 38px;
    min-width: 220px;
    box-sizing: border-box;
    }

    .kw-table-search .kw-search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    color: var(--text-muted);
    pointer-events: none;
    display: flex;
    align-items: center;
    justify-content: center;
    }

    [dir="rtl"] .kw-table-search .kw-search-icon {
    left: auto;
    right: 12px;
    }

    .kw-table-search .kw-search-input-field {
    width: 100%;
    height: 38px;
    padding: 0 32px 0 36px;
    border-radius: 10px;
    border: 1px solid var(--border-color);
    background: var(--bg-body);
    font-size: 13px;
    font-weight: 600;
    color: var(--text-main);
    outline: none;
    transition: all 0.2s ease;
    box-sizing: border-box;
    }

    [dir="rtl"] .kw-table-search .kw-search-input-field {
    padding: 0 36px 0 32px;
    }

    .kw-table-search .kw-search-input-field:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px var(--primary-light);
    width: 260px;
    }

    .kw-table-search .kw-search-clear-btn {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: all 0.2s;
    }

    [dir="rtl"] .kw-table-search .kw-search-clear-btn {
    right: auto;
    left: 8px;
    }

    .kw-table-search .kw-search-clear-btn:hover {
    color: var(--danger);
    background: var(--icon-danger-bg);
    }

    .kw-table-header-right {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    }

    .kw-action-select {
    min-width: 130px;
    width: auto;
    position: relative;
    }

    .kw-action-select .custom-select-trigger {
    height: 38px !important;
    padding: 5px 16px !important;
    border-radius: 10px !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    gap: 8px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    border: 1px solid var(--border-color) !important;
    background: var(--bg-body) !important;
    color: var(--text-main) !important;
    box-sizing: border-box !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    }

    .kw-action-select .custom-select-trigger:hover {
    border-color: var(--primary-color) !important;
    color: var(--primary-color) !important;
    background: var(--primary-light) !important;
    }

    .kw-action-select.open .custom-select-trigger {
    border-color: var(--primary-color) !important;
    box-shadow: 0 0 0 3px var(--primary-light) !important;
    }

    .export-dropdown-menu {
    min-width: 170px;
    }

    /* Dedicated Table Footer */
    .kw-table-footer {
    padding: 12px 20px;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    background: var(--card-bg);
    }

    .kw-table-footer-left {
    display: flex;
    align-items: center;
    gap: 16px;
    }

    .kw-footer-entries-info {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
    }

    .kw-rows-per-page-select {
    width: auto;
    min-width: 105px;
    }

    .kw-rows-per-page-select .custom-select-trigger {
    height: 34px !important;
    padding: 4px 12px !important;
    font-size: 12px !important;
    border-radius: 8px !important;
    }

    .kw-table-footer-right {
    display: flex;
    align-items: center;
    gap: 6px;
    }

    .btn-pagination-nav {
    height: 34px;
    min-width: 34px;
    padding: 0 8px;
    border-radius: 8px;
    background: var(--bg-body);
    border: 1px solid var(--border-color);
    color: var(--text-main);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    }

    .btn-pagination-nav:hover:not(:disabled) {
    border-color: var(--primary-color);
    color: var(--primary-color);
    background: var(--primary-light);
    }

    .btn-pagination-nav:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    }

    .kw-pagination-badge {
    padding: 0 12px;
    font-size: 13px;
    font-weight: 700;
    color: var(--text-main);
    }

    /* Sticky Floating Bulk Actions Bar */
    .kw-bulk-actions-bar {
    position: sticky;
    bottom: 16px;
    margin: 16px auto 0;
    max-width: 600px;
    background: var(--card-bg);
    border: 1px solid var(--primary-color);
    box-shadow: var(--shadow-lg), 0 8px 24px rgba(0, 0, 0, 0.12);
    border-radius: 30px;
    padding: 8px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    z-index: 50;
    animation: slideUpBulk 0.3s ease;
    backdrop-filter: blur(8px);
    }

    @keyframes slideUpBulk {
    from { transform: translateY(20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
    }

    .kw-bulk-count-badge {
    font-size: 13px;
    font-weight: 800;
    color: var(--primary-color);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    }

    .kw-bulk-actions-btns {
    display: flex;
    align-items: center;
    gap: 8px;
    }

    .btn-bulk-action {
    height: 32px;
    padding: 0 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    border: 1px solid var(--border-color);
    background: var(--bg-body);
    color: var(--text-main);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
    }

    .btn-bulk-action:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    background: var(--primary-light);
    }

    .btn-bulk-clear {
    color: var(--danger);
    }

    .btn-bulk-clear:hover {
    border-color: var(--danger);
    background: var(--icon-danger-bg);
    color: var(--danger);
    }

    /* Premium Analysis Loading Card */
    .kw-loading-timeline-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    padding: 44px 32px;
    margin: 32px 0;
    box-shadow: 0 12px 36px -8px rgba(0, 0, 0, 0.08);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 28px;
    position: relative;
    overflow: hidden;
    animation: tkFadeIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    }

    .kw-loader-halo {
    position: absolute;
    width: 320px;
    height: 320px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: radial-gradient(circle, var(--primary-light) 0%, transparent 70%);
    opacity: 0.6;
    pointer-events: none;
    z-index: 0;
    animation: haloPulse 3s ease-in-out infinite;
    }

    @keyframes haloPulse {
    0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 0.5; }
    50% { transform: translate(-50%, -50%) scale(1.15); opacity: 0.85; }
    }

    .kw-loader-radar-wrapper {
    position: relative;
    width: 76px;
    height: 76px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
    }

    .kw-radar-ring {
    position: absolute;
    border-radius: 50%;
    border: 2px solid transparent;
    }

    .kw-radar-ring.ring-1 {
    width: 100%;
    height: 100%;
    border-top-color: var(--primary-color);
    border-right-color: var(--blue);
    animation: spin 1.2s linear infinite;
    }

    .kw-radar-ring.ring-2 {
    width: 76%;
    height: 76%;
    border-bottom-color: var(--primary-color);
    border-left-color: var(--purple, #8b5cf6);
    animation: spinReverse 1.8s linear infinite;
    }

    .kw-radar-ring.ring-3 {
    width: 52%;
    height: 52%;
    border: 2px dashed var(--border-color);
    }

    .kw-radar-center-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--bg-body);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    box-shadow: 0 0 16px var(--primary-light);
    z-index: 2;
    }

    .kw-radar-center-icon .radar-core-icon {
    width: 18px;
    height: 18px;
    animation: floatIcon 2s ease-in-out infinite;
    }

    @keyframes spinReverse {
    to { transform: rotate(-360deg); }
    }

    @keyframes floatIcon {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.15); }
    }

    .kw-loader-info-header {
    text-align: center;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    }

    .kw-loader-title {
    font-size: 16px;
    font-weight: 800;
    color: var(--text-main);
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin: 0;
    }

    .kw-loader-dots span {
    animation: blinkDots 1.4s infinite;
    display: inline-block;
    }
    .kw-loader-dots span:nth-child(2) { animation-delay: 0.2s; }
    .kw-loader-dots span:nth-child(3) { animation-delay: 0.4s; }

    @keyframes blinkDots {
    0%, 20% { opacity: 0; transform: translateY(0); }
    50% { opacity: 1; transform: translateY(-2px); }
    100% { opacity: 0; transform: translateY(0); }
    }

    .kw-loader-subtitle {
    font-size: 13px;
    color: var(--text-muted);
    background: var(--bg-body);
    border: 1px solid var(--border-color);
    padding: 4px 14px;
    border-radius: 20px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    max-width: 450px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    margin: 0;
    }

    .kw-loader-target-url {
    font-weight: 600;
    color: var(--primary-color);
    }

    /* Steps Progress Timeline */
    .kw-loading-steps-track {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    max-width: 680px;
    margin-top: 8px;
    z-index: 1;
    }

    .kw-loading-steps-track::before {
    content: '';
    position: absolute;
    top: 15px;
    left: 20px;
    right: 20px;
    height: 2px;
    background: var(--border-color);
    z-index: 0;
    }

    .kw-steps-progress-line {
    position: absolute;
    top: 15px;
    left: 20px;
    height: 2px;
    background: linear-gradient(90deg, var(--primary-color), var(--blue));
    z-index: 1;
    transition: width 0.4s ease;
    }

    .kw-step-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    position: relative;
    z-index: 2;
    }

    .kw-step-circle {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--bg-body);
    border: 2px solid var(--border-color);
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    font-size: 12px;
    }

    .kw-step-label {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-muted);
    transition: all 0.3s ease;
    white-space: nowrap;
    }

    .kw-step-item.active .kw-step-circle {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: #fff;
    box-shadow: 0 0 12px var(--primary-light);
    }

    .kw-step-item.active .kw-step-label {
    color: var(--text-main);
    }

    .kw-step-item.current .kw-step-circle {
    background: var(--bg-body);
    border-color: var(--primary-color);
    color: var(--primary-color);
    animation: pulseRing 1.5s infinite;
    }

    .kw-step-item.current .kw-step-label {
    color: var(--primary-color);
    font-weight: 800;
    }

    @keyframes pulseRing {
    0%, 100% { box-shadow: 0 0 0 0 var(--primary-light); }
    50% { box-shadow: 0 0 0 6px var(--primary-light); }
    }

    /* Bulk Action Buttons */
    .btn-outline {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-main);
    padding: 8px 16px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: 0.2s;
    font-family: inherit;
    }

    .btn-outline:hover {
    background: var(--bg-body);
    border-color: var(--primary-color);
    color: var(--primary-color);
    }

    /* Table Columns & Sticky Header */
    .kw-table-wrap {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow-x: auto;
    position: relative;
    max-height: 680px;
    -webkit-overflow-scrolling: touch;
    box-sizing: border-box;
    }

    .kw-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 700px;
    text-align: left;
    }

    [dir="rtl"] .kw-table {
    text-align: right;
    }

    .kw-table-sticky-header th {
    position: sticky;
    top: 0;
    z-index: 15;
    background: var(--bg-body);
    padding: 8px 12px;
    height: 38px;
    box-sizing: border-box;
    font-size: 12px;
    font-weight: 700;
    color: var(--text-muted);
    border-bottom: 2px solid var(--border-color);
    white-space: nowrap;
    user-select: none;
    vertical-align: middle;
    line-height: 1;
    }

    .th-content {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
    }

    .th-content.th-center {
    justify-content: center;
    width: 100%;
    }

    .sort-icon {
    display: inline-flex;
    align-items: center;
    opacity: 0.6;
    transition: all 0.2s ease;
    }

    .sort-icon svg,
    .sort-icon i {
    width: 12px !important;
    height: 12px !important;
    }

    .kw-table-sticky-header th.kw-table-col-sortable {
    cursor: pointer;
    transition: all 0.2s ease;
    }

    .kw-table-sticky-header th.kw-table-col-sortable:hover {
    color: var(--primary-color);
    background: var(--primary-light);
    }

    .kw-table-sticky-header th.kw-table-col-sortable:hover .sort-icon {
    opacity: 1;
    color: var(--primary-color);
    }

    .kw-table-sticky-header th.kw-table-col-center,
    .kw-table td.kw-table-col-center {
    text-align: center;
    }

    .kw-table td {
    padding: 10px 12px;
    font-size: 13px;
    color: var(--text-main);
    border-bottom: 1px solid var(--border-color);
    font-weight: 600;
    vertical-align: middle;
    white-space: nowrap;
    }

    .kw-table tr:hover td {
    background: var(--bg-body);
    }

    /* Single Keyword Copy Button */
    .td-keyword-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    max-width: 280px;
    min-width: 0;
    }

    .td-keyword {
    color: var(--blue);
    cursor: pointer;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1;
    min-width: 0;
    }

    .td-keyword:hover {
    text-decoration: underline;
    }

    .kw-action-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    width: 26px;
    height: 26px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: 0.2s;
    opacity: 0;
    flex-shrink: 0;
    }

    .kw-table tr:hover .kw-action-btn, .idea-row:hover .kw-action-btn {
    opacity: 1;
    }

    .kw-action-btn:hover, .header-action-btn:hover {
    background: var(--primary-light);
    color: var(--primary-color);
    }
    
    .header-action-btn {
    background: var(--bg-body);
    border: 1px solid var(--border-color);
    color: var(--text-main);
    width: 30px;
    height: 30px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: 0.2s;
    opacity: 1;
    flex-shrink: 0;
    }

    .spark-chart-container {
    width: 90px;
    height: 32px;
    }

    /* Responsive Ideas Grid (2 by default, 3 on large, 4 on ultra-wide, 1 on mobile) */
    .ideas-grid, .ideas-grid-responsive {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
    }
    
    @media (min-width: 1600px) {
        .ideas-grid, .ideas-grid-responsive {
            grid-template-columns: repeat(3, minmax(0, 1fr));
        }
    }

    @media (min-width: 2000px) {
        .ideas-grid, .ideas-grid-responsive {
            grid-template-columns: repeat(4, minmax(0, 1fr));
        }
    }
    
    @media (max-width: 820px) {
        .ideas-grid, .ideas-grid-responsive {
            grid-template-columns: 1fr;
        }
    }

    .idea-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 18px 20px;
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    }

    .idea-card h3 {
    font-size: 14px;
    font-weight: 800;
    color: var(--text-main);
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 1px dashed var(--border-color);
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    }

    .idea-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
    border-bottom: 1px solid var(--bg-body);
    font-size: 13px;
    min-width: 0;
    gap: 8px;
    }

    .idea-row:last-child {
    border-bottom: none;
    }

    .idea-kw {
    color: var(--text-main);
    font-weight: 600;
    flex-grow: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
    }

    .idea-val {
    color: var(--primary-color);
    font-weight: 800;
    font-family: monospace;
    flex-shrink: 0;
    font-size: 12px;
    }

    /* Tags Cloud */
    .kw-tags-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 20px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    }

    .mapping-tag {
    background: var(--bg-body);
    border: 1px solid var(--border-color);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-main);
    cursor: pointer;
    transition: 0.2s;
    display: flex;
    align-items: center;
    gap: 6px;
    }

    .mapping-tag i {
    width: 12px;
    height: 12px;
    opacity: 0;
    transition: 0.2s;
    margin-inline-start: -12px;
    }

    .mapping-tag:hover {
    background: var(--primary-light);
    color: var(--primary-color);
    border-color: var(--primary-color);
    transform: scale(1.05);
    padding-inline-start: 12px;
    }

    .mapping-tag:hover i {
    opacity: 1;
    margin-inline-start: 0;
    }

    /* List Tree (Keyword Mapping) */
    .list-tree-container {
        padding: 20px;
        background: var(--card-bg);
        border: 1px solid var(--border-color);
        border-radius: 16px;
        overflow-x: auto;
    }
    .list-tree {
        display: flex;
        flex-direction: column;
    }
    .list-tree-node {
        position: relative;
        margin-left: 20px;
        padding-left: 15px;
        border-left: 1px dashed var(--border-color);
        margin-top: 8px;
    }
    .list-tree-node.is-leaf {
        border-left: none;
    }
    .list-tree-node::before {
        content: '';
        position: absolute;
        top: 15px;
        left: 0;
        width: 15px;
        height: 1px;
        border-top: 1px dashed var(--border-color);
    }
    .list-tree-node.is-leaf::before {
        border-top: none;
    }
    .list-tree-node-label {
        display: inline-block;
        margin-bottom: 5px;
    }
    .list-tree-node-label-inner {
        display: flex;
        align-items: center;
        gap: 8px;
        background: var(--bg-body);
        padding: 6px 12px;
        border-radius: 6px;
        border: 1px solid var(--border-color);
        cursor: pointer;
        transition: 0.2s;
    }
    .list-tree-node-label-inner:hover {
        border-color: var(--primary-color);
        background: var(--primary-light);
    }
    .name-item-tree {
        font-weight: 600;
        color: var(--text-main);
        font-size: 14px;
    }
    .list-tree-node-btn {
        font-size: 12px;
        background: var(--primary-color);
        color: white;
        border-radius: 4px;
        width: 18px;
        height: 18px;
        display: flex;
        align-items: center;
        justify-content: center;
        font-weight: bold;
    }

    /* Dropdown CSS */
    .dropdown { position: relative; display: inline-block; }
    .dropdown-menu {
        display: none; position: absolute; top: 100%; right: 0; background-color: var(--card-bg);
        min-width: 160px; box-shadow: var(--shadow-md); border: 1px solid var(--border-color);
        border-radius: 8px; z-index: 1000; padding: 8px 0; margin-top: 4px;
    }
    .dropdown:hover .dropdown-menu { display: flex; flex-direction: column; }
    .dropdown-item {
        color: var(--text-main); padding: 8px 16px; text-decoration: none;
        display: flex; align-items: center; gap: 8px; font-size: 14px; transition: background 0.2s;
    }
    .dropdown-item i, .dropdown-item svg { width: 16px; height: 16px; }
    .dropdown-item:hover { background-color: var(--bg-body); color: var(--primary-color); }

    /* Panels & Charts CSS */
    .grid-2col {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 24px;
        margin-bottom: 24px;
    }
    @media (max-width: 1400px) {
        .grid-2col { grid-template-columns: repeat(2, 1fr); }
    }
    @media (max-width: 992px) {
        .grid-2col { grid-template-columns: 1fr; }
    }
    .panel-card {
        background: var(--card-bg);
        border: 1px solid var(--border-color);
        border-radius: 16px;
        padding: 24px;
        margin-bottom: 24px;
        box-shadow: var(--shadow-sm);
    }
    .card-heading {
        font-size: 18px;
        font-weight: 800;
        display: flex;
        align-items: center;
        gap: 8px;
    }
    .export-btn {
        background: transparent;
        border: 1px solid var(--border-color);
        color: var(--text-main);
        padding: 6px 12px;
        border-radius: 8px;
        font-size: 13px;
        font-weight: 700;
        cursor: pointer;
        display: flex;
        align-items: center;
        gap: 6px;
        transition: 0.2s;
    }
    .export-btn:hover {
        background: var(--bg-body);
        border-color: var(--primary-light);
    }
    .chart-canvas, .mindmap-canvas {
        width: 100%;
        min-height: 350px;
        border-radius: 12px;
        overflow: hidden;
    }
    /* Custom Utilities & Clean CSS */
    .gr-flex-between { display: flex; justify-content: space-between; align-items: center; }
    .gr-flex-end { display: flex; justify-content: flex-end; align-items: center; }
    .gr-flex-center { display: flex; justify-content: center; align-items: center; }
    .gr-flex-row { display: flex; align-items: center; gap: 8px; }
    .gr-flex-row-wrap { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
    .gr-gap-16 { gap: 16px; }
    .gr-gap-4 { gap: 4px; }
    .gr-gap-6 { gap: 6px; }
    .gr-mb-16 { margin-bottom: 16px; }
    .gr-mb-8 { margin-bottom: 8px; }
    .gr-mb-10 { margin-bottom: 10px; }
    .gr-mb-0 { margin-bottom: 0 !important; }
    .gr-mt-8 { margin-top: 8px; }
    .gr-pb-0 { padding-bottom: 0 !important; }
    .gr-pb-12 { padding-bottom: 12px; }
    .gr-w-50 { width: 50%; }

    .gr-text-main { color: var(--text-main); }
    .gr-text-muted { color: var(--text-muted); }
    .gr-text-danger { color: var(--danger); }
    .gr-text-purple { color: var(--purple); }
    .gr-font-mono { font-family: monospace; }
    .gr-font-bold { font-weight: 700; }
    .gr-font-extrabold { font-weight: 800; }
    .gr-text-sm { font-size: 13px; }

    .gr-icon-sm { width: 14px; height: 14px; display: inline-block; vertical-align: middle; }
    .gr-icon-sm-margin { margin-inline-end: 6px; }
    .gr-icon-md { width: 16px; height: 16px; }
    .gr-icon-xs { width: 12px; height: 12px; }

    .gr-chart-container {
        margin: -2px -20px
    }
    .gr-chart-box { height: 350px; }
    .gr-chart-box-lg { height: 400px; }
    
    .gr-tag-count { color: var(--text-muted); font-size: 11px; background: var(--bg-body); padding: 2px 6px; border-radius: 4px; }
    .gr-tag-percent { color: var(--primary-color); font-size: 11px; background: var(--primary-light); padding: 2px 6px; border-radius: 4px; }
    .gr-badge-dynamic { padding: 4px 8px; border-radius: 6px; font-size: 11px; font-weight: 800; }
    
    .gr-badge-danger { background: var(--danger); color: #fff; font-size: 11px; padding: 4px 8px; border-radius: 4px; display: flex; align-items: center; gap: 4px; }
    .gr-badge-danger i { width: 12px; height: 12px; cursor: pointer; }

    .kw-table-stats { font-size: 13px; font-weight: 700; color: var(--text-muted); display: flex; gap: 16px; align-items: center; white-space: nowrap; }
    .kw-table-actions { display: flex; gap: 8px; align-items: center; flex-wrap: nowrap; justify-content: flex-end; }
    .kw-action-select .custom-select-trigger { padding: 10px 16px; font-size: 13px; height: 100%; border-radius: 12px; }
    .kw-table-empty { padding: 60px 20px; text-align: center; color: var(--text-muted); display: flex; flex-direction: column; align-items: center; gap: 16px; }
    .kw-empty-icon-wrap { background: var(--bg-body); padding: 20px; border-radius: 50%; }
    .kw-empty-icon { width: 48px; height: 48px; opacity: 0.5; color: var(--text-muted); }
    .kw-empty-title { font-weight: 700; color: var(--text-main); margin: 0; }
    .kw-empty-desc { font-weight: 600; font-size: 14px; margin: 0; max-width: 300px; }
    
    .kw-table-wrap { overflow-x: auto; max-height: 600px; }
    .kw-table-sticky-header { position: sticky; top: 0; z-index: 10; background: var(--bg-body); }
    .kw-table-col-center { width: 40px; text-align: center; }
    .kw-table-col-sortable { cursor: pointer; }
    .kw-table-col-sortable i { width: 12px; height: 12px; opacity: 0.5; }
    .kw-pagination-text { padding: 6px 12px; cursor: default; }

    /* =========================================
       KEYWORD MAPPING (V5 ORG TREE CSS)
       ========================================= */
    .org-tree-container { display: inline-block; padding: 15px; }
    .org-tree { display: table; text-align: center; list-style: none; padding: 0; margin: 0; }
    .org-tree:after, .org-tree:before { content: ""; display: table; }
    .org-tree:after { clear: both; }
    .org-tree-node, .org-tree-node-children { position: relative; margin: 0; padding: 0; list-style-type: none; }
    .org-tree-node-children:after, .org-tree-node-children:before, .org-tree-node:after, .org-tree-node:before { transition: all 0.35s; }
    .org-tree-node-label { position: relative; display: inline-block; }
    .org-tree-node-label .org-tree-node-label-inner { padding: 10px 15px; text-align: center; }
    
    .item-tree-vo { box-shadow: 0 1px 5px rgba(0, 0, 0, 0.15); background: var(--bg-body); text-wrap: nowrap; border-radius: 12px; }
    
    .org-tree-node-btn {
      position: absolute; top: 100%; left: 50%; width: 20px; height: 20px; z-index: 10; margin-left: -9px; margin-top: 9px;
      background-color: var(--card-bg); border: 1px solid var(--text-muted); border-radius: 50%; box-shadow: 0 0 2px rgba(0, 0, 0, 0.15);
      cursor: pointer; transition: all 0.35s ease; color: var(--text-muted);
    }
    .org-tree-node-btn:hover { background-color: var(--danger); transform: scale(1.15); border: 1px solid var(--card-bg); }
    .org-tree-node-btn:after, .org-tree-node-btn:before { content: ""; position: absolute; }
    .org-tree-node-btn:before { top: 50%; left: 4px; right: 4px; height: 0; border-top: 1px solid var(--text-muted); }
    .org-tree-node-btn:after { top: 4px; left: 50%; bottom: 4px; width: 0; border-left: 1px solid var(--text-muted); }
    .org-tree-node-btn:hover::before { top: calc(50% - 1px); border-top: 3px solid var(--card-bg); }
    .org-tree-node-btn.expanded:after { border: none; }
    
    .org-tree-node { padding-top: 20px; display: table-cell; vertical-align: top; }
    .org-tree-node.collapsed, .org-tree-node.is-leaf { padding-left: 10px; padding-right: 10px; }
    .org-tree-node:after, .org-tree-node:before { content: ""; position: absolute; top: 0; left: 0; width: 50%; height: 19px; }
    .org-tree-node:after { left: 50%; border-left: 1px solid var(--border-color); }
    .org-tree-node:not(:first-child):before, .org-tree-node:not(:last-child):after { border-top: 1px solid var(--border-color); }
    
    .collapsable .org-tree-node.collapsed { padding-bottom: 30px; }
    .collapsable .org-tree-node.collapsed .org-tree-node-label:after { content: ""; position: absolute; top: 100%; left: 0; width: 50%; height: 20px; border-right: 1px solid var(--border-color); }
    .org-tree > .org-tree-node { padding-top: 0; }
    .org-tree > .org-tree-node:after { border-left: 0; }
    
    .org-tree-node-children { display: table; list-style: none; padding: 0; padding-top: 20px; margin: auto; }
    .org-tree-node-children:before { content: ""; position: absolute; top: 0; left: 50%; width: 0; height: 20px; border-left: 1px solid var(--border-color); }
    .org-tree-node-children:after { content: ""; display: table; clear: both; }
    
    .horizontal .org-tree-node { display: table-cell; float: none; padding-top: 0; padding-left: 20px; padding-top: 10px; padding-bottom: 10px; }
    .horizontal .org-tree-node.collapsed, .horizontal .org-tree-node.is-leaf { padding-top: 10px; padding-bottom: 10px; }
    .horizontal .org-tree-node:after, .horizontal .org-tree-node:before { width: 19px; height: 50%; }
    .horizontal .org-tree-node:after { top: 50%; left: 0; border-left: 0; }
    .horizontal .org-tree-node:only-child:before { top: 1px; border-bottom: 1px solid var(--border-color); }
    .horizontal .org-tree-node:not(:first-child):before, .horizontal .org-tree-node:not(:last-child):after { border-top: 0; border-left: 1px solid var(--border-color); }
    .horizontal .org-tree-node:not(:only-child):after { border-top: 1px solid var(--border-color); }
    
    .horizontal .org-tree-node .org-tree-node-inner { display: table; }
    .horizontal .org-tree-node-label { display: table-cell; vertical-align: middle; }
    .horizontal.collapsable .org-tree-node.collapsed { padding-right: 30px; }
    .horizontal.collapsable .org-tree-node.collapsed .org-tree-node-label:after { top: 0; left: 100%; width: 20px; height: 50%; border-right: 0; border-bottom: 1px solid var(--border-color); }
    
    .horizontal .org-tree-node-btn { top: 50%; left: 100%; margin-top: -11px; margin-left: 9px; }
    .horizontal > .org-tree-node:only-child:before { border-bottom: 0; }
    .horizontal .org-tree-node-children { display: table-cell; padding-top: 0; padding-left: 20px; }
    .horizontal .org-tree-node-children:before { top: 50%; left: 0; width: 20px; height: 0; border-left: 0; border-top: 1px solid var(--border-color); }
    .horizontal .org-tree-node-children:after { display: none; }
    .horizontal .org-tree-node-children > .org-tree-node { display: block; }
    
    .list-tree-container { margin-top: 30px; margin-bottom: 30px; overflow-x: auto; padding-bottom: 20px; }
    
    .ul-tree { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: nowrap; background: var(--card-bg); border-radius: 7px; color: var(--text-muted); padding: 5px; margin-top: 10px; }
    .item-tree { display: flex; margin-right: 5px; margin-left: 5px; background: var(--bg-body); border-radius: 25px; color: var(--text-main); padding-left: 10px; padding-right: 10px; line-height: 29px; }
    .name-item-tree { display: inline-block; vertical-align: middle; margin-left: 5px; cursor: text; }
    
    .list-tree-node { padding-left: 20px; padding-top: 10px; margin-top: -5px; }
    .list-tree-node-label-inner { display: flex; line-height: 35px; position: relative; padding-left: 5px; }
    
    .list-tree-node-btn {
      width: 20px; height: 20px; background: var(--card-bg); margin-left: 5px; text-align: center; border-radius: 50%;
      color: var(--text-muted); cursor: pointer; font-size: 18px; margin: auto; display: inline-block; vertical-align: middle;
      border: 1px solid var(--text-muted);
    }
    
    .list-tree-node-label { padding-top: 7px; padding-left: 18px; }
    .list-tree-node-label-inner::before { content: " "; border-bottom: 2px solid var(--border-color); width: 21px; position: absolute; left: -18px; top: 20px; }
    .list-tree-node-children { margin-left: 0px; }
    .list-tree-node-label-inner::after { content: " "; border-left: 2px solid var(--border-color); width: 21px; position: absolute; left: -19px; top: -28px; height: 100%; }

    /* Unified Search Container CSS */
    .unified-search-container { position: relative; z-index: 50; width: 100%; max-width: 1000px; margin: 0 auto; transition: all 0.3s ease; }
    .unified-search-container.is-focused { z-index: 100; }
    .unified-search-bar { display: flex; align-items: center; background: var(--card-bg); border: 1px solid var(--border-color); border-radius: 40px; padding: 6px 6px 6px 7px; box-shadow: 0 10px 30px rgba(0,0,0,0.05); transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275); position: relative; z-index: 2; }
    .unified-search-container.is-focused .unified-search-bar { border-color: var(--primary-color); box-shadow: 0 15px 40px var(--primary-shadow); transform: translateY(-2px); }
    .search-divider { width: 1px; height: 24px; background: var(--border-color); margin: 0 8px; flex-shrink: 0; }
    .search-segment { display: flex; align-items: center; height: 100%; }
    .dropdown-segment { position: relative; cursor: pointer; padding: 8px; border-radius: 20px; transition: background 0.2s; min-width: 70px; justify-content: center; }
    .dropdown-segment:hover { background: var(--bg-body); }
    .segment-content { display: flex; align-items: center; gap: 6px; }
    .segment-text { font-size: 14px; font-weight: 700; color: var(--text-main); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 150px; }
    .chevron-icon { width: 14px; height: 14px; color: var(--text-muted); }
    .input-segment { flex: 1; position: relative; }
    .input-search-icon { width: 20px; height: 20px; color: var(--primary-color); margin-right: 12px; }
    .main-keyword-input { width: 100%; background: transparent; border: none; font-size: 16px; font-weight: 500; color: var(--text-main); outline: none; padding: 10px 0; }
    .main-keyword-input::placeholder { color: var(--text-muted); opacity: 0.7; }
    .round-search-btn { width: 48px; height: 48px; border-radius: 50%; background: linear-gradient(135deg, var(--primary-color), var(--primary-hover)); color: white; border: none; display: flex; align-items: center; justify-content: center; cursor: pointer; transition: all 0.3s; box-shadow: 0 4px 12px var(--primary-shadow); flex-shrink: 0; margin-left: 4px; }
    .round-search-btn i { width: 20px; height: 20px; transition: transform 0.3s; }
    .round-search-btn:hover { transform: scale(1.05); box-shadow: 0 8px 20px var(--primary-shadow); }
    .round-search-btn:hover i { transform: translateX(2px); }
    .results-overlay-panel { position: absolute; top: calc(100% + 12px); left: 0; right: 0; background: var(--card-bg); backdrop-filter: blur(25px); border: 1px solid var(--border-color); border-radius: 24px; box-shadow: 0 20px 50px rgba(0,0,0,0.1); padding: 20px; z-index: 1; max-height: 500px; display: flex; flex-direction: column; }
    .results-header-inline { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; padding-bottom: 16px; }
    .close-overlay-btn { background: var(--bg-body); border: none; width: 32px; height: 32px; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: var(--text-muted); cursor: pointer; transition: all 0.2s; }
    .close-overlay-btn:hover { background: var(--icon-danger-bg); color: var(--danger); }
    .results-content-inline { overflow-y: auto; flex: 1; padding: 0; }
    .split-search-overlay { display: flex; gap: 0; min-height: 250px; }
    .pane-suggestions { width: 40%; border-right: 1px solid var(--border-color); padding: 16px; display: flex; flex-direction: column; }
    .pane-history { width: 60%; padding: 16px; display: flex; flex-direction: column; }
    .pane-title { font-size: 13px; font-weight: 800; color: var(--text-muted); text-transform: uppercase; margin-bottom: 12px; display: flex; align-items: center; gap: 8px; letter-spacing: 0.5px; }
    .empty-pane { padding: 20px 0; text-align: center; color: var(--text-muted); font-size: 14px; font-weight: 500; }
    .clean-sugg-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 4px; }
    .clean-sugg-item { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; cursor: pointer; transition: all 0.2s; color: var(--text-main); font-size: 14px; font-weight: 500; }
    .clean-sugg-item i { width: 16px; height: 16px; color: var(--text-muted); }
    .clean-sugg-item:hover, .clean-sugg-item.keyboard-selected { background: var(--bg-body); }
    .clean-sugg-item.keyboard-selected { color: var(--primary-color); }
    .rich-hist-list { display: flex; flex-direction: column; gap: 10px; padding-right: 4px; }
    .rich-hist-item { display: flex; align-items: center; gap: 16px; padding: 10px 16px; border-radius: 14px; background: linear-gradient(145deg, var(--bg-body), transparent); border: 1px solid var(--border-color); cursor: pointer; transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1); position: relative; overflow: hidden; }
    .rich-hist-item::before { content: ''; position: absolute; top: 0; left: 0; width: 4px; height: 100%; background: transparent; transition: all 0.3s ease; }
    .rich-hist-item:hover, .rich-hist-item.keyboard-selected { background: var(--card-bg); border-color: var(--primary-color); box-shadow: 0 8px 24px var(--primary-shadow); transform: translateY(-2px); }
    .rich-hist-item:hover::before, .rich-hist-item.keyboard-selected::before { background: var(--primary-color); }
    .hist-avatar { width: 44px; height: 44px; border-radius: 12px; background: var(--bg-body); display: flex; align-items: center; justify-content: center; box-shadow: inset 0 2px 4px rgba(0,0,0,0.05); flex-shrink: 0; border: 1px solid var(--border-color); }
    .hist-content { flex: 1; display: flex; flex-direction: row; align-items: center; justify-content: space-between; gap: 12px; min-width: 0; }
    .res-keyword { flex: 1; font-size: 15px; font-weight: 800; color: var(--text-main); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transition: color 0.2s; }
    .hist-tags { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
    .h-tag { display: inline-flex; align-items: center; gap: 6px; padding: 4px 8px; border-radius: 8px; font-size: 11px; font-weight: 700; background: var(--card-bg); color: var(--text-muted); border: 1px solid var(--border-color); }
    .h-tag i { width: 12px; height: 12px; }
    .segment-dropdown { position: absolute; top: calc(100% + 16px); left: -10px; min-width: 280px; }
    .glass-menu { background: var(--card-bg); backdrop-filter: blur(20px); border: 1px solid var(--border-color); border-radius: 16px; box-shadow: 0 12px 40px rgba(0,0,0,0.1); z-index: 100; padding: 12px; }
    .dropdown-search-box { position: relative; margin-bottom: 12px; }
    .dropdown-search-box i, .dropdown-search-box svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: var(--text-muted); }
    .dropdown-search-box input { width: 100%; background: var(--bg-body); border: 1px solid var(--border-color); padding: 10px 10px 10px 36px; border-radius: 10px; font-size: 13px; color: var(--text-main); outline: none; }
    .dropdown-list { list-style: none; max-height: 240px; overflow-y: auto; padding: 0; margin: 0; }
    .dropdown-item { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 10px; cursor: pointer; margin-bottom: 2px; transition: background 0.15s ease; }
    .dropdown-item:hover { background: var(--bg-body); }
    .dropdown-item.selected { background: var(--primary-light); }
    .dropdown-item .item-text { font-size: 13.5px; font-weight: 500; color: var(--text-main); flex: 1; }
    .dropdown-item.selected .item-text { font-weight: 700; color: var(--primary-color); }
    .check-icon { width: 15px; height: 15px; color: var(--primary-color); flex-shrink: 0; }

    .dropdown-group-lbl {
        font-size: 10px;
        font-weight: 800;
        text-transform: uppercase;
        letter-spacing: 0.6px;
        color: var(--text-muted);
        padding: 8px 12px 4px;
        pointer-events: none;
        user-select: none;
    }
    .item-code {
        margin-inline-start: auto;
        font-size: 10px;
        font-weight: 800;
        padding: 2px 6px;
        border-radius: 4px;
        background: var(--bg-body);
        color: var(--text-muted);
        border: 1px solid var(--border-color);
        font-family: monospace;
    }
    .dropdown-item.selected .item-code {
        background: var(--primary-light);
        color: var(--primary-color);
        border-color: var(--primary-color);
    }
    .dropdown-empty-msg {
        padding: 14px;
        text-align: center;
        color: var(--text-muted);
        font-size: 12.5px;
        font-weight: 500;
    }

    .pane-history.full-width {
        width: 100%;
        border-left: none;
    }
    /* Page Container & Creation-Style Hero */
    .kw-research-container {
        padding: 20px 0 20px 0;
        animation: fadeIn 0.4s ease-out;
        transition: all 0.5s cubic-bezier(0.25, 0.8, 0.25, 1);
    }
    .kw-research-container.has-data {
        padding-top: 10px;
    }

    .premium-console-wrapper {
        position: relative;
        width: 100%;
        max-width: 1200px;
        margin: 0 auto;
        padding: 30px 20px 10px;
        display: flex;
        flex-direction: column;
        align-items: center;
        transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    }

    .premium-console-wrapper.console-compact {
        padding: 6px 20px 0;
    }

    .hero-ambient-glow {
        position: absolute;
        top: -40px;
        left: 50%;
        transform: translateX(-50%);
        width: 650px;
        height: 280px;
        background: radial-gradient(circle, color-mix(in srgb, var(--primary-color) 22%, transparent) 0%, var(--primary-glow) 45%, transparent 70%);
        filter: blur(55px);
        pointer-events: none;
        z-index: 0;
        border-radius: 50%;
        transition: all 0.6s ease;
    }

    .premium-console-wrapper.console-compact .hero-ambient-glow {
        opacity: 0.05;
        transform: translateX(-50%) scale(0.6) translateY(-40px);
    }

    .console-hero {
        position: relative;
        z-index: 1;
        text-align: center;
        margin-bottom: 28px;
        transition: all 0.55s cubic-bezier(0.16, 1, 0.3, 1);
        display: flex;
        flex-direction: column;
        align-items: center;
        width: 100%;
    }

    .premium-console-wrapper.console-compact .console-hero {
        opacity: 0;
        max-height: 0;
        margin-bottom: 0;
        transform: translateY(-24px) scale(0.97);
        overflow: hidden;
        pointer-events: none;
    }

    .hero-badge {
        display: inline-flex;
        align-items: center;
        gap: 8px;
        font-size: 11.5px;
        font-weight: 800;
        letter-spacing: 0.8px;
        text-transform: uppercase;
        color: var(--primary-color);
        background: var(--primary-light);
        padding: 7px 18px;
        border-radius: 100px;
        margin-bottom: 18px;
        border: 1px solid color-mix(in srgb, var(--primary-color) 28%, transparent);
        box-shadow: 0 4px 16px color-mix(in srgb, var(--primary-color) 12%, transparent);
        backdrop-filter: blur(8px);
    }

    .hero-badge-icon {
        width: 14px;
        height: 14px;
        color: var(--primary-color);
    }

    .badge-dot {
        width: 7px;
        height: 7px;
        border-radius: 50%;
        background: var(--primary-color);
        box-shadow: 0 0 10px var(--primary-color);
        animation: pulseDot 2s infinite ease-in-out;
    }

    @keyframes pulseDot {
        0%, 100% { transform: scale(1); opacity: 1; }
        50% { transform: scale(1.4); opacity: 0.6; }
    }

    .hero-title {
        font-size: clamp(28px, 4vw, 44px);
        font-weight: 900;
        line-height: 1.18;
        letter-spacing: -0.035em;
        color: var(--text-main);
        margin: 0 0 14px;
        text-align: center;
    }

    .hero-title em {
        font-style: normal;
        background: linear-gradient(135deg, var(--primary-color), var(--primary-gradient-end));
        -webkit-background-clip: text;
        background-clip: text;
        color: transparent;
    }

    .hero-desc {
        font-size: 15px;
        color: var(--text-muted);
        font-weight: 500;
        max-width: 640px;
        margin: 0 auto 18px auto;
        line-height: 1.6;
        text-align: center;
    }

    .hero-features-belt {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 12px;
        flex-wrap: wrap;
        margin-top: 4px;
    }

    .hfb-item {
        display: flex;
        align-items: center;
        gap: 7px;
        font-size: 12px;
        font-weight: 700;
        color: var(--text-main);
        background: var(--card-bg);
        padding: 6px 14px;
        border-radius: 100px;
        border: 1px solid var(--border-color);
        box-shadow: 0 2px 8px rgba(0,0,0,0.02);
        transition: all 0.2s ease;
    }

    .hfb-item:hover {
        border-color: var(--primary-color);
        transform: translateY(-1px);
        box-shadow: 0 4px 12px color-mix(in srgb, var(--primary-color) 10%, transparent);
    }

    .hfb-icon {
        width: 13.5px;
        height: 13.5px;
        color: var(--primary-color);
        flex-shrink: 0;
    }

    @media (max-width: 768px) {
        .hero-title { font-size: 28px; }
        .hero-features-belt { gap: 8px; }
        .hfb-item { font-size: 11px; padding: 4px 10px; }
    }