* { box-sizing: border-box; }
:root { color-scheme: dark; font-family: system-ui, sans-serif; background: #10151c; color: #ecf2f5; --muted: #a6b7c5; --line: #2a3846; --accent: #6de4c1; }
body { margin: 0; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, select, textarea { font: inherit; color: inherit; }
button, .primary { border: 1px solid var(--line); border-radius: .65rem; padding: .6rem .85rem; background: #202d39; cursor: pointer; }
button:hover { background: #2a3b4a; }
button:disabled { opacity: .55; cursor: wait; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.primary, .primary:hover { display: inline-block; background: var(--accent); color: #0b2b24; font-weight: 700; }
.shell { display: grid; grid-template-columns: 16rem 1fr; min-height: 100dvh; }
.sidebar { background: #151e28; display: flex; flex-direction: column; gap: 1rem; padding: 1.2rem; border-right: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: .65rem; font-size: .85rem; font-weight: 800; letter-spacing: .08em; }
.mark { display: inline-grid; place-items: center; width: 2rem; height: 2rem; border-radius: .55rem; color: var(--accent); background: #25463f; font-size: 1.3rem; }
.threads, .account { display: grid; gap: .45rem; }
.threads { max-height: 50vh; overflow: auto; }
.threads button { text-align: left; }
.threads button[aria-current] { border-color: #6bb49f; }
.threads small { display: block; margin-top: .2rem; color: var(--muted); }
.account { margin-top: auto; }
.workspace { display: flex; flex-direction: column; min-width: 0; }
.workspace header { border-bottom: 1px solid var(--line); padding: 1rem 1.5rem; display: flex; justify-content: space-between; gap: 1rem; }
.workspace header span, small, .status, .source { color: var(--muted); }
.transcript { flex: 1; width: min(100%, 53rem); margin: auto; padding: 1.5rem; }
.welcome { margin: min(14vh, 8rem) auto 2rem; text-align: center; }
.suggestions { display: flex; gap: .6rem; justify-content: center; flex-wrap: wrap; }
.message { margin: 0 0 1rem; padding: 1rem; border: 1px solid var(--line); border-radius: 1rem; background: #171f29; }
.message.user { margin-left: clamp(0rem, 8%, 5rem); background: #202e3b; }
.message p, .status { white-space: pre-wrap; overflow-wrap: anywhere; margin-bottom: 0; }
.source { font-size: .78rem; overflow-wrap: anywhere; }
.composer { position: sticky; bottom: 0; width: min(100%, 53rem); padding: 1rem 1.5rem; margin: auto; background: #10151c; }
.composer > div { display: flex; gap: .65rem; align-items: end; margin: .4rem 0; }
textarea, input, select { background: #171f29; border: 1px solid var(--line); border-radius: .6rem; padding: .65rem; }
textarea { width: 100%; resize: vertical; }
.login, .panel { margin: 10vh auto; padding: 1.5rem; width: min(100%, 54rem); }
.login { max-width: 30rem; }
.login form { margin-top: .8rem; }
.table-wrap { overflow: auto; margin: 1rem 0; }
table { width: 100%; border-collapse: collapse; text-align: left; }
td, th { border-bottom: 1px solid var(--line); padding: .7rem; }
.filters, .pages { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; }
@media (max-width: 680px) {
    .shell { grid-template-columns: 1fr; }
    .sidebar { border-right: 0; border-bottom: 1px solid var(--line); }
    .threads { display: flex; overflow-x: auto; }
    .threads button { flex: 0 0 auto; }
    .account { display: flex; flex-wrap: wrap; align-items: center; }
    .welcome { margin-top: 2rem; }
}
