﻿
.page-wrap { max-width: 1440px; margin: 0 auto; padding: 10px 24px 150px; }

/* ============ PAGE CONTAINER & CREATION-STYLE HERO ============ */
.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;
}

/* ============ CARD BASE ============ */
.panel-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    box-shadow: var(--shadow-sm);
    padding: 24px;
    margin-bottom: 22px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.card-eyebrow { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 13px; color: var(--primary-color); margin-bottom: 4px; text-transform: uppercase; letter-spacing: .4px; }
.card-eyebrow i, .card-eyebrow svg { width: 16px; height: 16px; }
.card-heading { font-size: 19px; font-weight: 800; margin: 0 0 4px; color: var(--text-main); }
.card-desc { color: var(--text-muted); font-size: 13.5px; margin: 0 0 16px; line-height: 1.6; }

/* ============ UNIFIED SEARCH ============ */
.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; display: flex; align-items: center; }
.input-search-icon { width: 20px; height: 20px; color: var(--primary-color); margin-inline-start: 12px; margin-inline-end: 8px; flex-shrink: 0; }
.main-keyword-input { width: 100%; background: transparent; border: none; font-size: 16px; font-weight: 600; color: var(--text-main); outline: none; padding: 10px 38px 10px 0; }
[dir="rtl"] .main-keyword-input { padding: 10px 0 10px 38px; }
.main-keyword-input::placeholder { color: var(--text-muted); opacity: 0.7; }
.input-clear-btn {
    position: absolute;
    inset-inline-end: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    cursor: pointer;
    opacity: 0.6;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    transition: all 0.2s ease;
}
.input-clear-btn:hover {
    opacity: 1;
    color: var(--danger);
    transform: translateY(-50%) scale(1.1);
}
.input-clear-btn i, .input-clear-btn svg {
    width: 16px;
    height: 16px;
    pointer-events: none;
}
.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-right: 4px; }
.round-search-btn i, .round-search-btn svg { 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:disabled { opacity: 0.6; cursor: not-allowed; transform: none !important; }
.segment-dropdown { position: absolute; top: calc(100% + 16px); right: -10px; min-width: 230px; }
[dir="rtl"] .segment-dropdown { right: auto; left: -10px; }
.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: 10px; }

.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;
}

.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; }
.item-icon { width: 16px; height: 16px; color: var(--text-muted); }
.dropdown-item.selected .item-icon { color: var(--primary-color); }

/* Suggestions Overlay & History */
.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-left: 1px solid var(--border-color); padding: 16px; display: flex; flex-direction: column; }
[dir="rtl"] .pane-suggestions { border-left: none; border-right: 1px solid var(--border-color); }
.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, .clean-sugg-item svg { 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-left: 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; right: 0; width: 4px; height: 100%; background: transparent; transition: all 0.3s ease; }
[dir="rtl"] .rich-hist-item::before { right: auto; left: 0; }
.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, .h-tag svg { width: 12px; height: 12px; }
.dropdown-search-box { position: relative; margin-bottom: 10px; }
.dropdown-search-box i, .dropdown-search-box svg { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: var(--text-muted); }
[dir="rtl"] .dropdown-search-box i, [dir="rtl"] .dropdown-search-box svg { right: auto; left: 12px; }
.dropdown-search-box input { width: 100%; background: var(--bg-body); border: 1px solid var(--border-color); padding: 9px 36px 9px 12px; border-radius: 10px; font-size: 13px; color: var(--text-main); outline: none; }
[dir="rtl"] .dropdown-search-box input { padding: 9px 12px 9px 36px; }
.pane-history.full-width { width: 100%; border-left: none; border-right: none; }

.control-row { display:flex; align-items:center; gap:12px; flex-wrap:wrap; justify-content:space-between; }
.control-buttons { display:flex; gap:12px; flex-wrap:wrap; }
.btn { border:none; padding:10px 20px; border-radius:12px; font-weight:800; font-size:13.5px; cursor:pointer; display:inline-flex; align-items:center; gap:8px; font-family:inherit; transition:all .2s; }
.btn i, .btn svg { width:16px; height:16px; }
.btn-primary { background:var(--primary-color); color:#fff; }
.btn-primary:hover { background:var(--primary-hover); transform:translateY(-2px); box-shadow:0 10px 20px var(--primary-shadow); }
.btn-pause { background:var(--primary-color); color:#fff; }
.btn-pause:hover { transform:translateY(-2px); box-shadow:0 10px 20px var(--primary-shadow); }
.btn-resume { background:var(--success); color:#fff; }
.btn-resume:hover { transform:translateY(-2px); box-shadow:0 10px 20px rgba(34,195,60,.3); }
.btn-stop { background:var(--card-bg); color:var(--danger); border:1.5px solid rgba(239,68,68,.3); }
.btn-stop:hover { background:var(--danger); color:#fff; transform:translateY(-2px); }
.btn:disabled { opacity:.5; cursor:not-allowed; transform:none !important; }

/* ============ STATUS CARD ============ */
.status-card { display:flex; align-items:center; gap:24px; flex-wrap:wrap; }
.status-circles { display:flex; gap:10px; flex-shrink:0; }
.status-circle { width:20px; height:20px; border-radius:50%; background:var(--border-color); transition:all .35s cubic-bezier(.34,1.56,.64,1); position:relative; }
.status-circle.on { background:var(--success); box-shadow:0 0 0 6px rgba(34,195,60,.18), 0 0 14px rgba(34,195,60,.5); transform:scale(1.15); }
.status-circle.paused-dim { background:var(--primary-color); opacity:.6; }
.status-circle.done { background:var(--success); box-shadow:0 0 0 5px rgba(34,195,60,.15); }
.status-info { flex:1; min-width:220px; }
.status-title { font-weight:800; font-size:16px; margin:0 0 4px; display:flex; align-items:center; gap:8px; color:var(--text-main); }
.status-title i, .status-title svg { width:18px; height:18px; color:var(--primary-color); }
.status-meta { color:var(--text-muted); font-size:12.5px; display:flex; gap:16px; flex-wrap:wrap; margin-top:6px; font-weight:600; }
.progress-track { height:8px; background:var(--bg-body); border-radius:10px; overflow:hidden; margin-top:12px; border:1px solid var(--border-color); }
.progress-fill { height:100%; background:linear-gradient(90deg, var(--primary-color), var(--primary-gradient-end)); border-radius:10px; transition:width .4s ease; }
.status-count { text-align:center; flex-shrink:0; }
.status-count .num { font-size:32px; font-weight:800; color:var(--primary-color); line-height:1; }
.status-count .lbl { font-size:11.5px; color:var(--text-muted); font-weight:700; margin-top:4px; }

/* ============ LIVE FEED ============ */
.feed-list { display:flex; flex-wrap:wrap; gap:8px; min-height:56px; align-content:flex-start; max-height:230px; overflow:hidden; }
.feed-chip { display:inline-flex; align-items:center; gap:7px; background:var(--bg-body); border:1px solid var(--border-color); padding:7px 14px; border-radius:20px; font-size:12.5px; font-weight:700; color:var(--text-main); }
.feed-chip .dot { width:7px; height:7px; border-radius:50%; flex-shrink:0; }
.feed-enter-active { transition:all .4s cubic-bezier(.34,1.56,.64,1); }
.feed-enter-from { opacity:0; transform:translateY(10px) scale(.8); }
.feed-leave-active { transition:all .3s; position:absolute; }
.feed-leave-to { opacity:0; }
.processing-letter { display:flex; align-items:center; gap:10px; margin-bottom:14px; font-weight:800; color:var(--primary-color); font-size:14px; }
.processing-letter .badge-letter { width:34px; height:34px; border-radius:10px; background:var(--primary-light); display:flex; align-items:center; justify-content:center; font-size:16px; }
.spin { animation:spin 1s linear infinite; }
@keyframes spin { to { transform:rotate(360deg); } }

/* ============ FILTERS (Pill Style) ============ */
.filters-bar { display:flex; flex-direction:column; gap:14px; margin-top:14px; }
.filter-row { display:flex; align-items:center; gap:10px; flex-wrap:wrap; }
.filter-label { font-weight:800; font-size:13.5px; color:var(--text-muted); min-width:120px; display:flex; align-items:center; gap:6px; }
.filter-pill { padding:6px 14px; border-radius:20px; background:var(--bg-body); border:1px solid var(--border-color); font-size:12.5px; font-weight:700; cursor:pointer; transition:all 0.2s; font-family:inherit; color:var(--text-main); }
.filter-pill:hover { border-color:var(--primary-color); color:var(--primary-color); }
.filter-pill.active { background:var(--primary-color); color:white; border-color:var(--primary-color); }
.filter-pill .count { opacity:0.8; font-size:11px; margin-right:4px; }

/* ============ CHECKBOX & SPARKLINE & DEEP SCRAPE ============ */
.custom-check-wrapper { display:inline-flex; align-items:center; cursor:pointer; flex-shrink:0; }
.custom-check { width:18px; height:18px; border:2px solid var(--border-color); border-radius:6px; display:flex; align-items:center; justify-content:center; transition:all 0.2s; background:var(--card-bg); }
.custom-check-wrapper input:checked + .custom-check { background:var(--primary-color); border-color:var(--primary-color); color:white; }
.custom-check-wrapper input { display:none; }
.custom-check i, .custom-check svg { opacity:0; width:12px; height:12px; transition:0.2s; }
.custom-check-wrapper input:checked + .custom-check i, .custom-check-wrapper input:checked + .custom-check svg { opacity:1; }

.sparkline { display:flex; align-items:flex-end; gap:2px; height:16px; width:20px; flex-shrink:0; }
.spark-bar { width:4px; background:var(--primary-color); border-radius:2px; transition:height 0.3s; opacity:0.8; }

.action-btn { background:var(--bg-body); border:1px solid var(--border-color); color:var(--text-muted); width:28px; height:28px; border-radius:8px; display:flex; align-items:center; justify-content:center; cursor:pointer; transition:0.2s; flex-shrink:0; }
.action-btn:hover { background:var(--primary-color); color:white; border-color:var(--primary-color); }

/* ============ LETTER CARDS & SEMANTIC CLUSTERS ============ */
.letter-cards-grid { display:grid; grid-template-columns:repeat(auto-fill, minmax(320px, 1fr)); gap:18px; }
.letter-card { background:var(--bg-body); border:1px solid var(--border-color); border-radius:20px; padding:18px; transition:.3s; }
.letter-card:hover { border-color:var(--primary-color); box-shadow:0 10px 24px color-mix(in srgb, var(--primary-color) 10%, transparent); transform:translateY(-2px); }
.letter-card-head { display:flex; align-items:center; gap:12px; margin-bottom:14px; }
.letter-badge { width:40px; height:40px; border-radius:12px; background:linear-gradient(135deg, var(--primary-color), var(--primary-gradient-end)); color:#fff; display:flex; align-items:center; justify-content:center; font-weight:800; font-size:17px; flex-shrink:0; }
.letter-card-title { font-weight:800; font-size:14px; color:var(--text-main); }
.letter-card-sub { font-size:11.5px; color:var(--text-muted); font-weight:700; }
.letter-list { list-style:none; margin:0; padding:0; display:flex; flex-direction:column; gap:8px; }
.letter-item { display:flex; align-items:center; gap:10px; background:var(--card-bg); padding:8px 10px; border-radius:12px; border:1px solid var(--border-color); transition:border-color 0.2s; }
.letter-item:hover { border-color:var(--primary-color); }
.letter-item-body { flex:1; min-width:0; display:flex; align-items:center; justify-content:space-between; }
.letter-phrase { font-size:13px; font-weight:700; color:var(--text-main); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.letter-freq { font-size:11px; font-weight:800; color:var(--text-muted); background:var(--bg-body); padding:2px 6px; border-radius:6px; }
.letter-card-actions { display:flex; gap:6px; margin-top:14px; padding-top:12px; border-top:1px dashed var(--border-color); }

/* ============ EXPORT BUTTONS ============ */
.export-btn { background:var(--card-bg); border:1px solid var(--border-color); color:var(--text-main); padding:6px 12px; border-radius:9px; font-size:12px; font-weight:700; cursor:pointer; display:inline-flex; align-items:center; gap:5px; font-family:inherit; transition:.2s; }
.export-btn:hover { background:var(--primary-color); color:#fff; border-color:var(--primary-color); }
.section-toolbar { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:12px; margin-bottom:16px; }
.export-group { display:flex; gap:8px; }

/* ============ MIND MAPS / CHARTS ============ */
.mindmap-canvas { width:100%; height:500px; }
.chart-canvas { width:100%; height:300px; }

/* ============ DASHBOARD ============ */
.kpi-grid { display:grid; grid-template-columns:repeat(5, 1fr); gap:16px; margin-bottom:22px; }
.kpi-card { background:var(--bg-body); border:1px solid var(--border-color); border-radius:18px; padding:16px; text-align:center; }
.kpi-icon { width:38px; height:38px; border-radius:10px; background:var(--primary-light); color:var(--primary-color); display:flex; align-items:center; justify-content:center; margin:0 auto 8px; }
.kpi-value { font-size:22px; font-weight:800; color:var(--text-main); line-height:1; }
.kpi-label { font-size:11px; color:var(--text-muted); font-weight:700; margin-top:6px; }
.charts-row { display:grid; grid-template-columns:repeat(3, 1fr); gap:18px; }
.chart-card { background:var(--bg-body); border:1px solid var(--border-color); border-radius:18px; padding:18px; }
.chart-title { font-weight:800; font-size:13.5px; margin-bottom:10px; color:var(--text-main); }

/* ============ QUESTIONS ============ */
.questions-grid { display:grid; grid-template-columns:repeat(auto-fill, minmax(300px, 1fr)); gap:12px; }
.question-chip { background:var(--card-bg); border:1px solid var(--border-color); border-radius:14px; padding:10px 14px; font-size:13px; font-weight:700; display:flex; align-items:center; gap:10px; transition:.2s; }
.question-chip:hover { border-color:var(--primary-color); box-shadow:var(--shadow-sm); }
.question-chip i.icon, .question-chip svg.icon { width:16px; height:16px; color:var(--primary-color); flex-shrink:0; }

/* ============ STANDARDIZED DATA TABLE MODULE ============ */
.kw-table-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    overflow: hidden;
    margin-bottom: 24px;
    box-shadow: var(--shadow-sm);
}

.kw-table-header {
    padding: 14px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    border-bottom: 1px solid var(--border-color);
}

.kw-table-header-left {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.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-table-wrap {
    overflow-x: auto;
    max-height: 600px;
    position: relative;
}

.kw-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

[dir="rtl"] .kw-table {
    text-align: right;
}

.kw-table-sticky-header th {
    position: sticky;
    top: 0;
    z-index: 10;
    height: 38px;
    padding: 0 16px;
    background: var(--bg-body);
    font-size: 11.5px;
    font-weight: 800;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid var(--border-color);
    white-space: nowrap;
    line-height: 38px;
    vertical-align: middle;
}

.kw-table-col-sortable {
    cursor: pointer;
    user-select: none;
    transition: color 0.15s ease;
}

.kw-table-col-sortable:hover {
    color: var(--primary-color);
}

.th-content {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    height: 38px;
    line-height: 38px;
    vertical-align: middle;
}

.sort-icon {
    width: 12px;
    height: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
}

.sort-icon i, .sort-icon svg {
    width: 12px;
    height: 12px;
}

.sort-icon.active {
    color: var(--primary-color);
}

.kw-table-row {
    border-bottom: 1px solid var(--border-color);
    transition: background 0.15s ease;
}

.kw-table-row:hover {
    background: var(--bg-body);
}

.kw-table-cell {
    padding: 10px 16px;
    font-size: 13px;
    color: var(--text-main);
    vertical-align: middle;
}

.kw-keyword-text {
    font-weight: 700;
    color: var(--text-main);
    display: inline-block;
    max-width: 320px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    vertical-align: middle;
}

.intent-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 10px;
    border-radius: 8px;
    font-size: 11px;
    font-weight: 800;
}

/* 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 select {
    height: 34px;
    padding: 4px 10px;
    font-size: 12px;
    font-weight: 700;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    background: var(--bg-body);
    color: var(--text-main);
    outline: none;
    cursor: pointer;
}

.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: 8px;
}

.kw-bulk-actions-btns {
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-bulk-action {
    padding: 6px 14px;
    border-radius: 20px;
    background: var(--primary-color);
    color: #fff;
    border: none;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
}

.btn-bulk-action:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
}

.btn-bulk-clear {
    background: transparent;
    color: var(--text-muted);
    border: 1px solid var(--border-color);
}

.btn-bulk-clear:hover {
    background: var(--bg-body);
    color: var(--danger);
    border-color: var(--danger);
}

/* ============ FLOATING BASKET ============ */
.basket-panel {
    position: fixed; bottom: 80px; left: 24px; background: var(--card-bg); color: var(--text-main);
    padding: 12px 20px; border-radius: 20px; box-shadow: 0 15px 35px rgba(0,0,0,0.25); border: 1px solid var(--border-color);
    display: flex; align-items: center; gap: 16px; z-index: 1000;
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.basket-count { background: var(--primary-color); color: #fff; width: 28px; height: 28px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size:12px; }
.basket-btn { background: var(--bg-body); border: 1px solid var(--border-color); color: var(--text-main); padding: 6px 14px; border-radius: 10px; font-family: inherit; font-size: 12.5px; font-weight:700; cursor: pointer; transition: 0.2s; display: flex; align-items: center; gap: 6px;}
.basket-btn:hover { background: var(--primary-color); color: #fff; border-color: var(--primary-color); }

/* ============ TOAST ============ */
.toast { position: fixed; bottom: 180px; left: 50%; transform: translateX(-50%); background: var(--text-main); color: var(--bg-body); padding: 12px 24px; border-radius: 14px; font-weight: 700; font-size: 13.5px; box-shadow: 0 15px 35px rgba(0,0,0,.25); z-index: 5000; display: flex; align-items: center; gap: 8px; }
.toast-enter-active, .toast-leave-active { transition: all .35s; }
.toast-enter-from, .toast-leave-to { opacity: 0; transform: translateX(-50%) translateY(15px); }

/* ============ MINDMAP & CHARTS CANVAS ============ */
.mindmap-canvas {
    width: 100% !important;
    height: 550px !important;
    min-height: 500px !important;
    position: relative;
    border-radius: 16px;
    background: var(--bg-body);
    border: 1px solid var(--border-color);
    margin-top: 14px;
}

.chart-canvas {
    width: 100% !important;
    min-height: 290px;
    position: relative;
}

.charts-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 24px;
}

.chart-card {
    background: var(--bg-body);
    border: 1px solid var(--border-color);
    border-radius: 18px;
    padding: 18px;
    display: flex;
    flex-direction: column;
}

.chart-title {
    font-size: 14px;
    font-weight: 800;
    color: var(--text-main);
    margin-bottom: 12px;
}

@media (max-width: 1100px) {
    .kpi-grid { grid-template-columns: repeat(2, 1fr); }
    .charts-row { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
    .hero-title { font-size: 28px; }
    .hero-features-belt { gap: 8px; }
    .hfb-item { font-size: 11px; padding: 4px 10px; }
    .kpi-grid { grid-template-columns: 1fr; }
    .status-card { flex-direction: column; align-items: stretch; }
    .kw-table-header { flex-direction: column; align-items: stretch; }
    .kw-table-header-left, .kw-table-header-right { width: 100%; justify-content: space-between; }
    .mindmap-canvas { height: 420px !important; min-height: 400px !important; }
}