/* =====================================================================
   PREMIUM INTERACTIVE COMPONENTS (FORM INPUTS, BUTTONS, TOAST)
   ===================================================================== */

/* Premium Card (Flat Surface Base) */
.card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-card);
    padding: 2rem;
    box-shadow: var(--shadow-premium);
    transition: var(--transition-smooth);
}

.card:hover {
    box-shadow: var(--shadow-premium-hover);
    transform: translateY(-2px);
}

.card-title {
    font-family: var(--font-display);
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.65rem;
    border-bottom: 1px solid var(--card-border);
    padding-bottom: 0.85rem;
    color: var(--text-primary);
}

.card-title i {
    color: var(--text-secondary);
}

/* =====================================================================
   FORM GROUP, LABELS & INPUTS
   ===================================================================== */
.form-group {
    margin-bottom: 1.5rem;
    display: flex;
    flex-direction: column;
}

.form-group label {
    font-size: 0.92rem;
    font-weight: 600;
    margin-bottom: 0.35rem;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.45rem;
}

.form-group label i {
    color: var(--primary);
    font-size: 0.95rem;
}

.form-desc {
    display: block;
    font-size: 0.78rem;
    color: var(--text-secondary);
    margin-top: -0.15rem;
    margin-bottom: 0.5rem;
    line-height: 1.4;
    font-family: var(--font-body);
}

.form-grid-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
    margin-bottom: 0.5rem;
}

@media (max-width: 576px) {
    .form-grid-row {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
}

/* Custom Dropdown Wrapper */
.select-wrapper {
    position: relative;
    width: 100%;
}

.select-wrapper::after {
    content: '\f107';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    right: 1.25rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
    pointer-events: none;
    transition: var(--transition-smooth);
}

select {
    width: 100%;
    background: var(--bg-surface);
    border: 1px solid var(--card-border);
    color: var(--text-primary);
    padding: 0.7rem 1rem;
    border-radius: var(--radius-input);
    font-size: 0.88rem;
    font-family: inherit;
    appearance: none;
    outline: none;
    transition: var(--transition-smooth);
    cursor: pointer;
}

select:hover {
    border-color: rgba(99, 102, 241, 0.4);
}

select:focus {
    background: var(--bg-surface);
    border-color: var(--primary);
    box-shadow: var(--shadow-focus);
}

select option {
    background-color: var(--bg-surface);
    color: var(--text-primary);
    padding: 12px;
    font-weight: 500;
}

select optgroup {
    font-family: var(--font-body);
    font-weight: 700;
    color: var(--primary);
    background-color: var(--bg-surface);
    font-style: normal;
    padding: 0.5rem;
}

select optgroup option {
    font-weight: 500;
    color: var(--text-primary);
    padding: 0.5rem;
}

/* Custom Textarea */
textarea {
    width: 100%;
    background: var(--bg-surface);
    border: 1px solid var(--card-border);
    color: var(--text-primary);
    padding: 0.7rem 1rem;
    border-radius: var(--radius-input);
    font-size: 0.88rem;
    font-family: inherit;
    resize: none;
    outline: none;
    line-height: 1.5;
    transition: var(--transition-smooth);
}

textarea:hover {
    border-color: rgba(99, 102, 241, 0.4);
}

textarea:focus {
    background: var(--bg-surface);
    border-color: var(--primary);
    box-shadow: var(--shadow-focus);
}

.form-help {
    display: block;
    margin-top: 0.45rem;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

/* Dynamic Tag Input Container */
.tag-input-container {
    background: var(--bg-surface);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-input);
    padding: 0.5rem 0.75rem;
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
    align-items: center;
    transition: var(--transition-smooth);
    min-height: 2.75rem;
}

.tag-input-container:hover {
    border-color: rgba(99, 102, 241, 0.4);
}

.tag-input-container:focus-within {
    background: var(--bg-surface);
    border-color: var(--primary);
    box-shadow: var(--shadow-focus);
}

.tags-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
}

/* Individual Tag Capsule */
.tag {
    background: #F3F4F6;
    border: none;
    color: var(--text-secondary);
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-pill);
    font-size: 0.75rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: var(--space-1);
    animation: scaleUp 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.1);
}

.tag .remove-tag-btn {
    cursor: pointer;
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 0.85rem;
    opacity: 0.7;
    transition: var(--transition-smooth);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.tag .remove-tag-btn:hover {
    opacity: 1;
    transform: scale(1.25);
}

@keyframes scaleUp {
    from { transform: scale(0.8); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

#tagInput {
    border: none;
    background: transparent;
    color: var(--text-primary);
    flex-grow: 1;
    min-width: 160px;
    padding: 0.35rem 0.5rem;
    font-size: 0.95rem;
    font-family: inherit;
    outline: none;
}

/* =====================================================================
   FORM ACTIONS & PREMIUM BUTTONS
   ===================================================================== */
.form-actions-container {
    display: grid;
    grid-template-columns: 1.3fr 1fr;
    gap: 1.1rem;
    margin-top: 2rem;
}

@media (max-width: 576px) {
    .form-actions-container {
        grid-template-columns: 1fr;
    }
}

/* Submit Magic Button */
.btn-submit {
    width: 100%;
    background: var(--primary);
    border: none;
    color: #FFFFFF;
    font-weight: 500;
    font-size: 0.92rem;
    font-family: var(--font-body);
    height: 44px;
    border-radius: var(--radius-btn);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    transition: var(--transition-smooth);
    position: relative;
    overflow: hidden;
}

.btn-submit:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: var(--shadow-btn-hover);
}

.btn-submit:active:not(:disabled) {
    transform: translateY(0);
}

.btn-submit::before {
    display: none;
}

.btn-submit:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    box-shadow: none;
}

/* Surprise Me Button */
.btn-surprise {
    background: transparent;
    border: 1px solid var(--card-border);
    color: var(--text-secondary);
    height: 44px;
    border-radius: var(--radius-btn);
    font-size: 0.92rem;
    font-weight: 500;
    font-family: var(--font-body);
    cursor: pointer;
    transition: var(--transition-smooth);
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
}

.btn-surprise:hover {
    background: rgba(0, 0, 0, 0.02);
    border-color: var(--text-primary);
    color: var(--text-primary);
    transform: translateY(-1px);
}

/* Section Dividers */
.select-prodi-alert {
    text-align: center;
    padding: 3rem 1.5rem;
    background: var(--bg-surface);
    border: 1px dashed var(--card-border);
    border-radius: var(--radius-card);
    margin-top: var(--space-4);
    color: var(--text-secondary);
    transition: var(--transition-smooth);
    animation: fadeIn 0.4s ease-out;
}

.select-prodi-alert:hover {
    background: rgba(0, 0, 0, 0.01);
    border-color: var(--text-secondary);
}

.select-prodi-alert .alert-icon {
    font-size: 2.4rem;
    color: var(--text-secondary);
    margin-bottom: 0.85rem;
    animation: bounce 2.5s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-8px); }
    60% { transform: translateY(-4px); }
}

.dynamic-form-content {
    animation: slideDownFadeIn 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideDownFadeIn {
    from { opacity: 0; transform: translateY(-12px); }
    to { opacity: 1; transform: translateY(0); }
}

.form-section-divider {
    display: flex;
    align-items: center;
    text-align: center;
    color: var(--accent-gold);
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin: 2rem 0 1.5rem 0;
}

.form-section-divider::before, .form-section-divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid rgba(251, 191, 36, 0.15);
}

.form-section-divider::before { margin-right: 1rem; }
.form-section-divider::after { margin-left: 1rem; }

.form-section-divider span {
    background: rgba(251, 191, 36, 0.06);
    padding: 0.45rem 1.1rem;
    border-radius: 50px;
    border: 1px solid rgba(251, 191, 36, 0.25);
    box-shadow: 0 0 12px rgba(251, 191, 36, 0.1);
}

/* =====================================================================
   TOAST NOTIFICATION SYSTEM
   ===================================================================== */
.toast-container {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 10100;
    display: flex;
    flex-direction: column;
    gap: 12px;
    pointer-events: none;
}

.toast {
    pointer-events: auto;
    width: 350px;
    padding: 1.1rem 1.35rem;
    border-radius: 12px;
    color: #1e293b;
    font-size: 0.92rem;
    font-weight: 550;
    display: flex;
    align-items: center;
    gap: 0.85rem;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    transform: translateX(120%);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.2);
}

.toast.show {
    transform: translateX(0);
    opacity: 1;
}

.toast-success {
    background: rgba(16, 185, 129, 0.9);
    border: 1px solid rgba(16, 185, 129, 0.4);
    box-shadow: 0 0 15px rgba(16, 185, 129, 0.2);
}

.toast-error {
    background: rgba(239, 68, 68, 0.9);
    border: 1px solid rgba(239, 68, 68, 0.4);
    box-shadow: 0 0 15px rgba(239, 68, 68, 0.2);
}

.toast-info {
    background: rgba(11, 15, 25, 0.95);
    border: 1px solid rgba(251, 191, 36, 0.4);
    box-shadow: 0 0 15px rgba(251, 191, 36, 0.15);
}

.toast-info i {
    color: var(--accent-gold);
}

.toast i {
    font-size: 1.25rem;
    flex-shrink: 0;
}

.toast-message {
    flex-grow: 1;
    line-height: 1.4;
}

.toast-close {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    font-size: 1.1rem;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-smooth);
}

.toast-close:hover {
    color: #1e293b;
    transform: scale(1.15);
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 480px) {
    .toast-container {
        top: 16px;
        right: 16px;
        left: 16px;
        width: calc(100% - 32px);
    }
    .toast {
        width: 100%;
    }
}

/* =====================================================================
   EXPORT CONFIGURATION MODAL (FEATURE 2)
   ===================================================================== */
.pdf-form {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.pdf-form .form-group {
    margin-bottom: 0;
}

.pdf-form input[type="text"] {
    width: 100%;
    background: var(--bg-surface);
    border: 1px solid var(--card-border);
    color: var(--text-primary);
    padding: 0.6rem 0.85rem;
    border-radius: var(--radius-input);
    font-size: 0.88rem;
    font-family: inherit;
    outline: none;
    transition: var(--transition-smooth);
}

.pdf-form input[type="text"]:focus {
    background: var(--bg-surface);
    border-color: var(--primary);
    box-shadow: var(--shadow-focus);
}

/* =====================================================================
   FLOATING ACADEMIC AI CHATBOT ASSISTANT (FEATURE 1)
   ===================================================================== */
.chatbot-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 10000;
    font-family: inherit;
}

/* Chatbot Toggle Button */
.chatbot-toggle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--primary);
    border: none;
    color: #FFFFFF;
    font-size: 1.6rem;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.35);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-smooth);
    animation: chatbotPulse 2.5s infinite;
}

.chatbot-toggle:hover {
    transform: scale(1.08) rotate(10deg);
}

.chatbot-toggle i {
    transition: transform 0.3s ease;
}

.chatbot-container.active .chatbot-toggle {
    background: var(--primary);
    color: #FFFFFF;
    border: none;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.2);
    animation: none;
}

.chatbot-container.active .chatbot-toggle i {
    transform: rotate(90deg);
}

@keyframes chatbotPulse {
    0% { box-shadow: 0 4px 15px rgba(99, 102, 241, 0.35), 0 0 0 0px rgba(99, 102, 241, 0.4); }
    70% { box-shadow: 0 4px 15px rgba(99, 102, 241, 0.35), 0 0 0 15px rgba(99, 102, 241, 0); }
    100% { box-shadow: 0 4px 15px rgba(99, 102, 241, 0.35), 0 0 0 0px rgba(99, 102, 241, 0); }
}

/* Chatbot Chat Window */
.chatbot-window {
    position: absolute;
    bottom: 80px;
    right: 0;
    width: 380px;
    height: 520px;
    background: var(--bg-surface);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-card);
    box-shadow: var(--shadow-lg);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    opacity: 0;
    transform: translateY(20px) scale(0.95);
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.chatbot-container.active .chatbot-window {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

/* Chat Header */
.chat-header {
    background: var(--bg-surface);
    border-bottom: 1px solid var(--card-border);
    padding: 1.1rem 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.chat-header-avatar {
    width: 36px;
    height: 36px;
    background: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #FFFFFF;
    font-size: 1.1rem;
}

.chat-header-info {
    flex-grow: 1;
}

.chat-header-info h4 {
    font-family: var(--font-display);
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-primary);
}

.chat-header-status {
    font-size: 0.72rem;
    color: var(--success-color);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.chat-header-status::before {
    content: '';
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: var(--success-color);
    box-shadow: 0 0 6px var(--success-color);
}

/* Chat Body (Messages) */
.chat-body {
    flex-grow: 1;
    padding: 1.25rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    background: var(--bg-color);
}

.chat-body::-webkit-scrollbar {
    width: 6px;
}

.chat-body::-webkit-scrollbar-thumb {
    background: var(--card-border);
    border-radius: 6px;
}

/* Chat Message Bubbles */
.chat-msg {
    max-width: 85%;
    padding: 0.75rem 1rem;
    border-radius: var(--radius-card);
    font-size: 0.85rem;
    line-height: 1.5;
    animation: messageFadeIn 0.3s ease-out;
}

@keyframes messageFadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

.chat-msg.bot {
    background: var(--bg-surface);
    border: 1px solid var(--card-border);
    color: var(--text-primary);
    align-self: flex-start;
    border-bottom-left-radius: 2px;
}

.chat-msg.user {
    background: var(--primary);
    color: #FFFFFF;
    align-self: flex-end;
    border-bottom-right-radius: 2px;
    font-weight: 500;
}

/* Quick Response Options */
.chat-choices {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 0.25rem;
}

.chat-choice-btn {
    background: var(--bg-surface);
    border: 1px solid var(--card-border);
    color: var(--text-secondary);
    padding: 0.55rem 0.85rem;
    border-radius: var(--radius-btn);
    font-size: 0.78rem;
    font-weight: 500;
    cursor: pointer;
    text-align: left;
    transition: var(--transition-smooth);
    font-family: var(--font-body);
}

.chat-choice-btn:hover {
    background: rgba(99, 102, 241, 0.08);
    border-color: var(--primary);
    color: var(--primary);
    transform: translateX(3px);
}

/* Typing Indicator Animation */
.typing-indicator {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 0.25rem 0.5rem;
}

.typing-indicator span {
    width: 6px;
    height: 6px;
    background-color: var(--text-secondary);
    border-radius: 50%;
    animation: typingBounce 1.4s infinite ease-in-out both;
}

.typing-indicator span:nth-child(1) { animation-delay: -0.32s; }
.typing-indicator span:nth-child(2) { animation-delay: -0.16s; }

@keyframes typingBounce {
    0%, 80%, 100% { transform: scale(0); }
    40% { transform: scale(1); }
}

/* Chat Input Bar */
.chat-input-area {
    padding: 0.85rem 1rem;
    border-top: 1px solid var(--card-border);
    display: flex;
    gap: 0.6rem;
    background: var(--bg-surface);
}

.chat-input-area input {
    flex-grow: 1;
    background: var(--bg-surface);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-btn);
    padding: 0.55rem 0.85rem;
    color: var(--text-primary);
    font-size: 0.85rem;
    outline: none;
    transition: var(--transition-smooth);
}

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

.chat-send-btn {
    background: var(--primary);
    border: none;
    width: 34px;
    height: 34px;
    border-radius: var(--radius-btn);
    color: #FFFFFF;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    transition: var(--transition-smooth);
    flex-shrink: 0;
}

.chat-send-btn:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow-btn-hover);
}

@media (max-width: 480px) {
    .chatbot-window {
        width: calc(100vw - 32px);
        height: 480px;
        right: -8px;
    }
}

/* =====================================================================
   SEARCH HISTORY SECTION (FORM CARD BOTTOM)
   ===================================================================== */
.search-history-section {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px dashed rgba(251, 191, 36, 0.15);
    animation: fadeIn 0.4s ease-out;
}

.history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.85rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.history-header h4 {
    font-family: 'Outfit', sans-serif;
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--accent-gold);
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.history-help {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.history-list {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.history-item {
    background: var(--bg-surface);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-input);
    padding: 0.65rem 0.85rem;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.history-item:hover {
    background: rgba(99, 102, 241, 0.04);
    border-color: var(--primary);
    transform: translateX(4px);
}

.history-item-left {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    flex-grow: 1;
    margin-right: 1rem;
}

.history-item-tags {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    flex-wrap: wrap;
}

.history-badge-prodi {
    background: rgba(99, 102, 241, 0.08);
    border: 1px solid rgba(99, 102, 241, 0.15);
    color: var(--primary);
    font-size: 0.7rem;
    padding: 0.15rem 0.45rem;
    border-radius: 4px;
    font-weight: 600;
}

.history-query-text {
    font-size: 0.82rem;
    color: var(--text-primary);
    font-weight: 550;
    line-height: 1.4;
}

.history-item-right {
    font-size: 0.72rem;
    color: var(--text-muted);
    font-style: italic;
    flex-shrink: 0;
}

/* =====================================================================
   CUMULATIVE STATS PROGRESS BARS (ANALYTICS TAB)
   ===================================================================== */
/* =====================================================================
   CUMULATIVE STATS PROGRESS BARS (ANALYTICS TAB)
   ===================================================================== */
/* LIVE Telemetry Badge & Pulsing Dot */
.live-status-badge {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    background: rgba(34, 197, 94, 0.08);
    border: 1px solid rgba(34, 197, 94, 0.2);
    color: #22c55e;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 0.25rem 0.6rem;
    border-radius: 20px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.pulse-dot {
    width: 7px;
    height: 7px;
    background-color: #22c55e;
    border-radius: 50%;
    display: inline-block;
    box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7);
    animation: livePulse 1.8s infinite;
}

@keyframes livePulse {
    0% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7);
    }
    70% {
        transform: scale(1);
        box-shadow: 0 0 0 6px rgba(34, 197, 94, 0);
    }
    100% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(34, 197, 94, 0);
    }
}

/* 3-Column Cumulative Grid Layout */
.cumulative-stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1.3fr;
    gap: 1.75rem;
    margin-top: 1rem;
}

@media (max-width: 1024px) {
    .cumulative-stats-grid {
        grid-template-columns: 1fr 1fr;
    }
    .cumulative-stats-grid > :nth-child(3) {
        grid-column: span 2;
    }
}

@media (max-width: 768px) {
    .cumulative-stats-grid {
        grid-template-columns: 1fr;
    }
    .cumulative-stats-grid > :nth-child(3) {
        grid-column: span 1;
    }
}

/* Global Activity Log Items */
#cumRecentLogList::-webkit-scrollbar {
    width: 5px;
}
#cumRecentLogList::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.02);
    border-radius: 4px;
}
#cumRecentLogList::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}
#cumRecentLogList::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.2);
}

.activity-log-item {
    background: var(--bg-surface);
    border: 1px solid var(--card-border);
    border-radius: 8px;
    padding: 0.65rem 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    transition: all 0.25s ease;
    margin-bottom: 0.65rem;
}

.activity-log-item:hover {
    background: rgba(99, 102, 241, 0.04);
    border-color: var(--primary);
    transform: translateX(2px);
}

.activity-log-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.log-tag-prodi {
    font-size: 0.65rem;
    font-weight: 700;
    padding: 0.15rem 0.4rem;
    border-radius: 4px;
    text-transform: uppercase;
}

.log-tag-prodi.if {
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.2);
    color: #60a5fa;
}

.log-tag-prodi.bd {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.2);
    color: #34d399;
}

.log-tag-prodi.si {
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.2);
    color: #fbbf24;
}

.log-timestamp {
    font-size: 0.68rem;
    color: var(--text-muted);
}

.log-body {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.log-query-title {
    font-size: 0.78rem;
    color: var(--text-primary);
    font-weight: 600;
    line-height: 1.35;
    word-break: break-word;
}

.log-query-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
    margin-top: 0.1rem;
}

.log-meta-pill {
    background: var(--bg-color);
    border: 1px solid var(--card-border);
    color: var(--text-secondary);
    font-size: 0.62rem;
    padding: 0.08rem 0.35rem;
    border-radius: 3px;
}

.log-meta-pill.metode {
    background: rgba(99, 102, 241, 0.08);
    border-color: rgba(99, 102, 241, 0.15);
    color: var(--primary);
}

/* Premium Tags for cumulative keywords */
.cum-keywords-flex {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.cum-keyword-badge {
    background: var(--bg-surface);
    border: 1px solid var(--card-border);
    border-radius: 6px;
    padding: 0.4rem 0.65rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    transition: all 0.2s ease;
}

.cum-keyword-badge:hover {
    background: rgba(99, 102, 241, 0.04);
    border-color: var(--primary);
    transform: translateY(-1px);
}

.cum-keyword-text {
    font-size: 0.75rem;
    color: var(--text-primary);
    font-weight: 550;
}

.cum-keyword-count {
    background: rgba(99, 102, 241, 0.08);
    color: var(--primary);
    font-size: 0.65rem;
    font-weight: 700;
    padding: 0.05rem 0.3rem;
    border-radius: 4px;
}

.cumulative-section h5 {
    font-family: 'Outfit', sans-serif;
    font-size: 0.88rem;
    color: #1e293b;
    margin-bottom: 0.85rem;
    font-weight: 600;
    border-left: 3px solid var(--accent-gold);
    padding-left: 0.5rem;
}

.cumulative-list {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.cum-stat-row {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.cum-stat-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.78rem;
    font-weight: 550;
}

.cum-stat-name {
    color: var(--text-secondary);
}

.cum-stat-val {
    color: var(--primary);
}

.cum-stat-bar-track {
    width: 100%;
    height: 8px;
    background: #E5E7EB;
    border-radius: 10px;
    overflow: hidden;
}

.cum-stat-bar-fill {
    height: 100%;
    background: var(--primary);
    border-radius: 10px;
    transition: width 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

/* =====================================================================
   SEARCH MODE SELECTOR (LOCAL VS GLOBAL API)
   ===================================================================== */
.search-mode-selector {
    display: flex;
    background: var(--bg-surface);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    padding: 0.35rem;
    gap: 0.35rem;
    margin-top: 0.35rem;
}

.mode-option {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    border-radius: 9px;
    cursor: pointer;
    transition: var(--transition-smooth);
    user-select: none;
    color: var(--text-secondary);
    font-weight: 550;
    font-size: 0.88rem;
}

.mode-option input[type="radio"] {
    display: none;
}

.mode-option:hover {
    color: var(--text-primary);
    background: rgba(99, 102, 241, 0.04);
}

/* Active State */
.mode-option.active {
    background: var(--primary);
    color: #FFFFFF;
}

.mode-option.active .mode-icon i {
    color: #FFFFFF;
}

.mode-icon i {
    font-size: 1rem;
    color: var(--text-secondary);
    transition: var(--transition-smooth);
}

/* Disabled State */
.mode-option.disabled {
    opacity: 0.4;
    cursor: not-allowed;
    pointer-events: none;
}

/* Notice for Global-only mode */
.global-only-notice {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.75rem;
    padding: 0.75rem 1rem;
    border-radius: 10px;
    background: rgba(99, 102, 241, 0.08);
    border: 1px solid rgba(99, 102, 241, 0.15);
    color: var(--primary);
    font-size: 0.8rem;
    font-weight: 550;
    animation: fadeIn 0.4s ease-out;
}

.global-only-notice i {
    font-size: 0.95rem;
}


