.app-shell {
    display: flex;
    flex-direction: column;

    width: 100%;
    height: 100vh;
    height: 100dvh;

    overflow: hidden;
}

.app-header {
    display: flex;
    align-items: center;
    justify-content: space-between;

    min-height: 86px;
    padding: 16px 5%;

    color: #ffffff;
    background:
        linear-gradient(
            115deg,
            var(--navy-950),
            var(--navy-800)
        );

    border-bottom: 4px solid var(--gold-500);

    box-shadow: var(--shadow-header);

    position: relative;
    z-index: 2;
}

.brand {
    display: flex;
    align-items: center;
    gap: 15px;

    min-width: 0;
}

.brand-logo {
    width: 82px;
    height: 82px;

    display: flex;
    align-items: center;
    justify-content: center;

    flex-shrink: 0;

    border-radius: 14px;

    background: rgba(255, 255, 255, 0.09);
    border: 1px solid rgba(255, 255, 255, 0.15);

    padding: 9px;
}

.brand-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.brand-info h1 {
    font-size: 25px;
    font-weight: 700;

    letter-spacing: 0.3px;

    margin: 0;
}

.brand-info p {
    color: #cbd5e1;

    font-size: 12px;

    margin: 5px 0 0;
}

.connection-status {
    display: flex;
    align-items: center;
    gap: 9px;

    padding: 9px 13px;

    border-radius: 30px;

    background: rgba(255, 255, 255, 0.09);
    border: 1px solid rgba(255, 255, 255, 0.1);

    color: #e2e8f0;

    font-size: 12px;
}

.status-dot {
    width: 8px;
    height: 8px;

    border-radius: 50%;

    background: var(--success);
    box-shadow: 0 0 8px rgba(22, 163, 106, 0.45);
}

.status-dot.is-thinking {
    background: var(--warning);
}

.status-dot.is-error {
    background: var(--danger);
}

.main-content {
    display: flex;
    flex-direction: column;

    flex: 1;
    min-height: 0;

    width: 100%;
    max-width: 1200px;

    margin: 0 auto;
}

.chat-box {
    flex: 1;
    min-height: 0;

    overflow-y: auto;
    overscroll-behavior: contain;

    padding: 30px 5% 20px;

    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 transparent;
}

.chat-box::-webkit-scrollbar {
    width: 6px;
}

.chat-box::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 10px;
}

.composer-area {
    flex-shrink: 0;

    padding: 18px 5% 12px;

    background: var(--background);

    border-top: 1px solid rgba(226, 232, 240, 0.7);
}

.chat-form {
    display: flex;
    align-items: flex-end;
    gap: 12px;

    width: 100%;
    max-width: 900px;

    margin: 0 auto;

    padding: 10px;

    border: 1px solid var(--border);
    border-radius: var(--radius-lg);

    background: var(--surface);

    box-shadow: var(--shadow-card);

    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease;
}

.chat-form:focus-within {
    border-color: var(--navy-700);

    box-shadow:
        0 0 0 4px rgba(36, 81, 133, 0.08),
        var(--shadow-card);
}

.chat-form textarea {
    flex: 1;
    min-width: 0;

    resize: none;

    max-height: 140px;
    overflow-y: auto;

    padding: 12px 10px;

    border: 0;
    outline: 0;

    background: transparent;
    color: var(--text-primary);

    font-size: 14px;
    line-height: 1.8;
}

.chat-form textarea::placeholder {
    color: var(--text-muted);
}

.chat-form textarea:focus-visible {
    outline: none;
}

.footer-note {
    text-align: center;

    margin: 12px auto 0;

    color: var(--text-muted);
    font-size: 10px;
}