.copilot-page {
    min-height: calc(100vh - 3rem);
    padding: 0;
    display: flex;
    justify-content: center;
}

.copilot-shell {
    width: min(100%, 1080px);
    height: calc(100vh - 3rem);
    display: flex;
    flex-direction: column;
    background: #edf4fb;
    border: 1px solid #c9d8ea;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 14px 36px rgba(13, 59, 102, 0.08);
}

.copilot-header {
    min-height: 58px;
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 22px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(248, 251, 255, 0.82));
    border-bottom: 1px solid #d9e5f2;
}

.copilot-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 26px;
    padding: 0 14px;
    border-radius: 999px;
    background: #0d3b66;
    color: #fff;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.04em;
}

.copilot-title {
    margin: 0;
    color: #0b2239;
    font-size: 26px;
    font-weight: 800;
    line-height: 1;
}

.copilot-status {
    margin-left: auto;
    color: #6b7b8f;
    font-size: 11px;
    font-weight: 600;
}

.copilot-conversation-panel {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    background:
        radial-gradient(circle at 16% 0%, rgba(255, 255, 255, 0.92), rgba(255, 255, 255, 0) 28%),
        #edf4fb;
}

.copilot-chat-window {
    flex: 1 1 auto;
    min-height: 0;
    padding: 24px 22px 14px;
    overflow-y: auto;
    overflow-anchor: none;
    scroll-behavior: auto;
    overscroll-behavior: contain;
    scrollbar-width: thin;
    scrollbar-color: #9fb7d3 transparent;
}

.copilot-chat-window::-webkit-scrollbar {
    width: 8px;
}

.copilot-chat-window::-webkit-scrollbar-track {
    background: transparent;
}

.copilot-chat-window::-webkit-scrollbar-thumb {
    background: #9fb7d3;
    border-radius: 999px;
}

.copilot-loading-sentinel {
    min-height: 18px;
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #0d3b66;
    font-size: 11px;
    font-weight: 700;
}

.copilot-message {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 14px;
}

.copilot-message.user {
    flex-direction: row-reverse;
}

.copilot-avatar {
    flex: 0 0 26px;
    height: 26px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 800;
    border: 1px solid #bfd0e5;
}

.copilot-avatar.assistant {
    background: #e5f0fb;
    color: #0d3b66;
}

.copilot-avatar.user {
    background: #0d3b66;
    color: #fff;
}

.copilot-bubble {
    max-width: min(780px, 76%);
    border: 1px solid #cbd9eb;
    border-radius: 14px;
    padding: 12px 14px;
    background: #fff;
    color: #0b2239;
    box-shadow: 0 6px 18px rgba(13, 59, 102, 0.04);
}

.copilot-bubble.user {
    background: #0d3b66;
    border-color: #0d3b66;
    color: #fff;
}

.copilot-bubble-label {
    margin-bottom: 5px;
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    color: #51677f;
}

.copilot-bubble.user .copilot-bubble-label {
    color: rgba(255, 255, 255, 0.72);
}

.copilot-markdown {
    font-size: 13px;
    line-height: 1.55;
}

.copilot-markdown p:last-child,
.copilot-markdown ul:last-child,
.copilot-markdown ol:last-child {
    margin-bottom: 0;
}

.copilot-time {
    margin-top: 7px;
    font-size: 10px;
    color: #8a9ab0;
}

.copilot-bubble.user .copilot-time {
    color: rgba(255, 255, 255, 0.62);
}

.copilot-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.copilot-action-link {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 6px 11px;
    border: 1px solid #b8cce4;
    border-radius: 999px;
    background: #eef6ff;
    color: #0d3b66;
    font-size: 11px;
    font-weight: 800;
    text-decoration: none;
}

.copilot-action-link:hover {
    border-color: #0d3b66;
    background: #dfeeff;
    color: #0b2239;
    text-decoration: none;
}

.copilot-examples-container {
    flex: 0 0 auto;
}

.copilot-examples {
    margin: 0 18px 12px;
    padding: 14px 16px;
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid #c9d8ea;
    border-radius: 16px;
}

.copilot-examples-title {
    color: #0d3b66;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.04em;
}

.copilot-examples-subtitle {
    margin-top: 4px;
    color: #607289;
    font-size: 11px;
}

.copilot-examples-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin-top: 12px;
}

.copilot-example-card {
    min-height: 64px;
    padding: 10px 12px;
    text-align: left;
    background: #fff;
    border: 1px solid #b8cce4;
    border-radius: 13px;
    color: #0b2239;
    cursor: pointer;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.copilot-example-card:hover {
    border-color: #0d3b66;
    box-shadow: 0 7px 18px rgba(13, 59, 102, 0.10);
    transform: translateY(-1px);
}

.copilot-example-tag {
    margin-bottom: 6px;
    color: #0d3b66;
    font-size: 10px;
    font-weight: 900;
    letter-spacing: 0.04em;
}

.copilot-example-text {
    color: #081f36;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.28;
}

.copilot-input-panel {
    flex: 0 0 auto;
    margin: 0 14px 14px;
    padding: 12px;
    background: #fff;
    border: 1px solid #c9d8ea;
    border-radius: 16px;
    box-shadow: 0 10px 28px rgba(13, 59, 102, 0.07);
}

.copilot-input {
    width: 100%;
    min-height: 76px;
    resize: vertical;
    border: none;
    outline: none;
    color: #0b2239;
    font-size: 13px;
    line-height: 1.45;
}

.copilot-input-footer {
    display: flex;
    align-items: center;
    gap: 16px;
}

.copilot-hint {
    flex: 1 1 auto;
    color: #6d7f95;
    font-size: 11px;
}

.copilot-send {
    min-width: 86px;
    border: none !important;
    border-radius: 999px !important;
    background: #0d3b66 !important;
    color: #fff !important;
    font-weight: 800 !important;
    padding: 9px 20px !important;
}

@media (max-width: 1100px) {
    .copilot-examples-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    .copilot-page {
        display: block;
    }

    .copilot-shell {
        border-radius: 12px;
        width: 100%;
        height: calc(100vh - 2rem);
    }

    .copilot-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .copilot-status {
        margin-left: 0;
    }

    .copilot-bubble {
        max-width: 86%;
    }

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