:root {
    --bs-border-radius:      0;
    --bs-border-radius-sm:   0;
    --bs-border-radius-lg:   0;
    --bs-border-radius-xl:   0;
    --bs-border-radius-2xl:  0;
    --bs-border-radius-pill: 0;
}

body {
    font-family: system-ui, sans-serif;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.card,
.list-group,
.toast {
    position: relative;
}

.card::before,
.card::after,
.list-group::before,
.list-group::after,
.toast::before,
.toast::after {
    content: '';
    position: absolute;
    width: 12px;
    height: 12px;
    border: 1px solid currentColor;
    pointer-events: none;
}

.card::before,
.list-group::before,
.toast::before {
    top: -1px;
    left: -1px;
    border-right: 0;
    border-bottom: 0;
}

.card::after,
.list-group::after,
.toast::after {
    bottom: -1px;
    right: -1px;
    border-left: 0;
    border-top: 0;
}

.turbo-progress-bar {
    background-color: var(--bs-primary);
    height: 2px;
}

.chat-shell {
    position: fixed;
    top: 56px;
    left: 0;
    right: 0;
    bottom: 0;
    display: grid;
    grid-template-columns: minmax(200px, 260px) 1fr;
    background: var(--bs-body-bg);
    color: var(--bs-body-color);
}

.chat-shell__sidebar {
    border-right: 1px solid var(--bs-border-color);
    overflow-y: auto;
    padding: .5rem;
    display: flex;
    flex-direction: column;
    gap: .25rem;
}

.chat-shell__sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: .25rem .25rem .5rem;
    border-bottom: 1px solid var(--bs-border-color);
    margin-bottom: .25rem;
}

.chat-shell__sidebar-item {
    display: block;
    padding: .35rem .5rem;
    color: inherit;
    text-decoration: none;
    border: 1px solid transparent;
}

.chat-shell__sidebar-item:hover {
    background: var(--bs-secondary-bg);
    color: inherit;
}

.chat-shell__sidebar-item.is-active {
    background: var(--bs-primary-bg-subtle);
    color: var(--bs-emphasis-color);
    border-color: var(--bs-primary-border-subtle);
}

.chat-shell__sidebar-item small {
    color: var(--bs-secondary-color);
}

.chat-shell__main {
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.chat-shell__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: .5rem .75rem;
    border-bottom: 1px solid var(--bs-border-color);
    background: var(--bs-body-bg);
    flex: 0 0 auto;
}

.chat-shell__header h1 {
    font-size: 1rem;
    margin: 0;
    font-weight: 600;
}

.chat-shell__header .meta {
    color: var(--bs-secondary-color);
    font-size: .8rem;
    margin-left: .5rem;
}

.chat-messages {
    flex: 1 1 auto;
    overflow-y: auto;
    min-height: 0;
    padding: .25rem 0;
    background: var(--bs-body-bg);
}

.chat-message {
    padding: .4rem .75rem;
    line-height: 1.45;
    border-bottom: 1px solid var(--bs-border-color);
    word-wrap: break-word;
}

.chat-message--user {
    background: var(--bs-tertiary-bg);
    color: var(--bs-emphasis-color);
}

.chat-message--assistant {
    background: var(--bs-primary-bg-subtle);
    color: var(--bs-emphasis-color);
}

.chat-message--tool {
    background: var(--bs-warning-bg-subtle);
    color: var(--bs-emphasis-color);
}

.chat-message__meta {
    font-size: .75rem;
    color: var(--bs-secondary-color);
    margin-top: .15rem;
}

.chat-composer {
    flex: 0 0 auto;
    border-top: 1px solid var(--bs-border-color);
    padding: .5rem .75rem;
    background: var(--bs-body-bg);
}

.chat-composer textarea {
    resize: vertical;
    min-height: 3.5rem;
}

.chat-composer__actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: .5rem;
    margin-top: .35rem;
}

.chat-composer__actions .meta {
    color: var(--bs-secondary-color);
    font-size: .8rem;
}

.chat-shell .chat-messages::before,
.chat-shell .chat-messages::after,
.chat-shell .chat-composer::before,
.chat-shell .chat-composer::after {
    display: none;
}
