/* /Components/Layout/MainLayout.razor.rz.scp.css */
/* ── Blazor Error UI ──────────────────────────────────────────── */
#blazor-error-ui[b-3lf6m59o2z] {
    color-scheme: light only;
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    box-sizing: border-box;
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

    #blazor-error-ui .dismiss[b-3lf6m59o2z] {
        cursor: pointer;
        position: absolute;
        right: 0.75rem;
        top: 0.5rem;
    }

/* ── Copilot FAB ────────────────────────────────────────────── */
.copilot-fab[b-3lf6m59o2z] {
    position: fixed;
    bottom: 28px;
    right: 28px;
    width: 56px;
    height: 56px;
    border-radius: 16px;
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 1200;
    box-shadow: 0 4px 20px rgba(16, 185, 129, 0.35), 0 0 0 0 rgba(16, 185, 129, 0.4);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    animation: copilotPulse-b-3lf6m59o2z 3s ease-in-out infinite;
}

.copilot-fab:hover[b-3lf6m59o2z] {
    transform: scale(1.08);
    box-shadow: 0 6px 28px rgba(16, 185, 129, 0.45);
    animation: none;
}

.copilot-fab.hidden[b-3lf6m59o2z] {
    opacity: 0;
    pointer-events: none;
    transform: scale(0.8);
}

@keyframes copilotPulse-b-3lf6m59o2z {
    0%, 100% {
        box-shadow: 0 4px 20px rgba(16, 185, 129, 0.35), 0 0 0 0 rgba(16, 185, 129, 0.3);
    }
    50% {
        box-shadow: 0 4px 20px rgba(16, 185, 129, 0.35), 0 0 0 10px rgba(16, 185, 129, 0);
    }
}
/* /Components/Layout/NavMenu.razor.rz.scp.css */
.navbar-toggler[b-n9ipz5gnaq] {
    appearance: none;
    cursor: pointer;
    width: 3.5rem;
    height: 2.5rem;
    color: white;
    position: absolute;
    top: 0.5rem;
    right: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255, 255, 255, 0.55%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e") no-repeat center/1.75rem rgba(255, 255, 255, 0.1);
}

.navbar-toggler:checked[b-n9ipz5gnaq] {
    background-color: rgba(255, 255, 255, 0.5);
}

.top-row[b-n9ipz5gnaq] {
    min-height: 3.5rem;
    background-color: rgba(0,0,0,0.4);
}

.navbar-brand[b-n9ipz5gnaq] {
    font-size: 1.1rem;
}

.bi[b-n9ipz5gnaq] {
    display: inline-block;
    position: relative;
    width: 1.25rem;
    height: 1.25rem;
    margin-right: 0.75rem;
    top: -1px;
    background-size: cover;
}

.bi-house-door-fill-nav-menu[b-n9ipz5gnaq] {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='white' class='bi bi-house-door-fill' viewBox='0 0 16 16'%3E%3Cpath d='M6.5 14.5v-3.505c0-.245.25-.495.5-.495h2c.25 0 .5.25.5.5v3.5a.5.5 0 0 0 .5.5h4a.5.5 0 0 0 .5-.5v-7a.5.5 0 0 0-.146-.354L13 5.793V2.5a.5.5 0 0 0-.5-.5h-1a.5.5 0 0 0-.5.5v1.293L8.354 1.146a.5.5 0 0 0-.708 0l-6 6A.5.5 0 0 0 1.5 7.5v7a.5.5 0 0 0 .5.5h4a.5.5 0 0 0 .5-.5Z'/%3E%3C/svg%3E");
}

.bi-plus-square-fill-nav-menu[b-n9ipz5gnaq] {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='white' class='bi bi-plus-square-fill' viewBox='0 0 16 16'%3E%3Cpath d='M2 0a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V2a2 2 0 0 0-2-2H2zm6.5 4.5v3h3a.5.5 0 0 1 0 1h-3v3a.5.5 0 0 1-1 0v-3h-3a.5.5 0 0 1 0-1h3v-3a.5.5 0 0 1 1 0z'/%3E%3C/svg%3E");
}

.bi-list-nested-nav-menu[b-n9ipz5gnaq] {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='white' class='bi bi-list-nested' viewBox='0 0 16 16'%3E%3Cpath fill-rule='evenodd' d='M4.5 11.5A.5.5 0 0 1 5 11h10a.5.5 0 0 1 0 1H5a.5.5 0 0 1-.5-.5zm-2-4A.5.5 0 0 1 3 7h10a.5.5 0 0 1 0 1H3a.5.5 0 0 1-.5-.5zm-2-4A.5.5 0 0 1 1 3h10a.5.5 0 0 1 0 1H1a.5.5 0 0 1-.5-.5z'/%3E%3C/svg%3E");
}

.nav-item[b-n9ipz5gnaq] {
    font-size: 0.9rem;
    padding-bottom: 0.5rem;
}

    .nav-item:first-of-type[b-n9ipz5gnaq] {
        padding-top: 1rem;
    }

    .nav-item:last-of-type[b-n9ipz5gnaq] {
        padding-bottom: 1rem;
    }

    .nav-item[b-n9ipz5gnaq]  .nav-link {
        color: #d7d7d7;
        background: none;
        border: none;
        border-radius: 4px;
        height: 3rem;
        display: flex;
        align-items: center;
        line-height: 3rem;
        width: 100%;
    }

.nav-item[b-n9ipz5gnaq]  a.active {
    background-color: rgba(255,255,255,0.37);
    color: white;
}

.nav-item[b-n9ipz5gnaq]  .nav-link:hover {
    background-color: rgba(255,255,255,0.1);
    color: white;
}

.nav-scrollable[b-n9ipz5gnaq] {
    display: none;
}

.navbar-toggler:checked ~ .nav-scrollable[b-n9ipz5gnaq] {
    display: block;
}

@media (min-width: 641px) {
    .navbar-toggler[b-n9ipz5gnaq] {
        display: none;
    }

    .nav-scrollable[b-n9ipz5gnaq] {
        /* Never collapse the sidebar for wide screens */
        display: block;

        /* Allow sidebar to scroll for tall menus */
        height: calc(100vh - 3.5rem);
        overflow-y: auto;
    }
}
/* /Components/Layout/ReconnectModal.razor.rz.scp.css */
.components-reconnect-first-attempt-visible[b-4g2f75uryi],
.components-reconnect-repeated-attempt-visible[b-4g2f75uryi],
.components-reconnect-failed-visible[b-4g2f75uryi],
.components-pause-visible[b-4g2f75uryi],
.components-resume-failed-visible[b-4g2f75uryi],
.components-rejoining-animation[b-4g2f75uryi] {
    display: none;
}

#components-reconnect-modal.components-reconnect-show .components-reconnect-first-attempt-visible[b-4g2f75uryi],
#components-reconnect-modal.components-reconnect-show .components-rejoining-animation[b-4g2f75uryi],
#components-reconnect-modal.components-reconnect-paused .components-pause-visible[b-4g2f75uryi],
#components-reconnect-modal.components-reconnect-resume-failed .components-resume-failed-visible[b-4g2f75uryi],
#components-reconnect-modal.components-reconnect-retrying[b-4g2f75uryi],
#components-reconnect-modal.components-reconnect-retrying .components-reconnect-repeated-attempt-visible[b-4g2f75uryi],
#components-reconnect-modal.components-reconnect-retrying .components-rejoining-animation[b-4g2f75uryi],
#components-reconnect-modal.components-reconnect-failed[b-4g2f75uryi],
#components-reconnect-modal.components-reconnect-failed .components-reconnect-failed-visible[b-4g2f75uryi] {
    display: block;
}

#components-reconnect-modal[b-4g2f75uryi] {
    background-color: var(--mud-palette-surface, #141720);
    color: var(--mud-palette-text-primary, #f1f5f9);
    width: 22rem;
    margin: 20vh auto;
    padding: 2.5rem 2rem;
    border: 1px solid var(--mud-palette-lines-default, rgba(16, 185, 129, 0.2));
    border-radius: 1rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    opacity: 0;
    transition: display 0.5s allow-discrete, overlay 0.5s allow-discrete;
    animation: components-reconnect-modal-fadeOutOpacity-b-4g2f75uryi 0.5s both;

    &[open] {
        animation: components-reconnect-modal-slideUp-b-4g2f75uryi 1.5s cubic-bezier(.05, .89, .25, 1.02) 0.3s,
                   components-reconnect-modal-fadeInOpacity-b-4g2f75uryi 0.5s ease-in-out 0.3s;
        animation-fill-mode: both;
    }
}

#components-reconnect-modal[b-4g2f75uryi]::backdrop {
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    animation: components-reconnect-modal-fadeInOpacity-b-4g2f75uryi 0.5s ease-in-out;
    opacity: 1;
}

@keyframes components-reconnect-modal-slideUp-b-4g2f75uryi {
    0% { transform: translateY(30px) scale(0.95); }
    100% { transform: translateY(0); }
}

@keyframes components-reconnect-modal-fadeInOpacity-b-4g2f75uryi {
    0% { opacity: 0; }
    100% { opacity: 1; }
}

@keyframes components-reconnect-modal-fadeOutOpacity-b-4g2f75uryi {
    0% { opacity: 1; }
    100% { opacity: 0; }
}

.components-reconnect-container[b-4g2f75uryi] {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

#components-reconnect-modal p[b-4g2f75uryi] {
    margin: 0;
    text-align: center;
    color: var(--mud-palette-text-secondary, #94a3b8);
    font-size: 0.95rem;
    line-height: 1.6;
}

#components-reconnect-modal button[b-4g2f75uryi] {
    border: none;
    background-color: #10b981;
    color: #fff;
    padding: 8px 28px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.85rem;
    letter-spacing: 0.04em;
    cursor: pointer;
    transition: background-color 0.2s;
}

#components-reconnect-modal button:hover[b-4g2f75uryi] {
    background-color: #059669;
}

#components-reconnect-modal button:active[b-4g2f75uryi] {
    background-color: #34d399;
}

.components-rejoining-animation[b-4g2f75uryi] {
    position: relative;
    width: 80px;
    height: 80px;
}

.components-rejoining-animation div[b-4g2f75uryi] {
    position: absolute;
    border: 3px solid #10b981;
    opacity: 1;
    border-radius: 50%;
    animation: components-rejoining-animation-b-4g2f75uryi 1.5s cubic-bezier(0, 0.2, 0.8, 1) infinite;
}

.components-rejoining-animation div:nth-child(2)[b-4g2f75uryi] {
    animation-delay: -0.5s;
}

@keyframes components-rejoining-animation-b-4g2f75uryi {
    0% { top: 40px; left: 40px; width: 0; height: 0; opacity: 0; }
    4.9% { top: 40px; left: 40px; width: 0; height: 0; opacity: 0; }
    5% { top: 40px; left: 40px; width: 0; height: 0; opacity: 1; }
    100% { top: 0; left: 0; width: 80px; height: 80px; opacity: 0; }
}
/* /Features/Copilot/Pages/CopilotPanel.razor.rz.scp.css */
/* ── Overlay ─────────────────────────────────────────────────── */
.copilot-overlay[b-phj5t6p793] {
    position: fixed;
    inset: 0;
    background: var(--papyrus-overlay-strong);
    backdrop-filter: blur(2px);
    z-index: 1299;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.copilot-overlay.open[b-phj5t6p793] {
    opacity: 1;
    pointer-events: auto;
}

/* ── Panel ──────────────────────────────────────────────────── */
.copilot-panel[b-phj5t6p793] {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: var(--copilot-width, 420px);
    min-width: 360px;
    max-width: 92vw;
    background: var(--mud-palette-surface);
    border-left: 1px solid rgba(16, 185, 129, 0.2);
    box-shadow: -8px 0 32px rgba(0, 0, 0, 0.4), -1px 0 0 rgba(16, 185, 129, 0.15);
    z-index: 1300;
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: 'DM Sans', system-ui, sans-serif;
}

.copilot-panel.open[b-phj5t6p793] {
    transform: translateX(0);
}

/* ── Collapsed rail state ──────────────────────────────────── */
.copilot-panel.collapsed[b-phj5t6p793] {
    width: 48px !important;
    min-width: 48px;
    border-left: 1px solid rgba(16, 185, 129, 0.3);
    overflow: hidden;
    cursor: pointer;
}

.copilot-panel.collapsed .copilot-header[b-phj5t6p793],
.copilot-panel.collapsed .copilot-messages[b-phj5t6p793],
.copilot-panel.collapsed .copilot-input-area[b-phj5t6p793],
.copilot-panel.collapsed .copilot-resize-handle[b-phj5t6p793] {
    display: none;
}

.copilot-rail[b-phj5t6p793] {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding-top: 16px;
    gap: 14px;
    height: 100%;
    color: var(--papyrus-text-muted);
}

.copilot-panel.collapsed .copilot-rail[b-phj5t6p793] {
    display: flex;
}

.copilot-rail-icon[b-phj5t6p793] {
    width: 32px;
    height: 32px;
    border-radius: 10px;
    background: linear-gradient(135deg, #10b981, #059669);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
}

.copilot-rail-label[b-phj5t6p793] {
    writing-mode: vertical-rl;
    transform: rotate(180deg);
    font-size: 0.7rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--papyrus-text-muted);
    margin-top: 4px;
}

/* ── Resize handle ─────────────────────────────────────────── */
.copilot-resize-handle[b-phj5t6p793] {
    position: absolute;
    top: 0;
    bottom: 0;
    left: -4px;
    width: 8px;
    cursor: col-resize;
    z-index: 10;
    background: transparent;
    transition: background 0.15s;
}

.copilot-resize-handle:hover[b-phj5t6p793],
.copilot-resize-handle.active[b-phj5t6p793] {
    background: #10b981;
    opacity: 0.5;
}

/* ── Header ─────────────────────────────────────────────────── */
.copilot-header[b-phj5t6p793] {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--papyrus-border-subtle);
    background: var(--papyrus-appbar-bg);
    backdrop-filter: blur(12px);
}

.copilot-ai-icon[b-phj5t6p793] {
    width: 32px;
    height: 32px;
    border-radius: 10px;
    background: linear-gradient(135deg, #10b981, #059669);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
}

[b-phj5t6p793] .copilot-title {
    color: var(--papyrus-text-strong);
    font-weight: 600;
    letter-spacing: -0.01em;
}

[b-phj5t6p793] .copilot-header-btn {
    color: var(--papyrus-text-muted) !important;
}

[b-phj5t6p793] .copilot-header-btn:hover {
    color: var(--papyrus-text-strong) !important;
    background: var(--papyrus-hover-bg) !important;
}

/* ── Messages area ──────────────────────────────────────────── */
.copilot-messages[b-phj5t6p793] {
    flex: 1;
    overflow-y: auto;
    padding: 20px 16px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    scrollbar-width: thin;
    scrollbar-color: var(--papyrus-scrollbar-thumb) transparent;
}

.copilot-messages[b-phj5t6p793]::-webkit-scrollbar {
    width: 4px;
}

.copilot-messages[b-phj5t6p793]::-webkit-scrollbar-track {
    background: transparent;
}

.copilot-messages[b-phj5t6p793]::-webkit-scrollbar-thumb {
    background: var(--papyrus-scrollbar-thumb);
    border-radius: 4px;
}

/* ── Message rows ───────────────────────────────────────────── */
.copilot-msg[b-phj5t6p793] {
    display: flex;
    gap: 10px;
    animation: copilotFadeIn-b-phj5t6p793 0.3s ease;
}

.copilot-msg-user[b-phj5t6p793] {
    justify-content: flex-end;
}

.copilot-msg-assistant[b-phj5t6p793] {
    justify-content: flex-start;
}

.copilot-msg-avatar[b-phj5t6p793] {
    width: 28px;
    height: 28px;
    min-width: 28px;
    border-radius: 8px;
    background: linear-gradient(135deg, #10b981, #059669);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    margin-top: 2px;
}

/* ── Bubbles ────────────────────────────────────────────────── */
.copilot-bubble-user[b-phj5t6p793] {
    background: linear-gradient(135deg, #10b981, #059669);
    color: #ffffff;
    border-radius: 16px 16px 4px 16px;
    padding: 10px 16px;
    max-width: 85%;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.2);
}

.copilot-bubble-assistant[b-phj5t6p793] {
    background: var(--papyrus-panel-bg);
    color: var(--papyrus-text-soft);
    border-radius: 16px 16px 16px 4px;
    padding: 10px 16px;
    max-width: 92%;
    border: 1px solid var(--papyrus-border-subtle);
}

[b-phj5t6p793] .copilot-msg-text {
    word-break: break-word;
    line-height: 1.6;
    font-size: 0.85rem;
}

/* ── Markdig-rendered content inside assistant bubbles ────── */
[b-phj5t6p793] .copilot-msg-text p {
    margin: 0 0 8px 0;
}

[b-phj5t6p793] .copilot-msg-text p:last-child {
    margin-bottom: 0;
}

[b-phj5t6p793] .copilot-msg-text h1,
[b-phj5t6p793] .copilot-msg-text h2,
[b-phj5t6p793] .copilot-msg-text h3,
[b-phj5t6p793] .copilot-msg-text h4 {
    color: var(--papyrus-text-strong);
    font-weight: 600;
    margin: 12px 0 6px 0;
    line-height: 1.3;
}

[b-phj5t6p793] .copilot-msg-text h1 { font-size: 1.05rem; }
[b-phj5t6p793] .copilot-msg-text h2 { font-size: 1rem; }
[b-phj5t6p793] .copilot-msg-text h3 { font-size: 0.95rem; }
[b-phj5t6p793] .copilot-msg-text h4 { font-size: 0.9rem; }

[b-phj5t6p793] .copilot-msg-text ul,
[b-phj5t6p793] .copilot-msg-text ol {
    margin: 6px 0 8px 0;
    padding-left: 22px;
}

[b-phj5t6p793] .copilot-msg-text li {
    margin-bottom: 4px;
    line-height: 1.5;
}

[b-phj5t6p793] .copilot-msg-text a {
    color: #10b981;
    text-decoration: underline;
    text-underline-offset: 2px;
}

[b-phj5t6p793] .copilot-msg-text a:hover {
    color: #059669;
}

[b-phj5t6p793] .copilot-msg-text strong {
    color: var(--papyrus-text-strong);
    font-weight: 600;
}

[b-phj5t6p793] .copilot-msg-text em {
    color: var(--papyrus-text-soft);
}

[b-phj5t6p793] .copilot-msg-text code {
    background: var(--papyrus-panel-bg-strong);
    color: #10b981;
    padding: 1px 6px;
    border-radius: 4px;
    font-size: 0.78rem;
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    border: 1px solid rgba(16, 185, 129, 0.15);
}

[b-phj5t6p793] .copilot-msg-text pre {
    background: var(--papyrus-panel-bg-strong);
    color: var(--papyrus-text-soft);
    padding: 10px 14px;
    border-radius: 8px;
    overflow-x: auto;
    margin: 8px 0;
    border: 1px solid var(--papyrus-border-subtle);
}

[b-phj5t6p793] .copilot-msg-text pre code {
    background: transparent;
    border: none;
    color: inherit;
    padding: 0;
    font-size: 0.78rem;
}

[b-phj5t6p793] .copilot-msg-text blockquote {
    border-left: 3px solid #10b981;
    margin: 8px 0;
    padding: 4px 12px;
    color: var(--papyrus-text-soft);
    background: rgba(16, 185, 129, 0.05);
    border-radius: 0 6px 6px 0;
}

[b-phj5t6p793] .copilot-msg-text table {
    width: 100%;
    border-collapse: collapse;
    margin: 10px 0;
    font-size: 0.78rem;
    background: var(--papyrus-panel-bg-strong);
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--papyrus-border-subtle);
}

[b-phj5t6p793] .copilot-msg-text thead {
    background: rgba(16, 185, 129, 0.12);
}

[b-phj5t6p793] .copilot-msg-text th {
    color: var(--papyrus-text-strong);
    font-weight: 600;
    text-align: left;
    padding: 8px 12px;
    border-bottom: 1px solid rgba(16, 185, 129, 0.2);
}

[b-phj5t6p793] .copilot-msg-text td {
    padding: 6px 12px;
    border-bottom: 1px solid var(--papyrus-border-subtle);
    color: var(--papyrus-text-soft);
}

[b-phj5t6p793] .copilot-msg-text tr:last-child td {
    border-bottom: none;
}

[b-phj5t6p793] .copilot-msg-text hr {
    border: none;
    border-top: 1px solid var(--papyrus-border-subtle);
    margin: 12px 0;
}

/* ── Per-message toolbar (export menu) ──────────────────────── */
.copilot-msg-toolbar[b-phj5t6p793] {
    display: flex;
    justify-content: flex-end;
    margin-top: 4px;
    opacity: 0.4;
    transition: opacity 0.2s ease;
}

.copilot-bubble-assistant:hover .copilot-msg-toolbar[b-phj5t6p793] {
    opacity: 1;
}

[b-phj5t6p793] .copilot-msg-export-btn .mud-icon-button {
    color: var(--papyrus-text-muted) !important;
    padding: 2px !important;
}

[b-phj5t6p793] .copilot-msg-export-btn .mud-icon-button:hover {
    color: #10b981 !important;
    background: rgba(16, 185, 129, 0.1) !important;
}

[b-phj5t6p793] .copilot-msg-export-btn .mud-icon-root { font-size: 0.95rem; }

/* ── Citations ──────────────────────────────────────────────── */
.copilot-citations[b-phj5t6p793] {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid var(--papyrus-border-subtle);
}

.copilot-citation-card[b-phj5t6p793] {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    background: rgba(16, 185, 129, 0.08);
    border: 1px solid rgba(16, 185, 129, 0.15);
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.2s ease;
    cursor: pointer;
}

.copilot-citation-card:hover[b-phj5t6p793] {
    background: rgba(16, 185, 129, 0.15);
    border-color: rgba(16, 185, 129, 0.3);
    transform: translateX(2px);
}

[b-phj5t6p793] .copilot-citation-icon {
    color: #10b981;
    font-size: 1rem;
}

.copilot-citation-info[b-phj5t6p793] {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.copilot-citation-title[b-phj5t6p793] {
    color: #10b981;
    font-size: 0.75rem;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.copilot-citation-page[b-phj5t6p793] {
    color: var(--papyrus-text-muted);
    font-size: 0.65rem;
}

/* ── Conversation history drawer ────────────────────────────── */
.copilot-history[b-phj5t6p793] {
    border-bottom: 1px solid var(--papyrus-border-subtle);
    background: var(--papyrus-appbar-bg);
    max-height: 50%;
    display: flex;
    flex-direction: column;
}

.copilot-history-header[b-phj5t6p793] {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    color: var(--papyrus-text-soft);
    font-size: 0.78rem;
    font-weight: 600;
    border-bottom: 1px solid var(--papyrus-border-subtle);
}

.copilot-history-header span:first-of-type[b-phj5t6p793] { flex: 1; }

[b-phj5t6p793] .copilot-history-close { color: var(--papyrus-text-muted) !important; }
[b-phj5t6p793] .copilot-history-close:hover { color: var(--papyrus-text-strong) !important; background: var(--papyrus-hover-bg) !important; }

.copilot-history-loading[b-phj5t6p793],
.copilot-history-empty[b-phj5t6p793] {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 24px 16px;
    color: var(--papyrus-text-muted);
    font-size: 0.78rem;
}

.copilot-history-list[b-phj5t6p793] {
    overflow-y: auto;
    padding: 4px;
    scrollbar-width: thin;
    scrollbar-color: var(--papyrus-scrollbar-thumb) transparent;
}

.copilot-history-row[b-phj5t6p793] {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.15s ease;
    margin-bottom: 2px;
}

.copilot-history-row:hover[b-phj5t6p793] { background: var(--papyrus-hover-bg); }
.copilot-history-row.current[b-phj5t6p793] { background: rgba(16, 185, 129, 0.12); }

.copilot-history-row-icon[b-phj5t6p793] {
    color: #10b981;
    margin-top: 1px;
}

.copilot-history-row-meta[b-phj5t6p793] { flex: 1; min-width: 0; }

.copilot-history-row-title[b-phj5t6p793] {
    color: var(--papyrus-text-strong);
    font-size: 0.78rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.copilot-history-row-sub[b-phj5t6p793] {
    color: var(--papyrus-text-muted);
    font-size: 0.7rem;
    margin-top: 2px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.copilot-history-row-date[b-phj5t6p793] {
    color: var(--papyrus-text-muted);
    font-size: 0.65rem;
    margin-top: 3px;
}

.copilot-history-row-delete[b-phj5t6p793] {
    background: transparent;
    border: none;
    color: var(--papyrus-text-muted);
    cursor: pointer;
    padding: 4px;
    border-radius: 6px;
    transition: all 0.15s ease;
}

.copilot-history-row-delete:hover[b-phj5t6p793] {
    color: #f87171;
    background: rgba(239, 68, 68, 0.1);
}

/* ── Streaming controls + tool status ───────────────────────── */
.copilot-tool-status[b-phj5t6p793] {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 8px 8px 0;
    color: var(--papyrus-text-muted);
    font-size: 0.72rem;
    font-style: italic;
}

.copilot-stream-controls[b-phj5t6p793] {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px dashed rgba(16, 185, 129, 0.2);
}

.copilot-stream-pulse[b-phj5t6p793] {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #10b981;
    animation: copilotPulse-b-phj5t6p793 1.2s ease-in-out infinite;
}

@keyframes copilotPulse-b-phj5t6p793 {
    0%, 100% { opacity: 0.3; transform: scale(0.85); }
    50%      { opacity: 1;   transform: scale(1.15); }
}

.copilot-stream-label[b-phj5t6p793] {
    color: #10b981;
    font-size: 0.7rem;
    font-weight: 500;
    flex: 1;
}

.copilot-cancel-btn[b-phj5t6p793] {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #f87171;
    padding: 3px 10px;
    border-radius: 6px;
    font-size: 0.7rem;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.15s ease;
}

.copilot-cancel-btn:hover[b-phj5t6p793] {
    background: rgba(239, 68, 68, 0.2);
    border-color: rgba(239, 68, 68, 0.5);
    color: #fca5a5;
}

/* ── Typing indicator ───────────────────────────────────────── */
.copilot-typing[b-phj5t6p793] {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 12px 18px;
}

.copilot-typing-dot[b-phj5t6p793] {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #10b981;
    animation: copilotTyping-b-phj5t6p793 1.4s ease-in-out infinite;
}

.copilot-typing-dot:nth-child(2)[b-phj5t6p793] {
    animation-delay: 0.2s;
}

.copilot-typing-dot:nth-child(3)[b-phj5t6p793] {
    animation-delay: 0.4s;
}

/* ── Welcome / Empty state ──────────────────────────────────── */
.copilot-welcome[b-phj5t6p793] {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 40px 20px;
    flex: 1;
}

.copilot-welcome-icon[b-phj5t6p793] {
    width: 64px;
    height: 64px;
    border-radius: 20px;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.15), rgba(5, 150, 105, 0.08));
    border: 1px solid rgba(16, 185, 129, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #10b981;
    margin-bottom: 20px;
}

[b-phj5t6p793] .copilot-welcome-title {
    color: var(--papyrus-text-strong);
    margin-bottom: 8px;
}

[b-phj5t6p793] .copilot-welcome-sub {
    color: var(--papyrus-text-muted);
    margin-bottom: 28px;
    max-width: 280px;
}

.copilot-suggestions[b-phj5t6p793] {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
    max-width: 320px;
}

.copilot-suggestion-chip[b-phj5t6p793] {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    background: var(--papyrus-panel-bg);
    border: 1px solid var(--papyrus-border-subtle);
    border-radius: 12px;
    color: var(--papyrus-text-soft);
    font-size: 0.8rem;
    font-family: 'DM Sans', system-ui, sans-serif;
    cursor: pointer;
    text-align: left;
    transition: all 0.2s ease;
}

.copilot-suggestion-chip:hover[b-phj5t6p793] {
    background: rgba(16, 185, 129, 0.1);
    border-color: rgba(16, 185, 129, 0.2);
    color: var(--papyrus-text-strong);
}

[b-phj5t6p793] .copilot-suggestion-chip .mud-icon-root {
    color: #10b981;
    font-size: 1.1rem;
    min-width: 20px;
}

.copilot-welcome-tip[b-phj5t6p793] {
    margin-top: 20px;
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--papyrus-text-muted);
    font-size: 0.72rem;
    cursor: pointer;
    transition: color 0.15s ease;
    background: transparent;
    border: none;
    font-family: inherit;
}

.copilot-welcome-tip:hover[b-phj5t6p793] {
    color: #10b981;
}

/* ── Attachment chips ───────────────────────────────────────── */
.copilot-attachments-strip[b-phj5t6p793] {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 8px;
}

.copilot-attachment-chip[b-phj5t6p793] {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 4px 4px 10px;
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.3);
    border-radius: 999px;
    color: var(--papyrus-text-soft);
    font-size: 0.72rem;
    max-width: 220px;
}

[b-phj5t6p793] .copilot-attachment-chip > .mud-icon-root:first-child {
    color: #10b981;
    font-size: 0.95rem;
}

.copilot-attachment-chip > span[b-phj5t6p793] {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.copilot-attachment-remove[b-phj5t6p793] {
    background: transparent;
    border: none;
    color: var(--papyrus-text-muted);
    cursor: pointer;
    padding: 2px;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
}

.copilot-attachment-remove:hover[b-phj5t6p793] {
    color: #f87171;
    background: rgba(239, 68, 68, 0.15);
}

[b-phj5t6p793] .copilot-attachment-remove .mud-icon-root { font-size: 0.85rem; }

.copilot-attach-btn[b-phj5t6p793] {
    width: 32px;
    height: 32px;
    min-width: 32px;
    border-radius: 8px;
    border: none;
    background: transparent;
    color: var(--papyrus-text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.15s ease;
}

.copilot-attach-btn:hover[b-phj5t6p793] {
    color: #10b981;
    background: rgba(16, 185, 129, 0.1);
}

/* ── Input area ─────────────────────────────────────────────── */
.copilot-input-area[b-phj5t6p793] {
    padding: 16px;
    border-top: 1px solid var(--papyrus-border-subtle);
    background: var(--papyrus-appbar-bg);
    backdrop-filter: blur(12px);
}

.copilot-input-wrapper[b-phj5t6p793] {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--papyrus-panel-bg);
    border: 1px solid rgba(16, 185, 129, 0.2);
    border-radius: 14px;
    padding: 4px 4px 4px 16px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.copilot-input-wrapper:focus-within[b-phj5t6p793] {
    border-color: rgba(16, 185, 129, 0.5);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.08);
}

.copilot-input[b-phj5t6p793] {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: var(--papyrus-text-strong);
    font-size: 0.85rem;
    font-family: 'DM Sans', system-ui, sans-serif;
    padding: 8px 0;
}

.copilot-input[b-phj5t6p793]::placeholder {
    color: var(--papyrus-text-muted);
}

.copilot-send-btn[b-phj5t6p793] {
    width: 36px;
    height: 36px;
    min-width: 36px;
    border-radius: 10px;
    border: none;
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 6px rgba(16, 185, 129, 0.25);
}

.copilot-send-btn:hover:not(:disabled)[b-phj5t6p793] {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.35);
}

.copilot-send-btn:disabled[b-phj5t6p793] {
    opacity: 0.4;
    cursor: not-allowed;
}

/* ── Animations ─────────────────────────────────────────────── */
@keyframes copilotFadeIn-b-phj5t6p793 {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes copilotTyping-b-phj5t6p793 {
    0%, 60%, 100% {
        opacity: 0.3;
        transform: scale(0.8);
    }
    30% {
        opacity: 1;
        transform: scale(1);
    }
}

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 768px) {
    /* On phones the rail UX doesn't make sense — go full screen. */
    .copilot-panel[b-phj5t6p793] {
        width: 100vw !important;
        min-width: 100vw;
        max-width: 100vw;
    }

    .copilot-resize-handle[b-phj5t6p793] {
        display: none;
    }

    .copilot-panel.collapsed[b-phj5t6p793] {
        /* On mobile, "collapsed" just means hidden — drop back to a fully closed panel. */
        transform: translateX(100%) !important;
    }
}
