/* ========================================== */
/* ALBO PROMPTS - PROFESSIONAL WORKSPACE CSS */
/* ========================================== */

:root {
    /* ALBO Brand Colors */
    --copilot-blue: #1E3A8A;
    --copilot-blue-light: #3B82F6;
    --copilot-blue-bg: #EEF2FF;
    --copilot-sidebar-bg: #FAFAFB;
    --copilot-white: #FFFFFF;
    --copilot-gray-50: #F9FAFB;
    --copilot-gray-100: #F3F4F6;
    --copilot-gray-200: #E5E7EB;
    --copilot-gray-300: #D1D5DB;
    --copilot-gray-400: #9CA3AF;
    --copilot-gray-500: #6B7280;
    --copilot-gray-600: #4B5563;
    --copilot-gray-700: #374151;
    --copilot-gray-800: #1F2937;
    --copilot-gray-900: #111827;

    --copilot-success: #10B981;
    --copilot-warning: #F59E0B;
    --copilot-error: #EF4444;

    --copilot-sidebar-width: 260px;
}

/* ========================================== */
/* MAIN CONTAINER */
/* ========================================== */

.copilot-container {
    display: flex;
    height: calc(100vh - 180px);
    min-height: 550px;
    background: var(--copilot-white);
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

/* ========================================== */
/* SIDEBAR */
/* ========================================== */

.copilot-sidebar {
    width: var(--copilot-sidebar-width);
    background: var(--copilot-sidebar-bg);
    border-right: 1px solid var(--copilot-gray-200);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    transition: width 0.3s ease, transform 0.3s ease;
}

.copilot-container.sidebar-collapsed .copilot-sidebar {
    width: 0;
    transform: translateX(-100%);
}

/* Back Button (was "Neuer Chat") */
.copilot-new-chat {
    margin: 12px;
    background: var(--copilot-blue);
    color: white;
    border: none;
    border-radius: 6px;
    padding: 10px 14px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: all 0.15s ease;
    font-family: inherit;
}

.copilot-new-chat:hover {
    background: var(--copilot-blue-light);
}

/* Search Box */
.copilot-search {
    margin: 0 12px 12px;
    position: relative;
}

.copilot-search svg {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--copilot-gray-400);
    width: 14px;
    height: 14px;
}

.copilot-search input {
    width: 100%;
    padding: 8px 10px 8px 32px;
    border: 1px solid var(--copilot-gray-200);
    border-radius: 6px;
    font-size: 13px;
    background: var(--copilot-white);
    transition: all 0.15s ease;
    font-family: inherit;
}

.copilot-search input::placeholder {
    color: var(--copilot-gray-400);
}

.copilot-search input:focus {
    outline: none;
    border-color: var(--copilot-blue-light);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Sidebar Content */
.copilot-sidebar-content {
    flex: 1;
    overflow-y: auto;
    padding-bottom: 16px;
}

/* Section Headers */
.copilot-section {
    margin-bottom: 4px;
}

.copilot-section-header {
    padding: 8px 12px 6px;
    font-size: 10px;
    font-weight: 600;
    color: var(--copilot-gray-500);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.copilot-badge {
    background: var(--copilot-blue-light);
    color: white;
    font-size: 8px;
    font-weight: 700;
    padding: 2px 5px;
    border-radius: 3px;
    text-transform: none;
    letter-spacing: 0;
}

/* ========================================== */
/* ROLE ICONS - Letter Circles (Step 5) */
/* ========================================== */

.copilot-role-icon-circle {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
    flex-shrink: 0;
    letter-spacing: 0.5px;
}

/* Prompt Library */
.copilot-prompt-library {
    padding: 0 6px;
}

.copilot-role-wrapper {
    margin-bottom: 2px;
}

.copilot-role-card {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.15s ease;
    border: 1px solid transparent;
}

.copilot-role-card:hover {
    background: var(--copilot-white);
    border-color: var(--copilot-gray-200);
}

.copilot-role-card.expanded {
    background: var(--copilot-gray-100);
    border-color: var(--copilot-gray-200);
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
}

.copilot-role-info {
    flex: 1;
    min-width: 0;
}

.copilot-role-name {
    font-size: 13px;
    font-weight: 500;
    color: var(--copilot-gray-800);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.copilot-role-count {
    font-size: 11px;
    color: var(--copilot-gray-500);
}

.copilot-role-arrow {
    color: var(--copilot-gray-400);
    transition: transform 0.2s ease;
    display: flex;
    align-items: center;
}

.copilot-role-card.expanded .copilot-role-arrow {
    transform: rotate(90deg);
}

/* Role Prompts Dropdown */
.copilot-role-prompts {
    background: var(--copilot-white);
    border: 1px solid var(--copilot-gray-200);
    border-top: none;
    border-radius: 0 0 8px 8px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.copilot-role-prompts.open {
    max-height: 400px;
    overflow-y: auto;
}

/* Categories */
.copilot-category {
    border-top: 1px solid var(--copilot-gray-100);
}

.copilot-category:first-child {
    border-top: none;
}

.copilot-category-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    cursor: pointer;
    transition: background 0.1s ease;
    font-size: 12px;
    color: var(--copilot-gray-600);
}

.copilot-category-header:hover {
    background: var(--copilot-gray-50);
}

.copilot-category-arrow {
    color: var(--copilot-gray-400);
    width: 12px;
    display: flex;
    align-items: center;
}

.copilot-category-name {
    flex: 1;
    font-weight: 500;
}

.copilot-category-count {
    font-size: 11px;
    color: var(--copilot-gray-400);
}

.copilot-category-items {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.2s ease;
}

.copilot-category-items.open {
    max-height: 500px;
}

/* Prompt Items */
.copilot-prompt-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px 8px 28px;
    cursor: pointer;
    transition: all 0.1s ease;
    font-size: 13px;
    color: var(--copilot-gray-700);
    border-left: 2px solid transparent;
}

.copilot-prompt-item:hover {
    background: var(--copilot-gray-50);
    border-left-color: var(--copilot-blue-light);
}

.copilot-prompt-item.selected {
    background: var(--copilot-blue-bg);
    border-left-color: var(--copilot-blue-light);
    color: var(--copilot-blue-light);
    font-weight: 500;
}

.copilot-prompt-dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--copilot-gray-300);
    flex-shrink: 0;
}

.copilot-prompt-item.selected .copilot-prompt-dot {
    background: var(--copilot-blue-light);
}

.copilot-prompt-name {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.copilot-more-prompts {
    padding: 8px 12px 8px 28px;
    font-size: 12px;
    color: var(--copilot-blue-light);
    cursor: pointer;
}

.copilot-more-prompts:hover {
    text-decoration: underline;
}

/* ========================================== */
/* SEARCH RESULTS (Step 6) */
/* ========================================== */

.copilot-search-empty {
    padding: 20px 12px;
    text-align: center;
    color: var(--copilot-gray-400);
    font-size: 13px;
}

.copilot-search-results-header {
    padding: 8px 12px;
    font-size: 11px;
    font-weight: 600;
    color: var(--copilot-gray-500);
    border-bottom: 1px solid var(--copilot-gray-100);
}

.copilot-search-result-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    cursor: pointer;
    transition: all 0.1s ease;
    border-radius: 4px;
    margin: 2px 0;
}

.copilot-search-result-item:hover {
    background: var(--copilot-gray-100);
}

.copilot-search-result-item.selected {
    background: var(--copilot-blue-bg);
}

.copilot-search-result-icon {
    width: 28px;
    height: 28px;
    border-radius: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 700;
    flex-shrink: 0;
}

.copilot-search-result-info {
    flex: 1;
    min-width: 0;
}

.copilot-search-result-name {
    font-size: 13px;
    font-weight: 500;
    color: var(--copilot-gray-800);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.copilot-search-result-role {
    font-size: 11px;
    color: var(--copilot-gray-500);
}

/* User Profile */
.copilot-user-profile {
    padding: 10px 12px;
    border-top: 1px solid var(--copilot-gray-200);
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: auto;
}

.copilot-user-avatar {
    width: 28px;
    height: 28px;
    background: var(--copilot-gray-200);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.copilot-user-avatar svg {
    color: var(--copilot-gray-500);
    width: 16px;
    height: 16px;
}

.copilot-user-info {
    flex: 1;
}

.copilot-user-name {
    font-size: 12px;
    font-weight: 600;
    color: var(--copilot-gray-800);
}

.copilot-user-link {
    font-size: 11px;
    color: var(--copilot-blue-light);
    cursor: pointer;
}

/* Sidebar Collapse */
.copilot-sidebar-collapse {
    position: absolute;
    left: var(--copilot-sidebar-width);
    top: 50%;
    transform: translate(-50%, -50%);
    width: 24px;
    height: 24px;
    background: var(--copilot-white);
    border: 1px solid var(--copilot-gray-200);
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: all 0.15s ease;
}

.copilot-sidebar-collapse:hover {
    background: var(--copilot-gray-50);
    border-color: var(--copilot-gray-300);
}

.copilot-sidebar-collapse svg {
    color: var(--copilot-gray-500);
}

.copilot-container.sidebar-collapsed .copilot-sidebar-collapse {
    left: 0;
    transform: translate(50%, -50%);
}

.copilot-container.sidebar-collapsed .copilot-sidebar-collapse svg {
    transform: rotate(180deg);
}

/* ========================================== */
/* MAIN CONTENT AREA */
/* ========================================== */

.copilot-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: var(--copilot-white);
    min-width: 0;
}

.copilot-chat-area {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    scrollbar-gutter: stable;
}

/* ========================================== */
/* WELCOME SCREEN (Step 1: ALBO Branding) */
/* ========================================== */

.copilot-welcome {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: 30px 40px;
    max-width: 650px;
    margin: 0 auto;
    overflow-y: visible;
}

.copilot-welcome-logo {
    background: linear-gradient(135deg, var(--copilot-blue) 0%, var(--copilot-blue-light) 100%);
    color: white;
    font-size: 18px;
    font-weight: 800;
    padding: 8px 20px;
    border-radius: 8px;
    letter-spacing: 2px;
    margin-bottom: 12px;
}

.copilot-welcome-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--copilot-gray-900);
    margin: 0 0 12px 0;
}

.copilot-welcome-text {
    font-size: 14px;
    color: var(--copilot-gray-600);
    text-align: center;
    line-height: 1.6;
    margin: 0 0 16px 0;
    max-width: 480px;
}

.copilot-welcome-hint {
    font-size: 12px;
    color: var(--copilot-gray-500);
    text-align: center;
    line-height: 1.5;
    padding: 10px 16px;
    background: var(--copilot-gray-50);
    border-radius: 8px;
    border-left: 3px solid var(--copilot-blue-light);
    max-width: 480px;
}

/* ALBO Stats Banner */
.copilot-albo-banner {
    background: linear-gradient(135deg, var(--copilot-blue-bg) 0%, #F0F7FF 100%);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 10px;
    padding: 20px 24px;
    width: 100%;
    max-width: 500px;
    margin-bottom: 16px;
}

.copilot-albo-stats {
    display: flex;
    gap: 0;
    justify-content: space-between;
}

.copilot-albo-stat {
    text-align: center;
    flex: 1;
}

.copilot-albo-stat-value {
    font-size: 22px;
    font-weight: 700;
    color: var(--copilot-blue);
}

.copilot-albo-stat-label {
    font-size: 10px;
    color: var(--copilot-gray-500);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 2px;
}

/* Quick Prompts Grid (6 instead of 4) */
.copilot-quick-prompts {
    width: 100%;
    max-width: 600px;
    margin-top: 8px;
}

.copilot-quick-title {
    font-size: 12px;
    font-weight: 600;
    color: var(--copilot-gray-600);
    margin: 0 0 10px 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.copilot-quick-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.copilot-quick-card {
    background: var(--copilot-white);
    border: 1px solid var(--copilot-gray-200);
    border-radius: 8px;
    padding: 10px 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.copilot-quick-card:hover {
    border-color: var(--copilot-blue-light);
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.12);
    transform: translateY(-1px);
}

.copilot-quick-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 6px;
}

.copilot-quick-icon {
    width: 24px;
    height: 24px;
    border-radius: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 9px;
    font-weight: 700;
}

.copilot-quick-duration {
    font-size: 10px;
    color: var(--copilot-gray-400);
}

.copilot-quick-name {
    font-size: 12px;
    font-weight: 600;
    color: var(--copilot-gray-900);
    margin-bottom: 2px;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.copilot-quick-category {
    font-size: 10px;
    color: var(--copilot-gray-500);
}

/* ========================================== */
/* INPUT AREA */
/* ========================================== */

.copilot-input-area {
    padding: 12px 20px 16px;
    background: var(--copilot-white);
    border-top: 1px solid var(--copilot-gray-100);
}

.copilot-input-container {
    max-width: 600px;
    margin: 0 auto;
}

/* Template Banner */
.copilot-template-banner {
    background: linear-gradient(135deg, #ECFDF5 0%, #F0FDF4 100%);
    border: 1px solid var(--copilot-success);
    border-radius: 8px;
    padding: 10px 12px;
    margin-bottom: 10px;
    display: none;
    align-items: center;
    gap: 10px;
}

.copilot-template-banner.visible {
    display: flex;
}

.copilot-template-icon-circle {
    width: 28px;
    height: 28px;
    background: var(--copilot-success);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.copilot-template-icon-circle svg {
    color: white;
}

.copilot-template-info {
    flex: 1;
}

.copilot-template-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--copilot-gray-800);
}

.copilot-template-source {
    font-size: 11px;
    color: var(--copilot-success);
}

.copilot-template-close {
    background: none;
    border: none;
    color: var(--copilot-gray-400);
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.copilot-template-close:hover {
    background: rgba(0, 0, 0, 0.05);
    color: var(--copilot-gray-600);
}

/* Input Box */
.copilot-input-box {
    background: var(--copilot-white);
    border: 1px solid var(--copilot-gray-200);
    border-radius: 10px;
    transition: all 0.15s ease;
}

.copilot-input-box:focus-within {
    border-color: var(--copilot-blue-light);
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.1);
}

.copilot-input-wrapper {
    display: flex;
    align-items: flex-end;
    padding: 10px 12px;
    gap: 10px;
}

.copilot-input-field {
    flex: 1;
    border: none;
    outline: none;
    font-size: 14px;
    font-family: inherit;
    resize: none;
    max-height: 100px;
    line-height: 1.4;
    color: var(--copilot-gray-800);
}

.copilot-input-field::placeholder {
    color: var(--copilot-gray-400);
}

.copilot-send-btn {
    background: var(--copilot-blue);
    color: white;
    border: none;
    border-radius: 6px;
    width: 32px;
    height: 32px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
    flex-shrink: 0;
}

.copilot-send-btn svg {
    width: 16px;
    height: 16px;
}

.copilot-send-btn:hover {
    background: var(--copilot-blue-light);
}

.copilot-send-btn:disabled {
    background: var(--copilot-gray-300);
    cursor: not-allowed;
}

/* Privacy Note */
.copilot-privacy-note {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    margin-top: 8px;
    font-size: 11px;
    color: var(--copilot-gray-500);
}

.copilot-privacy-note svg {
    width: 12px;
    height: 12px;
    color: var(--copilot-success);
}

.copilot-privacy-note a {
    color: var(--copilot-blue-light);
    text-decoration: none;
}

.copilot-privacy-note a:hover {
    text-decoration: underline;
}

/* ========================================== */
/* MESSAGES */
/* ========================================== */

.copilot-messages {
    max-width: 700px;
    margin: 0 auto;
    padding: 24px;
    width: 100%;
}

.copilot-message {
    margin-bottom: 24px;
    animation: copilot-fadeIn 0.3s ease;
}

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

.copilot-message-user {
    display: flex;
    justify-content: flex-end;
}

.copilot-message-bubble {
    background: var(--copilot-blue);
    color: white;
    border-radius: 16px 16px 4px 16px;
    padding: 12px 16px;
    max-width: 80%;
    font-size: 14px;
    line-height: 1.5;
}

.copilot-message-ai {
    display: flex;
    gap: 12px;
}

.copilot-message-avatar {
    width: 36px;
    height: 36px;
    background: var(--copilot-blue);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.copilot-ai-badge {
    color: white;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.copilot-message-content {
    flex: 1;
    background: var(--copilot-gray-50);
    border-radius: 16px;
    padding: 16px 20px;
    font-size: 14px;
    line-height: 1.7;
}

.copilot-message-content strong {
    color: var(--copilot-gray-900);
}

.copilot-message-sources {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--copilot-gray-200);
}

.copilot-sources-label {
    font-size: 11px;
    font-weight: 600;
    color: var(--copilot-gray-500);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.copilot-source-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--copilot-white);
    border: 1px solid var(--copilot-gray-200);
    padding: 8px 12px;
    border-radius: 6px;
    text-decoration: none;
    color: var(--copilot-blue-light);
    font-size: 12px;
    font-weight: 500;
    margin-right: 8px;
    margin-bottom: 8px;
    transition: all 0.15s ease;
}

.copilot-source-link:hover {
    background: var(--copilot-blue-bg);
    border-color: var(--copilot-blue-light);
}

/* ========================================== */
/* PROMPT DETAIL VIEW */
/* ========================================== */

.copilot-prompt-detail {
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* Header with Letter Circle */
.copilot-prompt-header {
    background: var(--copilot-white);
    padding: 16px 24px;
    border-bottom: 1px solid var(--copilot-gray-200);
    display: flex;
    align-items: center;
    gap: 16px;
}

.copilot-prompt-header-icon-circle {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
    flex-shrink: 0;
    letter-spacing: 0.5px;
}

.copilot-prompt-header-info {
    flex: 1;
}

.copilot-prompt-header-name {
    font-size: 18px;
    font-weight: 600;
    color: var(--copilot-gray-900);
    margin: 0 0 4px 0;
}

.copilot-prompt-header-meta {
    font-size: 13px;
    color: var(--copilot-gray-500);
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.copilot-meta-sep {
    color: var(--copilot-gray-300);
}

.copilot-tag {
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
}

.copilot-tag-fundamental {
    background: #DBEAFE;
    color: #1E40AF;
}

.copilot-tag-erweitert {
    background: #FEF3C7;
    color: #92400E;
}

.copilot-tag-premium {
    background: #F3E8FF;
    color: #7C3AED;
}

.copilot-tag-level {
    background: var(--copilot-gray-100);
    color: var(--copilot-gray-600);
}

/* ========================================== */
/* PROMPT META BAR (Prompt-Typ, Denkstruktur) */
/* ========================================== */

.prompt-meta-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 10px 24px;
    background: var(--copilot-gray-50);
    border-bottom: 1px solid var(--copilot-gray-200);
}

.prompt-meta-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    line-height: 1.3;
}

.prompt-meta-type {
    background: #EDE9FE;
    color: #6D28D9;
}

.prompt-meta-denk {
    background: #DBEAFE;
    color: #1E40AF;
}

/* ========================================== */
/* E-MAIL CONTEXT BLOCK (Step 4) */
/* ========================================== */

.prompt-context-block {
    background: #FFFBEB;
    border-bottom: 1px solid var(--copilot-gray-200);
}

.context-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 24px;
    cursor: pointer;
    transition: background 0.1s ease;
}

.context-header:hover {
    background: rgba(245, 158, 11, 0.08);
}

.context-indicator {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 600;
    color: #B45309;
    white-space: nowrap;
}

.context-indicator svg {
    color: #D97706;
}

.context-meta {
    flex: 1;
    font-size: 12px;
    color: var(--copilot-gray-600);
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    overflow: hidden;
}

.context-from {
    font-weight: 500;
    white-space: nowrap;
}

.context-sep {
    color: var(--copilot-gray-300);
}

.context-subject {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.context-toggle {
    color: var(--copilot-gray-400);
    font-size: 14px;
    flex-shrink: 0;
    transition: transform 0.2s ease;
}

.context-body {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    padding: 0 24px;
}

.context-body.expanded {
    max-height: 300px;
    overflow-y: auto;
    padding: 0 24px 14px;
}

.context-body-text {
    font-size: 13px;
    color: var(--copilot-gray-700);
    line-height: 1.6;
    white-space: pre-wrap;
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 6px;
    border: 1px solid rgba(217, 119, 6, 0.15);
}

.context-task {
    margin-top: 8px;
    padding: 8px 12px;
    background: rgba(59, 130, 246, 0.05);
    border-radius: 6px;
    font-size: 12px;
    color: var(--copilot-gray-700);
    border-left: 3px solid var(--copilot-blue-light);
}

/* ========================================== */
/* PROMPT CONTENT - Split Layout */
/* ========================================== */

.copilot-prompt-content {
    display: grid;
    grid-template-columns: 40% 60%;
    flex: 1;
    overflow: hidden;
}

/* Questions Panel (Left) */
.copilot-questions-panel {
    background: var(--copilot-white);
    padding: 20px;
    overflow-y: auto;
    border-right: 1px solid var(--copilot-gray-200);
}

.copilot-panel-header {
    margin-bottom: 16px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--copilot-gray-200);
}

.copilot-panel-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--copilot-gray-800);
}

.copilot-panel-subtitle {
    font-size: 12px;
    color: var(--copilot-gray-500);
    margin-top: 2px;
}

.copilot-questions-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.copilot-question-item {
    padding: 12px;
    background: var(--copilot-gray-50);
    border-radius: 8px;
    border-left: 3px solid var(--copilot-blue-light);
}

.copilot-question-label {
    font-size: 13px;
    font-weight: 500;
    color: var(--copilot-gray-800);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.copilot-question-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    background: var(--copilot-blue-light);
    color: white;
    border-radius: 50%;
    font-size: 11px;
    font-weight: 600;
    flex-shrink: 0;
}

.copilot-question-input {
    width: 100%;
    padding: 10px 12px;
    border: 1.5px solid var(--copilot-gray-200);
    border-radius: 6px;
    font-size: 13px;
    font-family: inherit;
    background: var(--copilot-white);
    transition: all 0.15s ease;
}

.copilot-question-input:focus {
    outline: none;
    border-color: var(--copilot-blue-light);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.copilot-question-textarea {
    width: 100%;
    min-height: 70px;
    padding: 10px 12px;
    border: 1.5px solid var(--copilot-gray-200);
    border-radius: 6px;
    font-size: 13px;
    font-family: inherit;
    resize: vertical;
    background: var(--copilot-white);
}

.copilot-question-textarea:focus {
    outline: none;
    border-color: var(--copilot-blue-light);
}

.copilot-question-example {
    font-size: 11px;
    color: var(--copilot-gray-500);
    margin-top: 6px;
    font-style: italic;
}

.copilot-additional {
    margin-top: 8px;
    padding-top: 12px;
    border-top: 1px solid var(--copilot-gray-200);
    background: transparent;
    border-left: 3px solid var(--copilot-gray-300);
}

/* ========================================== */
/* EXPERT INTRO - Coaching feel               */
/* ========================================== */

.expert-intro {
    background: linear-gradient(135deg, #EFF6FF 0%, #F0F9FF 100%);
    border: 1px solid rgba(59, 130, 246, 0.15);
    border-radius: 10px;
    padding: 14px 16px;
    margin-bottom: 16px;
}

.expert-intro-header {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 600;
    color: var(--copilot-blue);
    margin-bottom: 8px;
}

.expert-intro-header svg {
    color: var(--copilot-blue-light);
    flex-shrink: 0;
}

.expert-intro-goal {
    font-size: 13px;
    color: var(--copilot-gray-700);
    line-height: 1.6;
    margin: 0 0 8px 0;
}

.expert-intro-outputs {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
}

.expert-intro-outputs-label {
    font-size: 11px;
    font-weight: 600;
    color: var(--copilot-gray-500);
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.expert-output-tag {
    display: inline-block;
    background: white;
    border: 1px solid rgba(59, 130, 246, 0.2);
    color: var(--copilot-blue);
    font-size: 11px;
    font-weight: 500;
    padding: 3px 8px;
    border-radius: 4px;
}

/* ========================================== */
/* PREVIEW PANEL - LIGHT THEME               */
/* ========================================== */

.copilot-preview-panel {
    background: var(--copilot-gray-50);
    padding: 20px;
    overflow-y: auto;
}

.copilot-preview-content {
    font-family: inherit;
    font-size: 13px;
    line-height: 1.7;
    color: var(--copilot-gray-700);
}

/* ========================================== */
/* ACCORDION SECTIONS (collapsible)           */
/* ========================================== */

.accordion-section {
    margin-bottom: 4px;
    border: 1px solid var(--copilot-gray-200);
    border-radius: 8px;
    overflow: hidden;
    background: white;
    transition: box-shadow 0.15s ease;
}

.accordion-section:hover {
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}

.accordion-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    cursor: pointer;
    transition: background 0.1s ease;
    user-select: none;
}

.accordion-header:hover {
    background: var(--copilot-gray-50);
}

.accordion-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 6px;
    background: var(--copilot-blue-bg);
    flex-shrink: 0;
}

.accordion-icon svg {
    color: var(--copilot-blue-light);
}

.accordion-title {
    flex: 1;
    font-size: 13px;
    font-weight: 600;
    color: var(--copilot-gray-800);
}

.accordion-meta {
    font-size: 11px;
    color: var(--copilot-gray-400);
    white-space: nowrap;
}

.accordion-chevron {
    display: flex;
    align-items: center;
    color: var(--copilot-gray-400);
    transition: transform 0.2s ease;
}

.accordion-chevron.rotated {
    transform: rotate(180deg);
}

.accordion-body {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
    padding: 0 14px;
}

.accordion-body.open {
    max-height: 2000px;
    padding: 0 14px 14px;
    overflow-y: auto;
}

/* Simple display for short prompts */
.accordion-simple {
    padding: 8px 0;
}

/* Reference to questions on the left */
.accordion-questions-ref {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    margin-bottom: 8px;
    background: #EFF6FF;
    border: 1px solid rgba(59, 130, 246, 0.15);
    border-radius: 8px;
    font-size: 12px;
    font-weight: 500;
    color: var(--copilot-blue);
}

.accordion-questions-ref svg {
    color: var(--copilot-blue-light);
    flex-shrink: 0;
}

/* ========================================== */
/* FORMATTED PROMPT TEXT (inside accordion)   */
/* ========================================== */

.fmt-section-header {
    font-size: 13px;
    font-weight: 600;
    color: var(--copilot-blue);
    margin: 12px 0 6px 0;
    padding: 4px 8px;
    background: var(--copilot-blue-bg);
    border-radius: 4px;
    border-left: 3px solid var(--copilot-blue-light);
}

.fmt-section-header:first-child {
    margin-top: 0;
}

.fmt-emoji {
    margin-right: 4px;
}

.fmt-header {
    font-weight: 600;
    color: var(--copilot-gray-900);
    margin: 10px 0 4px 0;
}

.fmt-h1 { font-size: 15px; }
.fmt-h2 { font-size: 13px; }
.fmt-h3 { font-size: 12px; color: var(--copilot-gray-700); }

.fmt-paragraph {
    margin: 3px 0;
    color: var(--copilot-gray-700);
    font-size: 12px;
}

.fmt-empty {
    color: var(--copilot-gray-400);
    font-style: italic;
    text-align: center;
    padding: 16px;
}

/* Tables */
.fmt-table-wrapper {
    margin: 8px 0;
    overflow-x: auto;
    border-radius: 6px;
    border: 1px solid var(--copilot-gray-200);
}

.fmt-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 11px;
}

.fmt-table th {
    background: var(--copilot-gray-100);
    padding: 6px 8px;
    text-align: left;
    font-weight: 600;
    color: var(--copilot-gray-800);
    border-bottom: 2px solid var(--copilot-gray-200);
}

.fmt-table td {
    padding: 5px 8px;
    border-bottom: 1px solid var(--copilot-gray-100);
    color: var(--copilot-gray-700);
}

.fmt-table tr:last-child td {
    border-bottom: none;
}

.fmt-table tr:hover td {
    background: rgba(59, 130, 246, 0.03);
}

/* Checklists */
.fmt-checklist {
    list-style: none;
    padding: 0;
    margin: 6px 0;
}

.fmt-check-item {
    padding: 3px 0;
    font-size: 12px;
    color: var(--copilot-gray-700);
}

.fmt-check-item.checked {
    color: var(--copilot-success);
}

.fmt-checkbox {
    margin-right: 6px;
    font-size: 13px;
}

/* Arrow Lists */
.fmt-arrow-list {
    list-style: none;
    padding: 0;
    margin: 4px 0;
}

.fmt-arrow-item {
    padding: 2px 0;
    font-size: 12px;
    color: var(--copilot-gray-700);
}

.fmt-arrow-item::before {
    content: "\2192";
    color: var(--copilot-blue-light);
    margin-right: 6px;
    font-weight: 600;
}

/* Bullet Lists */
.fmt-bullet-list {
    padding-left: 16px;
    margin: 4px 0;
}

.fmt-bullet-list li {
    padding: 2px 0;
    font-size: 12px;
    color: var(--copilot-gray-700);
}

/* Ordered Lists */
.fmt-ordered-list {
    padding-left: 18px;
    margin: 4px 0;
}

.fmt-ordered-list li {
    padding: 2px 0;
    font-size: 12px;
    color: var(--copilot-gray-700);
}

/* ========================================== */
/* ACTION BAR */
/* ========================================== */

.copilot-action-bar {
    background: var(--copilot-white);
    border-top: 1px solid var(--copilot-gray-200);
    padding: 12px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.copilot-completion-badge {
    padding: 6px 12px;
    border-radius: 16px;
    font-size: 12px;
    font-weight: 500;
    background: #FEF3C7;
    color: #92400E;
}

.copilot-completion-badge.copilot-completion-complete {
    background: #D1FAE5;
    color: #065F46;
}

.copilot-action-buttons {
    display: flex;
    gap: 8px;
}

.copilot-btn {
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease;
    font-family: inherit;
    border: none;
    display: flex;
    align-items: center;
    gap: 6px;
}

.copilot-btn-secondary {
    background: var(--copilot-gray-100);
    color: var(--copilot-gray-700);
    border: 1px solid var(--copilot-gray-300);
}

.copilot-btn-secondary:hover {
    background: var(--copilot-gray-200);
}

.copilot-btn-primary {
    background: linear-gradient(135deg, var(--copilot-blue-light) 0%, var(--copilot-blue) 100%);
    color: white;
}

.copilot-btn-primary:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.copilot-btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ========================================== */
/* SCROLLBAR */
/* ========================================== */

.copilot-sidebar-content::-webkit-scrollbar,
.copilot-role-prompts::-webkit-scrollbar,
.copilot-chat-area::-webkit-scrollbar,
.copilot-questions-panel::-webkit-scrollbar,
.copilot-preview-panel::-webkit-scrollbar,
.context-body::-webkit-scrollbar {
    width: 6px;
}

.copilot-sidebar-content::-webkit-scrollbar-track,
.copilot-role-prompts::-webkit-scrollbar-track,
.copilot-chat-area::-webkit-scrollbar-track,
.copilot-questions-panel::-webkit-scrollbar-track,
.copilot-preview-panel::-webkit-scrollbar-track,
.context-body::-webkit-scrollbar-track {
    background: transparent;
}

.copilot-sidebar-content::-webkit-scrollbar-thumb,
.copilot-role-prompts::-webkit-scrollbar-thumb,
.copilot-chat-area::-webkit-scrollbar-thumb,
.copilot-questions-panel::-webkit-scrollbar-thumb,
.copilot-preview-panel::-webkit-scrollbar-thumb,
.context-body::-webkit-scrollbar-thumb {
    background: var(--copilot-gray-300);
    border-radius: 3px;
}

/* ========================================== */
/* RESPONSIVE */
/* ========================================== */

@media (max-width: 1024px) {
    .copilot-prompt-content {
        grid-template-columns: 1fr;
    }

    .copilot-preview-panel {
        display: none;
    }

    .copilot-quick-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .copilot-sidebar {
        position: absolute;
        z-index: 100;
        height: 100%;
    }

    .copilot-container.sidebar-collapsed .copilot-sidebar-collapse {
        left: 16px;
    }

    .copilot-quick-grid {
        grid-template-columns: 1fr;
    }
}

/* ========================================== */
/* RESPONSIVE - HEIGHT */
/* ========================================== */

@media (max-height: 800px) {
    .copilot-container {
        height: calc(100vh - 140px);
    }

    .copilot-welcome {
        padding: 20px 30px;
    }

    .copilot-welcome-logo {
        font-size: 16px;
        padding: 6px 16px;
    }

    .copilot-welcome-title {
        font-size: 20px;
        margin-bottom: 8px;
    }

    .copilot-welcome-text {
        font-size: 13px;
        margin-bottom: 12px;
    }

    .copilot-albo-banner {
        padding: 14px 18px;
    }

    .copilot-albo-stat-value {
        font-size: 18px;
    }

    .copilot-quick-grid {
        gap: 6px;
    }

    .copilot-quick-card {
        padding: 8px 10px;
    }
}

@media (max-height: 700px) {
    .copilot-container {
        height: calc(100vh - 120px);
    }

    .copilot-welcome {
        padding: 16px 24px;
    }

    .copilot-welcome-title {
        font-size: 18px;
    }

    .copilot-albo-stat-value {
        font-size: 16px;
    }

    .copilot-quick-name {
        font-size: 11px;
    }
}

@media (max-height: 600px) {
    .copilot-container {
        height: calc(100vh - 100px);
        min-height: 400px;
    }

    .copilot-welcome {
        padding: 12px 20px;
        justify-content: flex-start;
    }

    .copilot-welcome-title {
        font-size: 16px;
    }
}
