/* =====================================================================
   RESULTS DASHBOARD, CARDS, TABS, ACTIONS, AND ANALYTICS WIDGETS
   ==================================================================== */

.results-card {
    display: flex;
    flex-direction: column;
    min-height: 600px;
}

/* Results Navigation Tabs */
.results-tabs {
    display: flex;
    border-bottom: 1px solid var(--card-border);
    margin-bottom: 1.5rem;
    gap: 0.35rem;
    overflow-x: auto;
}

.results-tabs::-webkit-scrollbar {
    height: 4px;
}

.results-tabs::-webkit-scrollbar-thumb {
    background: var(--card-border);
    border-radius: 4px;
}

.tab-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    padding: 0.75rem 1.25rem;
    font-family: var(--font-body);
    font-size: 0.88rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition-smooth);
    border-bottom: 2px solid transparent;
    display: flex;
    align-items: center;
    gap: 0.55rem;
    white-space: nowrap;
}

.tab-btn:hover {
    color: var(--text-primary);
    background: rgba(0, 0, 0, 0.02);
}

.tab-btn.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
    background: transparent;
    border-radius: var(--radius-btn) var(--radius-btn) 0 0;
}

.tab-pane {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

/* =====================================================================
   RESULTS ACTION BAR & FILTER INPUTS
   ==================================================================== */
.results-actions-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.25rem;
    flex-wrap: wrap;
}

.search-filter-wrapper {
    position: relative;
    flex-grow: 1;
    max-width: 380px;
    min-width: 220px;
}

.search-filter-wrapper i {
    position: absolute;
    left: 0.85rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.search-filter-input {
    width: 100%;
    background: var(--bg-surface);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-input);
    padding: 0.5rem 1rem 0.5rem 2.25rem;
    color: var(--text-primary);
    font-size: 0.88rem;
    outline: none;
    transition: var(--transition-smooth);
}

.search-filter-input:focus {
    border-color: var(--primary);
    background: var(--bg-surface);
    box-shadow: var(--shadow-focus);
}

.export-group {
    display: flex;
    gap: 0.6rem;
}

.btn-action {
    background: transparent;
    border: 1px solid var(--card-border);
    color: var(--text-secondary);
    padding: var(--space-2) var(--space-3);
    border-radius: var(--radius-btn);
    font-size: 0.82rem;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.45rem;
    transition: var(--transition-smooth);
    font-family: var(--font-body);
}

.btn-action:hover:not(:disabled) {
    background: rgba(99, 102, 241, 0.08);
    border-color: var(--primary);
    color: var(--primary);
    transform: translateY(-1px);
}

.btn-action:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

/* =====================================================================
   RECOMMENDATIONS LIST & CARD ITEMS
   ==================================================================== */
.recommendations-list {
    display: flex;
    flex-direction: column;
    gap: 1.1rem;
    overflow-y: auto;
    max-height: 620px;
    padding-right: 0.5rem;
}

/* Custom Scrollbar for Recommendations List */
.recommendations-list::-webkit-scrollbar {
    width: 8px;
}

.recommendations-list::-webkit-scrollbar-track {
    background: transparent;
}

.recommendations-list::-webkit-scrollbar-thumb {
    background: var(--card-border);
    border-radius: 10px;
    border: 2px solid var(--bg-color);
}

.recommendations-list::-webkit-scrollbar-thumb:hover {
    background: var(--text-secondary);
}

/* Recommendation Card */
.rec-item-card {
    background: var(--bg-surface);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-card);
    padding: 1.25rem;
    transition: var(--transition-smooth);
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
    cursor: pointer;
}

.rec-item-card:hover {
    background: var(--bg-surface);
    border-color: var(--card-border);
    transform: translateY(-2px);
    box-shadow: var(--shadow-premium-hover);
}

.rec-item-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: var(--space-4);
}

.rec-item-header-content {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: var(--space-1);
}

.rec-item-card h4 {
    font-size: 1.05rem;
    font-weight: 700;
    line-height: 1.45;
    color: var(--text-primary);
    transition: var(--transition-smooth);
    font-family: var(--font-body);
}

.rec-item-card:hover h4 {
    color: var(--primary);
}

/* Card Action Layout */
.card-actions-wrapper {
    display: flex;
    gap: var(--space-2);
    align-items: center;
    flex-shrink: 0;
}

/* Relevance Score Badges */
.score-badge {
    padding: 0.25rem 0.65rem;
    border-radius: var(--radius-pill);
    font-size: 0.75rem;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: var(--space-1);
}

.score-high {
    background: rgba(16, 185, 129, 0.08);
    border: 1px solid rgba(16, 185, 129, 0.15);
    color: var(--success-color);
}

.score-med {
    background: rgba(245, 158, 11, 0.08);
    border: 1px solid rgba(245, 158, 11, 0.15);
    color: var(--warning-color);
}

.score-low {
    background: rgba(239, 68, 68, 0.08);
    border: 1px solid rgba(239, 68, 68, 0.15);
    color: var(--danger-color);
}

/* Bookmark Icon Button */
.btn-favorite {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 1.15rem;
    cursor: pointer;
    transition: var(--transition-smooth);
    padding: 0.3rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-favorite:hover {
    color: var(--primary);
    transform: scale(1.15);
}

.btn-favorite.active {
    color: var(--primary);
}

/* Publication Metadata inside card */
.jurnal-meta {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
    align-items: center;
    margin-top: 0.25rem;
    font-size: 0.8rem;
}

.jurnal-badge {
    background: rgba(99, 102, 241, 0.08);
    border: 1px solid rgba(99, 102, 241, 0.15);
    color: var(--primary);
    padding: 0.25rem 0.6rem;
    border-radius: var(--radius-chip);
    font-weight: 600;
    max-width: 280px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.jurnal-year {
    background: rgba(0, 0, 0, 0.03);
    border: 1px solid var(--card-border);
    color: var(--text-secondary);
    padding: 0.25rem 0.6rem;
    border-radius: var(--radius-chip);
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}

.btn-doi {
    background: transparent;
    border: 1px solid var(--card-border);
    color: var(--text-secondary);
    padding: 0.25rem 0.6rem;
    border-radius: var(--radius-chip);
    font-weight: 500;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.8rem;
    transition: var(--transition-smooth);
}

.btn-doi:hover {
    background: rgba(99, 102, 241, 0.08);
    border-color: var(--primary);
    color: var(--primary);
}

/* Card copy button */
.rec-item-footer {
    display: flex;
    justify-content: flex-end;
    border-top: 1px solid var(--card-border);
    padding-top: 0.65rem;
    margin-top: 0.25rem;
}

.btn-copy {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 0.8rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.45rem;
    transition: var(--transition-smooth);
    padding: 0.25rem 0.6rem;
    border-radius: var(--radius-btn);
}

.btn-copy:hover {
    color: var(--primary);
    background: rgba(99, 102, 241, 0.04);
}

/* =====================================================================
   STATES (EMPTY, LOADING, ERROR)
   ==================================================================== */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    flex-grow: 1;
    padding: 3.5rem 2rem;
}

.empty-icon-wrapper {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: rgba(99, 102, 241, 0.04);
    border: 1px dashed rgba(99, 102, 241, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    color: var(--primary);
    font-size: 2.2rem;
}

.empty-state h3 {
    font-family: var(--font-display);
    font-size: 1.3rem;
    margin-bottom: 0.6rem;
    font-weight: 700;
}

.empty-state p {
    color: var(--text-secondary);
    font-size: 0.92rem;
    line-height: 1.6;
    max-width: 360px;
}

.loading-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex-grow: 1;
    gap: 1.25rem;
    padding: 4rem 2rem;
}

.spinner {
    width: 48px;
    height: 48px;
    border: 3.5px solid rgba(0, 0, 0, 0.03);
    border-top: 3.5px solid var(--primary);
    border-radius: 50%;
    animation: spin 0.9s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.error-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex-grow: 1;
    color: var(--danger-color);
    gap: 1rem;
    text-align: center;
    padding: 4rem 2rem;
}

.error-state i {
    font-size: 2.8rem;
    filter: drop-shadow(0 0 10px rgba(239, 68, 68, 0.3));
}

/* =====================================================================
   ANALYTICS GRID & WIDGETS
   ==================================================================== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 1.25rem;
    margin-bottom: 1.75rem;
}

.stat-card {
    background: var(--bg-surface);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-card);
    padding: 1.25rem;
    text-align: center;
    transition: var(--transition-smooth);
}

.stat-card:hover {
    border-color: var(--card-border);
    background: var(--bg-surface);
    box-shadow: var(--shadow-premium-hover);
    transform: translateY(-2px);
}

.stat-num {
    font-family: var(--font-display);
    font-size: 1.95rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 0.3rem;
}

.stat-label {
    font-family: var(--font-body);
    font-size: 0.75rem;
    color: var(--text-secondary);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.charts-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.75rem;
}

.chart-card {
    background: var(--bg-surface);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-card);
    padding: 1.4rem;
}

.chart-card-title {
    font-family: 'Outfit', sans-serif;
    font-size: 0.98rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.55rem;
}

.chart-card-title i {
    color: var(--accent-gold);
}

.chart-wrapper {
    position: relative;
    width: 100%;
    height: 240px;
}

/* =====================================================================
   SHIMMER SKELETON LOADER STYLE (FEATURE 5)
   ===================================================================== */
.shimmer-container {
    display: flex;
    flex-direction: column;
    gap: 1.1rem;
    width: 100%;
}

.shimmer-card {
    background: var(--bg-surface);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-card);
    padding: 1.4rem;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    position: relative;
    overflow: hidden;
}

/* The Shimmer Element Overlay */
.shimmer-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -150%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(99, 102, 241, 0.08),
        transparent
    );
    animation: shimmer 1.6s infinite linear;
}

@keyframes shimmer {
    0% { left: -150%; }
    50% { left: 150%; }
    100% { left: 150%; }
}

.shimmer-line {
    background: #E5E7EB;
    border-radius: 4px;
}

.shimmer-line.title {
    width: 85%;
    height: 1.25rem;
}

.shimmer-line.sub-title {
    width: 45%;
    height: 0.9rem;
}

.shimmer-line.badge {
    width: 100px;
    height: 1.7rem;
    border-radius: 6px;
    align-self: flex-start;
}

.shimmer-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.shimmer-header-content {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    flex-grow: 1;
}

.shimmer-meta {
    display: flex;
    gap: 0.5rem;
}

.shimmer-meta-item {
    width: 80px;
    height: 1.3rem;
    background: #E5E7EB;
    border-radius: 6px;
}

