/* WIE Brain AI Assistant Modern Glassmorphism Styling */

#wie-brain-trigger {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 9999;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    background: linear-gradient(135deg, #6366f1 0%, #a855f7 100%);
    color: #ffffff;
    border: none;
    border-radius: 30px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    box-shadow: 0 8px 24px rgba(99, 102, 241, 0.4);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

#wie-brain-trigger:hover {
    transform: translateY(-2px) scale(1.03);
    box-shadow: 0 12px 28px rgba(99, 102, 241, 0.5);
}

.wie-kbd-shortcut {
    background: rgba(255, 255, 255, 0.25);
    padding: 2px 6px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
}

.wie-drawer-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(15, 23, 42, 0.4);
    backdrop-filter: blur(4px);
    z-index: 10000;
    transition: opacity 0.3s ease;
}

.wie-drawer {
    position: fixed;
    top: 0;
    right: 0;
    width: 440px;
    max-width: 90vw;
    height: 100vh;
    background: #ffffff;
    z-index: 10001;
    display: flex;
    flex-direction: column;
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.15);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.hidden {
    display: none !important;
}

.wie-drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    background: #0f172a;
    color: #ffffff;
}

.wie-header-title {
    display: flex;
    align-items: center;
    gap: 8px;
}

.wie-header-title h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    color: #ffffff;
}

.wie-badge-pro {
    background: linear-gradient(135deg, #ec4899, #8b5cf6);
    font-size: 10px;
    padding: 2px 8px;
    border-radius: 10px;
    text-transform: uppercase;
}

.wie-icon-btn {
    background: transparent;
    border: none;
    color: #94a3b8;
    font-size: 16px;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 6px;
}

.wie-icon-btn:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.1);
}

.wie-context-bar {
    background: #f1f5f9;
    padding: 8px 16px;
    font-size: 12px;
    color: #475569;
    font-weight: 600;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    gap: 6px;
}

.wie-messages-container {
    flex: 1;
    padding: 16px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 14px;
    background: #fafafa;
}

.wie-message {
    display: flex;
    gap: 10px;
    max-width: 90%;
}

.wie-user-message {
    align-self: flex-end;
    flex-direction: row-reverse;
}

.wie-assistant-message {
    align-self: flex-start;
}

.wie-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #6366f1;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    flex-shrink: 0;
}

.wie-user-message .wie-avatar {
    background: #3b82f6;
}

.wie-bubble {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    padding: 12px 14px;
    border-radius: 12px;
    font-size: 13px;
    line-height: 1.5;
    color: #1e293b;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03);
}

.wie-user-message .wie-bubble {
    background: #6366f1;
    color: #ffffff;
    border: none;
}

.wie-subtext {
    color: #64748b;
    font-size: 12px;
    margin-top: 4px;
}

.wie-quick-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 10px;
}

.wie-chip {
    background: #f1f5f9;
    border: 1px solid #cbd5e1;
    color: #334155;
    padding: 4px 10px;
    border-radius: 14px;
    font-size: 11px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.wie-chip:hover {
    background: #6366f1;
    color: #ffffff;
    border-color: #6366f1;
}

.wie-card-widget {
    background: #f8fafc;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    padding: 10px;
    margin-top: 8px;
}

.wie-card-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 0;
    border-bottom: 1px solid #e2e8f0;
    font-size: 12px;
}

.wie-card-item:last-child {
    border-bottom: none;
}

.wie-status-pill {
    padding: 2px 8px;
    border-radius: 10px;
    color: #fff;
    font-size: 10px;
    font-weight: 600;
}

.wie-confirm-btn {
    background: #10b981;
    color: #fff;
    border: none;
    padding: 6px 14px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 8px;
}

.wie-confirm-btn:hover {
    background: #059669;
}

.wie-input-area {
    padding: 14px;
    background: #ffffff;
    border-top: 1px solid #e2e8f0;
}

.wie-input-wrapper {
    display: flex;
    gap: 8px;
}

#wie-prompt-input {
    flex: 1;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    padding: 10px;
    font-size: 13px;
    resize: none;
    outline: none;
}

#wie-prompt-input:focus {
    border-color: #6366f1;
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.2);
}

.wie-send-btn {
    background: #6366f1;
    color: #ffffff;
    border: none;
    border-radius: 8px;
    padding: 0 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.wie-send-btn:hover {
    background: #4f46e5;
}

.wie-footer-hint {
    font-size: 10px;
    color: #94a3b8;
    margin-top: 6px;
    text-align: center;
}

/* WIE Brain Conversation History Panel */
.wie-threads-panel {
    position: absolute;
    top: 61px;
    left: 0;
    width: 100%;
    bottom: 0;
    background: #ffffff;
    z-index: 10002;
    display: flex;
    flex-direction: column;
    animation: wieSlideIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes wieSlideIn {
    from {
        opacity: 0;
        transform: translateX(-15px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.wie-threads-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
}

.wie-threads-title {
    display: flex;
    align-items: center;
    gap: 8px;
}

.wie-threads-title h4 {
    margin: 0;
    font-size: 14px;
    font-weight: 700;
    color: #1e293b;
}

.wie-back-btn {
    background: #e2e8f0;
    border: none;
    border-radius: 6px;
    padding: 3px 8px;
    font-size: 14px;
    cursor: pointer;
    color: #334155;
    transition: background 0.15s;
}

.wie-back-btn:hover {
    background: #cbd5e1;
}

.wie-btn-sm-primary {
    background: #6366f1;
    color: #ffffff;
    border: none;
    border-radius: 6px;
    padding: 4px 10px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s;
}

.wie-btn-sm-primary:hover {
    background: #4f46e5;
}

.wie-threads-search-box {
    padding: 10px 16px;
    background: #ffffff;
    border-bottom: 1px solid #f1f5f9;
}

#wie-threads-search-input {
    width: 100%;
    padding: 7px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: 12px;
    outline: none;
}

#wie-threads-search-input:focus {
    border-color: #6366f1;
}

.wie-threads-list {
    flex: 1;
    overflow-y: auto;
    padding: 8px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    background: #fafafa;
}

.wie-threads-loading,
.wie-threads-empty {
    text-align: center;
    padding: 24px;
    font-size: 13px;
    color: #94a3b8;
}

.wie-thread-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.wie-thread-item:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
    transform: translateX(2px);
}

.wie-thread-item.active {
    background: #eef2ff;
    border-color: #818cf8;
}

.wie-thread-info {
    flex: 1;
    min-width: 0;
}

.wie-thread-item-title {
    font-size: 13px;
    font-weight: 600;
    color: #1e293b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.wie-thread-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    color: #64748b;
    margin-top: 3px;
}

.wie-thread-delete-btn {
    background: transparent;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    padding: 4px 6px;
    border-radius: 4px;
    font-size: 13px;
    transition: color 0.15s, background 0.15s;
}

.wie-thread-delete-btn:hover {
    color: #ef4444;
    background: #fee2e2;
}

/* WIE Feedback Bar */
.wie-feedback-bar {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 8px;
    padding-top: 6px;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    font-size: 11px;
    color: #94a3b8;
}

.wie-feedback-btn {
    background: transparent;
    border: 1px solid transparent;
    cursor: pointer;
    border-radius: 4px;
    padding: 2px 5px;
    font-size: 12px;
    line-height: 1;
    opacity: 0.7;
    transition: all 0.15s ease;
}

.wie-feedback-btn:hover {
    opacity: 1;
    background: #f1f5f9;
}

.wie-feedback-btn.rated {
    opacity: 1;
    background: #e0e7ff;
    border-color: #818cf8;
}

/* Card Widgets & Metadata */
.wie-card-empty {
    font-size: 12px;
    color: #94a3b8;
    padding: 8px;
    font-style: italic;
}

.wie-card-main {
    flex: 1;
    min-width: 0;
}

.wie-card-heading {
    font-size: 13px;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.wie-card-sub {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    color: #64748b;
    flex-wrap: wrap;
}

.wie-balance-due {
    color: #ef4444;
    font-weight: 600;
}

.wie-card-action {
    display: flex;
    align-items: center;
    gap: 6px;
}

.wie-link-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 4px;
    background: #f1f5f9;
    color: #475569;
    font-size: 12px;
    text-decoration: none;
    transition: background 0.15s, color 0.15s;
}

.wie-link-btn:hover {
    background: #6366f1;
    color: #ffffff;
}

.wie-link {
    color: #6366f1;
    font-weight: 600;
    text-decoration: underline;
}

/* Documentation Cards */
.wie-doc-card {
    display: block;
}

.wie-doc-title {
    color: #3b82f6;
    text-decoration: none;
    font-size: 13px;
}

.wie-doc-title:hover {
    text-decoration: underline;
}

.wie-doc-snippet {
    margin: 4px 0 0;
    font-size: 11px;
    color: #64748b;
    line-height: 1.4;
}

/* Project Progress Bar */
.wie-project-progress-wrap {
    margin-top: 4px;
}

.wie-progress-bar {
    width: 100%;
    height: 6px;
    background: #e2e8f0;
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 4px;
}

.wie-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #6366f1, #10b981);
    border-radius: 3px;
    transition: width 0.4s ease;
}

/* Guidance Categories & Chips */
.wie-guidance-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 8px;
}

.wie-guidance-cat {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 10px 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.wie-guidance-cat-title {
    font-size: 12px;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 2px;
}

.wie-guidance-cat-desc {
    font-size: 11px;
    color: #64748b;
    margin-bottom: 6px;
}

.wie-bullet-item {
    font-size: 13px;
    margin: 3px 0;
    padding-left: 4px;
    line-height: 1.4;
}

.wie-inline-code {
    background: #f1f5f9;
    color: #0f172a;
    padding: 1px 4px;
    border-radius: 4px;
    font-family: monospace;
    font-size: 11px;
}

/* Feedback Toast Notification */
.wie-toast {
    position: absolute;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    background: #0f172a;
    color: #ffffff;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
    pointer-events: none;
    opacity: 0;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 10005;
}

.wie-toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* Compound Task & Hierarchical Workflow Widget */
.wie-compound-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 12px;
    margin: 8px 0;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
}

.wie-compound-header {
    border-bottom: 1px solid #f1f5f9;
    padding-bottom: 10px;
    margin-bottom: 10px;
}

.wie-compound-top-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 6px;
}

.wie-compound-badge {
    background: #eef2ff;
    color: #4f46e5;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 12px;
}

.wie-tag-project {
    font-size: 11px;
    color: #64748b;
    background: #f8fafc;
    padding: 2px 6px;
    border-radius: 4px;
    border: 1px solid #e2e8f0;
}

.wie-compound-title {
    font-size: 14px;
    font-weight: 700;
    color: #0f172a;
    margin: 4px 0 6px 0;
    line-height: 1.3;
}

.wie-compound-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 11px;
    color: #475569;
    margin-bottom: 8px;
}

.wie-compound-meta-item {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.wie-compound-advisory {
    background: #fffbeb;
    border: 1px solid #fde68a;
    color: #92400e;
    font-size: 11px;
    padding: 4px 8px;
    border-radius: 6px;
    margin-bottom: 8px;
}

.wie-compound-actions {
    display: flex;
    gap: 6px;
}

.wie-btn-open-task {
    background: #4f46e5;
    color: #ffffff !important;
    font-size: 11px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 6px;
    text-decoration: none;
    transition: background 0.15s;
}

.wie-btn-open-task:hover {
    background: #4338ca;
}

.wie-compound-subtasks {
    margin-top: 8px;
}

.wie-subtasks-tree-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 12px;
    font-weight: 700;
    color: #334155;
    margin-bottom: 8px;
}

.wie-subtasks-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.wie-subtask-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 8px 10px;
    transition: background 0.15s, border-color 0.15s;
}

.wie-subtask-item:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
}

.wie-subtask-info {
    flex: 1;
    min-width: 0;
}

.wie-subtask-title-line {
    font-size: 12px;
    color: #1e293b;
    margin-bottom: 4px;
    line-height: 1.3;
}

.wie-subtask-index {
    color: #6366f1;
    font-weight: 700;
    margin-right: 2px;
}

.wie-subtask-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
}

.wie-chip-lead {
    font-size: 10px;
    font-weight: 600;
    background: #ecfdf5;
    color: #047857;
    border: 1px solid #a7f3d0;
    padding: 1px 6px;
    border-radius: 4px;
}

.wie-chip-general {
    font-size: 10px;
    color: #64748b;
    background: #f1f5f9;
    padding: 1px 5px;
    border-radius: 4px;
}

.wie-chip-checklist {
    font-size: 10px;
    font-weight: 600;
    background: #eff6ff;
    color: #2563eb;
    border: 1px solid #bfdbfe;
    padding: 1px 6px;
    border-radius: 4px;
}

.wie-subtask-arrow {
    font-size: 13px;
    color: #64748b;
    padding: 4px 6px;
    border-radius: 4px;
    text-decoration: none;
    margin-left: 6px;
    transition: color 0.15s, background 0.15s;
}

.wie-subtask-arrow:hover {
    color: #4f46e5;
    background: #e0e7ff;
}

/* ==========================================================================
   Message Footer: Timestamps & Action Buttons (Copy, Edit & Resend)
   ========================================================================== */
.wie-msg-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-top: 8px;
    padding-top: 6px;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.wie-user-message .wie-msg-footer {
    border-top: 1px solid rgba(255, 255, 255, 0.22);
}

.wie-msg-time {
    font-size: 10px;
    font-weight: 500;
    color: #64748b;
    user-select: none;
    letter-spacing: 0.01em;
}

.wie-user-message .wie-msg-time {
    color: rgba(255, 255, 255, 0.85);
}

.wie-msg-actions {
    display: flex;
    align-items: center;
    gap: 4px;
}

.wie-msg-action-btn {
    background: #f1f5f9;
    color: #475569;
    border: 1px solid #e2e8f0;
    padding: 2px 7px;
    border-radius: 6px;
    font-size: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 3px;
    line-height: 1.2;
}

.wie-msg-action-btn:hover {
    background: #e2e8f0;
    color: #0f172a;
    transform: translateY(-1px);
}

.wie-user-message .wie-msg-action-btn {
    background: rgba(255, 255, 255, 0.18);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.wie-user-message .wie-msg-action-btn:hover {
    background: rgba(255, 255, 255, 0.35);
    color: #ffffff;
}

.wie-btn-copied {
    background: #10b981 !important;
    color: #ffffff !important;
    border-color: #10b981 !important;
}

/* ==========================================================================
   Prompt Input Toolbar (Paste, Clear) & Focus Animation
   ========================================================================== */
.wie-input-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 4px 6px 4px;
}

.wie-input-label {
    font-size: 11px;
    font-weight: 600;
    color: #64748b;
}

.wie-input-tools {
    display: flex;
    gap: 6px;
}

.wie-tool-btn {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    color: #475569;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    padding: 3px 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.wie-tool-btn:hover {
    background: #e2e8f0;
    color: #1e293b;
    border-color: #cbd5e1;
}

.wie-prompt-highlight {
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.45) !important;
    border-color: #6366f1 !important;
    animation: wiePulse 0.8s ease-in-out;
}

@keyframes wiePulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.01); }
}

/* ==========================================================================
   Outreach Draft Card
   ========================================================================== */
.wie-outreach-card {
    background: #ffffff;
    border: 1px solid #e0e7ff;
    border-radius: 12px;
    padding: 14px;
    margin-top: 10px;
    box-shadow: 0 4px 14px rgba(99, 102, 241, 0.07);
}

.wie-outreach-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #f1f5f9;
    padding-bottom: 8px;
    margin-bottom: 10px;
}

.wie-outreach-lead-info {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.wie-outreach-contact {
    font-size: 11px;
    color: #64748b;
    font-weight: 500;
}

.wie-outreach-subject {
    font-size: 12px;
    color: #1e293b;
    margin-bottom: 10px;
    padding: 6px 10px;
    background: #f8fafc;
    border-radius: 6px;
    border-left: 3px solid #6366f1;
}

.wie-outreach-body {
    font-size: 12px;
    color: #334155;
    line-height: 1.6;
    background: #fcfcfd;
    padding: 10px;
    border-radius: 8px;
    border: 1px solid #f1f5f9;
    max-height: 250px;
    overflow-y: auto;
}

.wie-outreach-actions {
    margin-top: 10px;
    display: flex;
    justify-content: flex-end;
}

/* ==========================================================================
   Executive Pulse Card
   ========================================================================== */
.wie-pulse-card {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    color: #ffffff;
    border-radius: 14px;
    padding: 16px;
    margin-top: 10px;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.25);
}

.wie-pulse-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 8px;
    margin-bottom: 12px;
}

.wie-pulse-header h4 {
    margin: 0;
    font-size: 14px;
    font-weight: 700;
    color: #f8fafc;
}

.wie-pulse-period {
    font-size: 10px;
    background: rgba(99, 102, 241, 0.3);
    color: #a5b4fc;
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: 600;
}

.wie-pulse-metrics {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-bottom: 12px;
}

.wie-pulse-metric {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    padding: 10px;
}

.wie-pulse-val {
    font-size: 16px;
    font-weight: 700;
    color: #38bdf8;
}

.wie-pulse-lbl {
    font-size: 10px;
    color: #94a3b8;
    margin-top: 2px;
}

.wie-metric-warn .wie-pulse-val {
    color: #fb7185;
}

.wie-pulse-risks {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    padding: 10px;
    font-size: 11px;
}

.wie-pulse-risks-title {
    font-weight: 600;
    color: #cbd5e1;
    margin-bottom: 6px;
}

.wie-pulse-risks ul {
    margin: 0;
    padding-left: 16px;
    color: #94a3b8;
}

.wie-pulse-risks li {
    margin-bottom: 3px;
}

/* Message Footer & Productivity Action Buttons */
.wie-msg-footer {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 6px;
    padding-top: 4px;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    font-size: 11px;
    color: #94a3b8;
}

.wie-msg-footer-user {
    border-top-color: rgba(255, 255, 255, 0.15);
    color: rgba(255, 255, 255, 0.8);
    justify-content: flex-end;
}

.wie-msg-time {
    font-size: 10px;
    opacity: 0.8;
}

.wie-msg-action-btn {
    background: transparent;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 4px;
    padding: 1px 6px;
    font-size: 10px;
    color: #64748b;
    cursor: pointer;
    transition: all 0.15s ease;
}

.wie-msg-action-btn:hover {
    background: #f1f5f9;
    color: #334155;
    border-color: #cbd5e1;
}

.wie-msg-footer-user .wie-msg-action-btn {
    border-color: rgba(255, 255, 255, 0.25);
    color: rgba(255, 255, 255, 0.9);
}

.wie-msg-footer-user .wie-msg-action-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.5);
}

.wie-msg-action-btn.copied {
    background: #10b981 !important;
    color: #ffffff !important;
    border-color: #10b981 !important;
}

/* Prompt Highlight Animation on Edit or Paste */
.wie-prompt-highlight {
    animation: wiePulseBorder 1.2s ease;
}

@keyframes wiePulseBorder {
    0% {
        box-shadow: 0 0 0 0 rgba(99, 102, 241, 0.7);
        border-color: #6366f1;
    }
    50% {
        box-shadow: 0 0 0 6px rgba(99, 102, 241, 0.25);
        border-color: #4f46e5;
    }
    100% {
        box-shadow: 0 0 0 0 rgba(99, 102, 241, 0);
        border-color: #cbd5e1;
    }
}

/* =========================================================================
   Interactive Conversational Wizard ("One-by-One") Component
   ========================================================================= */
.wie-wizard-card {
    background: linear-gradient(145deg, #ffffff 0%, #f8fafc 100%);
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 14px 16px;
    margin-top: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.wie-wizard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.wie-wizard-step-badge {
    background: #e0e7ff;
    color: #4338ca;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 12px;
    letter-spacing: 0.3px;
}

.wie-wizard-flow-name {
    font-size: 11px;
    color: #64748b;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.wie-wizard-progress {
    height: 5px;
    background: #e2e8f0;
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 12px;
}

.wie-wizard-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #6366f1 0%, #8b5cf6 100%);
    border-radius: 3px;
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.wie-wizard-title {
    font-size: 13px;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 4px;
}

.wie-wizard-question {
    font-size: 12.5px;
    color: #475569;
    margin-bottom: 12px;
    line-height: 1.4;
}

.wie-wizard-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
}

.wie-wizard-chip {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    color: #1e293b;
    font-size: 11.5px;
    font-weight: 500;
    padding: 5px 11px;
    border-radius: 16px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: all 0.15s ease;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

.wie-wizard-chip:hover {
    background: #6366f1;
    color: #ffffff;
    border-color: #6366f1;
    transform: translateY(-1px);
    box-shadow: 0 3px 6px rgba(99, 102, 241, 0.25);
}

.wie-wizard-chip:active {
    transform: translateY(0);
}

/* =========================================================================
   Task Details Structured Card (Native CRM Details Panel Mirror)
   ========================================================================= */
.wie-task-details-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 14px 16px;
    margin-top: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.wie-task-details-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 10px;
    border-bottom: 1px solid #f1f5f9;
    margin-bottom: 10px;
}

.wie-task-details-top-left {
    display: flex;
    align-items: center;
    gap: 8px;
}

.wie-task-badge-id {
    background: #3b82f6;
    color: #ffffff;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 6px;
}

.wie-task-title-text {
    font-size: 13.5px;
    font-weight: 600;
    color: #0f172a;
    margin: 0;
}

.wie-task-details-grid {
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-size: 12px;
}

.wie-task-detail-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 3px 0;
}

.wie-task-detail-label {
    color: #64748b;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 120px;
}

.wie-task-detail-value {
    color: #1e293b;
    font-weight: 500;
    text-align: right;
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.wie-priority-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    color: #ffffff;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.wie-label-pill {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 10.5px;
    font-weight: 600;
    color: #ffffff;
    letter-spacing: 0.2px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.wie-points-pill {
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #fde68a;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
