/* Cortex -- Proud Nerds Starter Template
   Design: system fonts, #FFFFFF bg, #111827 text, #D4A017 accent, 8pt grid */

/* -- Reset & Base ------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
    height: 100%;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 15px;
    line-height: 1.6;
    color: #111827;
    background: #FFFFFF;
}

/* -- Main Layout -------------------------------------------------- */
.main {
    display: flex;
    height: 100vh;
}

/* -- Left Navigation Panel ---------------------------------------- */
.nav-panel {
    width: 260px;
    flex-shrink: 0;
    background: #111827;
    color: #FFFFFF;
    display: flex;
    flex-direction: column;
    border-right: 3px solid #F5D45E;
}

#app-nav:empty {
    background: #111827;
    width: 260px;
    flex-shrink: 0;
    border-right: 3px solid #F5D45E;
}

.nav-brand {
    padding: 32px 24px 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.nav-avatar {
    width: 120px;
    height: 120px;
    border-radius: 16px;
    object-fit: cover;
    margin-bottom: 20px;
    box-shadow: 0 4px 24px rgba(122, 190, 248, 0.35);
    border: 2px solid rgba(122, 190, 248, 0.5);
}

.nav-avatar-placeholder {
    width: 120px;
    height: 120px;
    border-radius: 16px;
    margin-bottom: 20px;
    background: linear-gradient(135deg, #D4A017 0%, #F5D45E 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 24px rgba(122, 190, 248, 0.35);
    border: 2px solid rgba(122, 190, 248, 0.5);
}

.nav-avatar-placeholder svg {
    width: 56px;
    height: 56px;
    color: #FFFFFF;
    opacity: 0.9;
}

.nav-title {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 8px;
    letter-spacing: 0.5px;
}

.nav-subtitle {
    font-size: 13px;
    color: #9CA3AF;
    line-height: 1.5;
}

/* -- Nav Menu ----------------------------------------------------- */
.nav-menu {
    flex: 1;
    padding: 8px 12px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    border-radius: 8px;
    color: #9CA3AF;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
}

.nav-item::before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%) scaleY(0);
    width: 3px;
    height: 20px;
    border-radius: 0 3px 3px 0;
    background: #F06000;
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-item:hover {
    color: #FFFFFF;
    background: rgba(122, 190, 248, 0.08);
}

.nav-item:hover .nav-icon {
    color: #F5D45E;
    transform: scale(1.15);
    filter: drop-shadow(0 0 6px rgba(122, 190, 248, 0.4));
}

.nav-item:hover::before {
    transform: translateY(-50%) scaleY(1);
}

.nav-item.active {
    color: #FFFFFF;
    background: rgba(122, 190, 248, 0.12);
}

.nav-item.active::before {
    transform: translateY(-50%) scaleY(1);
    background: #F06000;
}

.nav-item.active .nav-icon {
    color: #F5D45E;
    filter: drop-shadow(0 0 8px rgba(122, 190, 248, 0.5));
    animation: iconPulse 2s ease-in-out infinite;
}

.nav-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    color: #6B7280;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* -- Nav Logout & Footer ------------------------------------------ */
.nav-footer {
    padding: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.nav-item-logout {
    color: #6B7280;
    font-size: 13px;
}

.nav-item-logout:hover {
    color: #F06000;
    background: rgba(240, 96, 0, 0.08);
}

.nav-item-logout:hover .nav-icon {
    color: #F06000;
    filter: drop-shadow(0 0 6px rgba(240, 96, 0, 0.4));
}

.nav-item-logout:hover::before {
    background: #F06000;
}

.nav-footer-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.06);
    margin: 8px 4px;
}

.nav-footer-text {
    font-size: 11px;
    color: #4B5563;
    display: block;
    padding: 4px 14px;
}

/* -- Content Panel ------------------------------------------------ */
.content-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
    overflow: hidden;
    background: #F9FAFB;
}

.content-header {
    position: sticky;
    top: 0;
    z-index: 10;
    background: #FFFFFF;
    padding: 24px 24px 16px;
    border-bottom: 1px solid #E5E7EB;
    flex-shrink: 0;
}

.content-header h2 {
    font-size: 20px;
    font-weight: 700;
    color: #111827;
    margin-bottom: 4px;
}

.content-header p {
    font-size: 14px;
    color: #6B7280;
    line-height: 1.5;
}

.content-body {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
}

/* -- Cards -------------------------------------------------------- */
.card {
    background: #FFFFFF;
    border: 1px solid #E5E7EB;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.card-title {
    font-size: 15px;
    font-weight: 700;
    color: #111827;
    margin-bottom: 8px;
}

.card-value {
    font-size: 32px;
    font-weight: 800;
    color: #D4A017;
    line-height: 1;
}

.card-label {
    font-size: 12px;
    color: #9CA3AF;
    margin-top: 4px;
}

/* -- Dashboard Grid ----------------------------------------------- */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.dashboard-welcome {
    max-width: 640px;
    margin-bottom: 24px;
}

.dashboard-welcome h3 {
    font-size: 16px;
    font-weight: 700;
    color: #111827;
    margin-bottom: 8px;
}

.dashboard-welcome p {
    font-size: 14px;
    color: #4B5563;
    line-height: 1.6;
}

/* -- Tasks -------------------------------------------------------- */
.tasks-list {
    max-width: 640px;
}

.task-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background: #FFFFFF;
    border: 1px solid #E5E7EB;
    border-radius: 10px;
    margin-bottom: 8px;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.task-item:hover {
    border-color: #D4A017;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.08);
}

.task-checkbox {
    width: 20px;
    height: 20px;
    border: 2px solid #D1D5DB;
    border-radius: 6px;
    flex-shrink: 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
}

.task-checkbox.checked {
    background: #D4A017;
    border-color: #D4A017;
}

.task-checkbox.checked svg {
    color: #FFFFFF;
}

.task-checkbox svg {
    width: 14px;
    height: 14px;
    color: transparent;
}

.task-text {
    flex: 1;
    font-size: 14px;
    color: #111827;
}

.task-text.completed {
    text-decoration: line-through;
    color: #9CA3AF;
}

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

.task-badge-high { background: #FEE2E2; color: #991B1B; }
.task-badge-medium { background: #FEF3C7; color: #92400E; }
.task-badge-low { background: #DCFCE7; color: #166534; }

/* -- Buttons ------------------------------------------------------ */
.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 22px;
    background: linear-gradient(135deg, #D4A017 0%, #1E40AF 100%);
    color: #FFFFFF;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 1px 3px rgba(37, 99, 235, 0.25);
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.3);
}

.btn-secondary {
    padding: 10px 22px;
    background: #F3F4F6;
    color: #374151;
    border: 1px solid #D1D5DB;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s;
}

.btn-secondary:hover { background: #E5E7EB; }

/* -- Login Page --------------------------------------------------- */
.login-page {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: #F9FAFB;
}

.login-card {
    background: #FFFFFF;
    border: 1px solid #E5E7EB;
    border-radius: 12px;
    padding: 40px 36px 32px;
    width: 100%;
    max-width: 400px;
    text-align: center;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.login-avatar {
    width: 80px;
    height: 80px;
    border-radius: 12px;
    object-fit: cover;
    margin-bottom: 16px;
    box-shadow: 0 2px 12px rgba(212, 160, 23, 0.25);
    border: 2px solid rgba(212, 160, 23, 0.3);
}

.login-avatar-placeholder {
    width: 80px;
    height: 80px;
    border-radius: 12px;
    margin: 0 auto 16px;
    background: linear-gradient(135deg, #D4A017 0%, #F5D45E 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 12px rgba(212, 160, 23, 0.25);
    border: 2px solid rgba(212, 160, 23, 0.3);
}

.login-avatar-placeholder svg {
    width: 40px;
    height: 40px;
    color: #FFFFFF;
    opacity: 0.9;
}

.login-title {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 4px;
    color: #111827;
}

.login-subtitle {
    font-size: 14px;
    color: #6B7280;
    margin-bottom: 28px;
}

.login-form {
    text-align: left;
}

.login-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 6px;
}

.login-input {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #D1D5DB;
    border-radius: 8px;
    font-size: 15px;
    outline: none;
    transition: border-color 0.15s;
    margin-bottom: 12px;
}
.login-input:focus { border-color: #D4A017; box-shadow: 0 0 0 2px rgba(212, 160, 23, 0.2); }

.login-btn {
    width: 100%;
    padding: 10px 16px;
    background: #D4A017;
    color: #FFFFFF;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.15s;
}
.login-btn:hover { background: #B8860B; }
.login-btn:disabled { background: #9CA3AF; cursor: not-allowed; }

.login-feedback {
    margin-top: 12px;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 14px;
    text-align: center;
}
.login-feedback-success { background: #ECFDF5; color: #065F46; border: 1px solid #A7F3D0; }
.login-feedback-error { background: #FEF2F2; color: #991B1B; border: 1px solid #FECACA; }

.login-divider {
    display: flex;
    align-items: center;
    margin: 20px 0;
    color: #9CA3AF;
    font-size: 13px;
}
.login-divider::before,
.login-divider::after {
    content: "";
    flex: 1;
    border-top: 1px solid #E5E7EB;
}
.login-divider span { padding: 0 12px; }

.login-microsoft-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 10px 16px;
    background: #FFFFFF;
    color: #374151;
    border: 1px solid #D1D5DB;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.15s, border-color 0.15s;
}
.login-microsoft-btn:hover { background: #F9FAFB; border-color: #9CA3AF; }

.login-footer {
    margin-top: 24px;
    font-size: 11px;
    color: #9CA3AF;
}

/* -- Unauthorized Page -------------------------------------------- */
.unauthorized-page {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: #F9FAFB;
}

.unauthorized-card {
    background: #FFFFFF;
    border: 1px solid #E5E7EB;
    border-radius: 12px;
    padding: 40px 36px 32px;
    width: 100%;
    max-width: 440px;
    text-align: center;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.unauthorized-title {
    font-size: 22px;
    font-weight: 700;
    color: #111827;
    margin-bottom: 12px;
}

.unauthorized-text {
    font-size: 14px;
    color: #6B7280;
    margin-bottom: 16px;
    line-height: 1.6;
}

.unauthorized-text a {
    color: #D4A017;
    text-decoration: none;
    font-weight: 500;
}

.unauthorized-text a:hover {
    text-decoration: underline;
}

.unauthorized-reason {
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 14px;
    background: #FEF3C7;
    color: #92400E;
    border: 1px solid #FDE68A;
    margin-bottom: 16px;
}

.unauthorized-back {
    display: inline-block;
    margin-top: 8px;
    padding: 10px 24px;
    background: #D4A017;
    color: #FFFFFF;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 500;
    text-decoration: none;
    transition: background 0.15s;
}

.unauthorized-back:hover {
    background: #B8860B;
}

/* -- Animations --------------------------------------------------- */
@keyframes fadeIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: translateY(0); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes iconPulse {
    0%, 100% { filter: drop-shadow(0 0 8px rgba(122, 190, 248, 0.5)); }
    50% { filter: drop-shadow(0 0 14px rgba(122, 190, 248, 0.8)); }
}

/* -- Info Popover ------------------------------------------------- */
.info-trigger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #E5E7EB;
    color: #6B7280;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    margin-left: 6px;
    vertical-align: middle;
    transition: background 0.15s;
}
.info-trigger:hover { background: #D1D5DB; color: #374151; }

.info-popover {
    max-width: 320px;
    padding: 12px 16px;
    background: #FFFFFF;
    border: 1px solid #E5E7EB;
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    font-size: 13px;
    color: #374151;
    line-height: 1.6;
    z-index: 1000;
}

/* -- Agent Avatar ------------------------------------------------- */
.agent-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: #FFFFFF;
    font-weight: 700;
    flex-shrink: 0;
    line-height: 1;
}

/* -- Score Ring container ----------------------------------------- */
.score-ring-inline { display: inline-block; vertical-align: middle; }

/* -- Chat Bubbles ------------------------------------------------- */
.chat-bubble {
    background: #FFFFFF;
    border: 1px solid #E5E7EB;
    border-left: 4px solid #4A9EFF;
    border-radius: 0 10px 10px 0;
    padding: 14px 18px;
    margin-bottom: 10px;
    animation: fadeIn 0.3s ease;
}

.chat-bubble-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.chat-bubble-name {
    font-size: 13px;
    font-weight: 600;
    color: #374151;
}

.chat-bubble-content {
    font-size: 14px;
    color: #4B5563;
    line-height: 1.7;
}

/* -- Badges ------------------------------------------------------- */
.badge-relevantie {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}
.badge-hoog { background: #FEE2E2; color: #991B1B; }
.badge-midden { background: #FEF3C7; color: #92400E; }
.badge-laag { background: #DCFCE7; color: #166534; }

.badge-type {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 500;
    background: #EFF6FF;
    color: #1E40AF;
}

.badge-status {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}
.badge-status-running { background: #FEF3C7; color: #92400E; }
.badge-status-completed { background: #DCFCE7; color: #166534; }
.badge-status-failed { background: #FEE2E2; color: #991B1B; }

/* -- Loading spinner ---------------------------------------------- */
.loading-spinner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 40px;
    color: #6B7280;
    font-size: 14px;
}

.spinner {
    width: 24px;
    height: 24px;
    border: 3px solid #E5E7EB;
    border-top-color: #D4A017;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

/* -- Quick Start card --------------------------------------------- */
.quick-start {
    background: linear-gradient(135deg, #F9FAFB 0%, #EFF6FF 100%);
    border: 1px solid #DBEAFE;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 24px;
}

.quick-start h3 {
    font-size: 16px;
    font-weight: 700;
    color: #111827;
    margin-bottom: 16px;
}

.quick-start-row {
    display: flex;
    gap: 12px;
    align-items: flex-end;
    flex-wrap: wrap;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.form-group label {
    font-size: 12px;
    font-weight: 600;
    color: #6B7280;
}

.form-select, .form-input, .form-textarea {
    padding: 8px 12px;
    border: 1px solid #D1D5DB;
    border-radius: 8px;
    font-size: 14px;
    background: #FFFFFF;
    color: #111827;
    outline: none;
    transition: border-color 0.15s;
}
.form-select:focus, .form-input:focus, .form-textarea:focus {
    border-color: #D4A017;
    box-shadow: 0 0 0 2px rgba(212, 160, 23, 0.2);
}

.form-textarea {
    resize: vertical;
    min-height: 100px;
    line-height: 1.6;
}

/* -- Chip buttons (example questions) ----------------------------- */
.chip-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.chip {
    display: inline-block;
    padding: 6px 14px;
    background: #FFFFFF;
    border: 1px solid #D1D5DB;
    border-radius: 20px;
    font-size: 13px;
    color: #374151;
    cursor: pointer;
    transition: all 0.15s;
}
.chip:hover {
    background: #EFF6FF;
    border-color: #93C5FD;
    color: #1E40AF;
}

/* -- Experiment list ---------------------------------------------- */
.experiment-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.experiment-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 14px 18px;
    background: #FFFFFF;
    border: 1px solid #E5E7EB;
    border-radius: 10px;
    cursor: pointer;
    transition: border-color 0.15s, box-shadow 0.15s;
    text-decoration: none;
    color: inherit;
}
.experiment-item:hover {
    border-color: #D4A017;
    box-shadow: 0 2px 8px rgba(212, 160, 23, 0.12);
}

.experiment-item-question {
    flex: 1;
    font-size: 14px;
    color: #111827;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.4;
}

.experiment-item-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 12px;
    color: #6B7280;
    flex-shrink: 0;
}

/* -- Tabs --------------------------------------------------------- */
.tabs {
    display: flex;
    border-bottom: 2px solid #E5E7EB;
    margin-bottom: 24px;
}

.tab-btn {
    padding: 10px 20px;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    font-size: 14px;
    font-weight: 500;
    color: #6B7280;
    cursor: pointer;
    transition: all 0.15s;
}
.tab-btn:hover { color: #111827; }
.tab-btn.active {
    color: #D4A017;
    border-bottom-color: #D4A017;
    font-weight: 600;
}

.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* -- Iteration blocks --------------------------------------------- */
.iteration-block {
    background: #FFFFFF;
    border: 1px solid #E5E7EB;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
}

.iteration-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid #F3F4F6;
}

.iteration-title {
    font-size: 15px;
    font-weight: 700;
    color: #111827;
}

.iteration-guest {
    padding: 10px 14px;
    background: #FFFBEB;
    border: 1px solid #FDE68A;
    border-radius: 8px;
    margin-bottom: 14px;
    font-size: 13px;
    color: #92400E;
}

/* -- Collapsible meta cards --------------------------------------- */
.meta-card {
    background: #F9FAFB;
    border: 1px solid #E5E7EB;
    border-radius: 8px;
    margin-top: 12px;
}

.meta-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    color: #6B7280;
}
.meta-card-header:hover { color: #374151; }

.meta-card-body {
    padding: 0 14px 14px;
    font-size: 13px;
    color: #4B5563;
    line-height: 1.7;
    display: none;
}
.meta-card.open .meta-card-body { display: block; }

.meta-card-toggle {
    font-size: 12px;
    transition: transform 0.2s;
}
.meta-card.open .meta-card-toggle { transform: rotate(180deg); }

/* -- Synthesis card ----------------------------------------------- */
.synthesis-card {
    background: #FFFFFF;
    border: 2px solid #D4A017;
    border-radius: 12px;
    padding: 24px;
    margin-top: 24px;
}

.synthesis-card h3 {
    font-size: 16px;
    font-weight: 700;
    color: #D4A017;
    margin-bottom: 12px;
}

.synthesis-content {
    font-size: 14px;
    color: #374151;
    line-height: 1.8;
}

/* -- Finding cards ------------------------------------------------ */
.finding-card {
    background: #FFFFFF;
    border: 1px solid #E5E7EB;
    border-radius: 10px;
    padding: 16px;
    margin-bottom: 10px;
}

.finding-card-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.finding-card-text {
    font-size: 14px;
    color: #374151;
    line-height: 1.6;
}

.finding-card-recommendation {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid #F3F4F6;
    font-size: 13px;
    color: #6B7280;
}

.finding-card-onderbouwing {
    margin-top: 8px;
    padding: 8px 12px;
    background: #F0F9FF;
    border-left: 3px solid #0EA5E9;
    border-radius: 4px;
    font-size: 13px;
    color: #0C4A6E;
    line-height: 1.5;
}

.finding-herformulering {
    width: 100%;
    box-sizing: border-box;
    font-family: inherit;
    font-size: 14px;
    line-height: 1.5;
}

/* -- Vraaganalyse card -------------------------------------------- */
.vraaganalyse-card {
    background: #F0F9FF;
    border: 1px solid #BAE6FD;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
}

.vraaganalyse-card h3 {
    font-size: 15px;
    font-weight: 700;
    color: #0369A1;
    margin-bottom: 12px;
}

.vraaganalyse-field {
    margin-bottom: 8px;
}

.vraaganalyse-label {
    font-size: 12px;
    font-weight: 600;
    color: #0369A1;
    text-transform: uppercase;
}

.vraaganalyse-value {
    font-size: 14px;
    color: #374151;
    line-height: 1.6;
}

/* -- Experiment detail header ------------------------------------- */
.exp-header {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    flex-wrap: wrap;
}

.exp-header h2 { flex: 1; min-width: 200px; line-height: 1.4; }

/* -- Card grid for analyses --------------------------------------- */
.card-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.card-grid .card {
    min-height: 180px;
    display: flex;
    flex-direction: column;
}

.card-grid .card { cursor: pointer; transition: border-color 0.15s, box-shadow 0.15s; }
.card-grid .card:hover {
    border-color: #D4A017;
    box-shadow: 0 2px 8px rgba(212, 160, 23, 0.12);
}

.card-agents-count {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 8px;
    font-size: 12px;
    color: #6B7280;
}

/* -- Wizard steps ------------------------------------------------- */
.wizard-steps {
    display: flex;
    gap: 0;
    margin-bottom: 32px;
    border-bottom: 2px solid #E5E7EB;
    overflow-x: auto;
}

.wizard-step {
    padding: 12px 20px;
    font-size: 13px;
    font-weight: 500;
    color: #9CA3AF;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    white-space: nowrap;
    cursor: default;
}
.wizard-step.active {
    color: #D4A017;
    border-bottom-color: #D4A017;
    font-weight: 600;
}
.wizard-step.completed {
    color: #22C55E;
}

.wizard-panel { display: none; }
.wizard-panel.active { display: block; }

.wizard-nav {
    display: flex;
    justify-content: space-between;
    margin-top: 24px;
    padding-top: 16px;
    border-top: 1px solid #E5E7EB;
}

/* -- Agent editor cards ------------------------------------------- */
.agent-editor-card {
    background: #F9FAFB;
    border: 1px solid #E5E7EB;
    border-radius: 10px;
    padding: 16px;
    margin-bottom: 12px;
}

.agent-editor-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.agent-editor-fields {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.agent-editor-fields .form-group.full-width {
    grid-column: 1 / -1;
}

.btn-danger {
    padding: 6px 14px;
    background: #FEE2E2;
    color: #991B1B;
    border: 1px solid #FECACA;
    border-radius: 6px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.15s;
}
.btn-danger:hover { background: #FECACA; }

.btn-sm {
    padding: 6px 14px;
    font-size: 12px;
    border-radius: 6px;
}

/* -- Empty state -------------------------------------------------- */
.empty-state {
    text-align: center;
    padding: 48px 24px;
    color: #9CA3AF;
}
.empty-state p { font-size: 14px; margin-bottom: 16px; }

/* -- Progress bar (for running experiments) ----------------------- */
.progress-bar-container {
    background: #E5E7EB;
    border-radius: 8px;
    height: 6px;
    overflow: hidden;
    margin: 8px 0;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #D4A017, #F5D45E);
    border-radius: 8px;
    transition: width 0.5s ease;
    animation: progressPulse 2s ease-in-out infinite;
}

@keyframes progressPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

/* -- Live Chat View ----------------------------------------------- */
.live-container {
    display: flex;
    height: calc(100vh - 140px);
    gap: 0;
}

.live-legend {
    width: 200px;
    flex-shrink: 0;
    background: #FFFFFF;
    border-right: 1px solid #E5E7EB;
    padding: 16px;
    overflow-y: auto;
}

.live-legend-title {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    color: #6B7280;
    margin-bottom: 12px;
}

.live-legend-subtitle {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    color: #92400E;
    margin-top: 16px;
    margin-bottom: 8px;
}

.legend-agent {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 0;
    font-size: 13px;
    color: #374151;
}

.legend-guest {
    border-left: 3px solid #F59E0B;
    padding-left: 8px;
    margin-left: -3px;
}

.legend-agent-new {
    animation: legendSlideIn 0.4s ease;
}

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

.live-chat {
    flex: 1;
    overflow-y: auto;
    padding: 20px 24px;
    scroll-behavior: smooth;
}

.live-system-event {
    text-align: center;
    padding: 12px 16px;
    margin: 10px auto;
    max-width: 500px;
    background: #F0F9FF;
    border: 1px solid #BAE6FD;
    border-radius: 10px;
    font-size: 13px;
    color: #0369A1;
}

.live-error-event {
    background: #FEF2F2;
    border-color: #FECACA;
    color: #991B1B;
    font-weight: 600;
}

.live-guest-announce {
    text-align: center;
    padding: 12px 16px;
    margin: 10px auto;
    max-width: 500px;
    background: #FFFBEB;
    border: 1px solid #FDE68A;
    border-radius: 10px;
    font-size: 13px;
    color: #78350F;
    animation: fadeIn 0.3s ease;
}

.live-stability-event {
    text-align: center;
    padding: 12px 16px;
    margin: 10px auto;
    max-width: 400px;
    background: #F9FAFB;
    border: 1px solid #E5E7EB;
    border-radius: 10px;
    font-size: 13px;
}

.live-iteration-divider {
    display: flex;
    align-items: center;
    margin: 20px 0 12px;
    color: #9CA3AF;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.live-iteration-divider::before,
.live-iteration-divider::after {
    content: "";
    flex: 1;
    border-top: 1px solid #E5E7EB;
}

.live-iteration-divider span {
    padding: 0 12px;
}

.live-completion-banner {
    text-align: center;
    padding: 24px;
    margin: 16px auto;
    max-width: 400px;
    background: linear-gradient(135deg, #ECFDF5 0%, #F0FDF4 100%);
    border: 2px solid #22C55E;
    border-radius: 12px;
    color: #166534;
    animation: fadeIn 0.5s ease;
}

.chat-bubble-right {
    margin-left: auto;
    margin-right: 0;
    max-width: 80%;
    border-left: none;
    border-right: 4px solid #4A9EFF;
    border-radius: 10px 0 0 10px;
    text-align: left;
}

/* -- Breadcrumb --------------------------------------------------- */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: #9CA3AF;
    margin-bottom: 8px;
}

.breadcrumb a {
    color: #6B7280;
    text-decoration: none;
    transition: color 0.15s;
}

.breadcrumb a:hover {
    color: #D4A017;
    text-decoration: underline;
}

.breadcrumb-sep {
    color: #D1D5DB;
}

/* -- Dashboard ---------------------------------------------------- */
.dashboard-container {
    max-width: 1280px;
}

.dashboard-intro {
    margin-bottom: 24px;
    max-width: 720px;
}

.dashboard-intro p {
    font-size: 14px;
    color: #4B5563;
    line-height: 1.6;
    margin-bottom: 8px;
}

.dashboard-more-info {
    font-size: 13px;
    font-weight: 500;
    color: #D4A017;
    text-decoration: none;
}
.dashboard-more-info:hover {
    text-decoration: underline;
}

.stats-bar {
    display: flex;
    align-items: center;
    gap: 0;
    background: #FFFFFF;
    border: 1px solid #E5E7EB;
    border-radius: 10px;
    padding: 12px 24px;
    margin-bottom: 24px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.stats-bar-item {
    display: flex;
    align-items: baseline;
    gap: 6px;
}

.stats-bar-value {
    font-size: 22px;
    font-weight: 800;
    color: #D4A017;
}

.stats-bar-label {
    font-size: 13px;
    color: #6B7280;
}

.stats-bar-divider {
    width: 1px;
    height: 28px;
    background: #E5E7EB;
    margin: 0 20px;
}

.dashboard-cases-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.dashboard-cases-header h3 {
    font-size: 16px;
    font-weight: 700;
    color: #111827;
}

/* -- Responsive --------------------------------------------------- */
@media (max-width: 900px) {
    .nav-panel {
        position: fixed;
        left: -260px;
        top: 0;
        bottom: 0;
        z-index: 200;
        transition: left 0.25s ease;
    }
    .nav-panel.open {
        left: 0;
    }
    .agent-editor-fields {
        grid-template-columns: 1fr;
    }
    .card-grid {
        grid-template-columns: 1fr;
    }
}

@media (min-width: 901px) and (max-width: 1200px) {
    .card-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
