:root {
    --bg: #edf4ff;
    --bg-accent: #f8fbff;
    --surface: #ffffff;
    --surface-soft: #f5f9ff;
    --surface-strong: #eaf2ff;
    --line: #d9e7ff;
    --line-strong: #bed4fb;
    --text: #0f2454;
    --text-soft: #4f678f;
    --navy: #0a2f76;
    --royal: #1f6bff;
    --royal-strong: #0f51d8;
    --gold: #f0b437;
    --gold-soft: #fff4d7;
    --success: #1f9d67;
    --warning: #d97706;
    --danger: #cf3d52;
    --shadow-soft: 0 18px 44px rgba(17, 42, 96, 0.08);
    --shadow-card: 0 14px 36px rgba(15, 39, 92, 0.08);
    --radius-xl: 28px;
    --radius-lg: 22px;
    --radius-md: 18px;
    --radius-sm: 14px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: "Manrope", "Segoe UI", sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at top left, rgba(31, 107, 255, 0.14), transparent 24%),
        radial-gradient(circle at top right, rgba(240, 180, 55, 0.12), transparent 22%),
        linear-gradient(180deg, #f9fbff 0%, var(--bg) 100%);
}

a {
    color: inherit;
    text-decoration: none;
}

code {
    font-family: "SFMono-Regular", "Consolas", monospace;
    font-size: 0.92em;
}

.auth-shell,
.app-shell {
    min-height: 100vh;
}

.auth-shell {
    display: grid;
    place-items: center;
    padding: 32px;
}

.auth-card {
    width: min(100%, 1220px);
    display: grid;
    grid-template-columns: minmax(0, 1fr) 520px;
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid rgba(217, 231, 255, 0.9);
    border-radius: 32px;
    overflow: hidden;
    box-shadow: var(--shadow-soft);
}

.auth-panel,
.auth-hero {
    padding: 48px;
}

.auth-panel {
    background: rgba(255, 255, 255, 0.82);
}

.auth-hero {
    background:
        radial-gradient(circle at top right, rgba(240, 180, 55, 0.18), transparent 22%),
        linear-gradient(155deg, rgba(10, 47, 118, 0.98), rgba(31, 107, 255, 0.92));
    color: #fff;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.16);
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.12em;
}

.auth-title,
.page-title {
    margin: 0;
    font-size: 42px;
    line-height: 1.02;
    font-weight: 800;
    letter-spacing: -0.03em;
}

.auth-copy,
.page-copy {
    margin: 12px 0 0;
    color: var(--text-soft);
    line-height: 1.65;
}

.auth-hero .auth-copy {
    color: rgba(255, 255, 255, 0.84);
}

.auth-hero-login {
    position: relative;
    overflow: hidden;
}

.auth-hero-login::before {
    content: "";
    position: absolute;
    inset: auto -80px -120px auto;
    width: 320px;
    height: 320px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.18), transparent 68%);
}

.auth-hero-brand {
    display: grid;
    gap: 22px;
}

.auth-logo-lockup {
    display: grid;
    gap: 22px;
}

.auth-logo-mark {
    position: relative;
    width: 160px;
    height: 160px;
    border-radius: 50%;
    background: linear-gradient(180deg, #2b7cff 0%, #0c4ccb 100%);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.2),
        0 26px 50px rgba(4, 20, 61, 0.28);
}

.auth-logo-mark::after {
    content: "";
    position: absolute;
    left: 18px;
    bottom: -10px;
    width: 44px;
    height: 44px;
    background: #0c4ccb;
    clip-path: polygon(0 0, 100% 0, 0 100%);
    border-bottom-left-radius: 12px;
}

.auth-logo-mark .brand-dot {
    top: 62px;
    width: 16px;
    height: 16px;
}

.auth-logo-mark .dot-left {
    left: 38px;
}

.auth-logo-mark .dot-center {
    left: 72px;
}

.auth-logo-mark .dot-right {
    left: 106px;
}

.auth-logo-mark .brand-smile {
    left: 34px;
    bottom: 34px;
    width: 88px;
    height: 32px;
    border-bottom-width: 8px;
}

.auth-logo-copy {
    display: grid;
    gap: 10px;
}

.auth-logo-title {
    margin: 0;
    font-size: 72px;
    line-height: 0.96;
    font-weight: 800;
    letter-spacing: -0.05em;
    color: #fff;
}

.auth-logo-tagline {
    margin: 0;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.28em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.8);
}

.auth-hero-points {
    display: grid;
    gap: 14px;
}

.auth-hero-point {
    padding: 18px 20px;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.16);
    backdrop-filter: blur(8px);
}

.auth-hero-point strong {
    display: block;
    margin-bottom: 8px;
}

.auth-hero-point .small {
    margin: 0;
    color: rgba(255, 255, 255, 0.78);
    line-height: 1.6;
}

.field-grid,
.stack {
    display: grid;
    gap: 18px;
}

.field,
.textarea,
.select {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: #fff;
    padding: 14px 16px;
    font: inherit;
    color: var(--text);
    transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.field::placeholder,
.textarea::placeholder {
    color: #89a0c5;
}

.field:focus,
.textarea:focus,
.select:focus {
    outline: none;
    border-color: rgba(31, 107, 255, 0.45);
    box-shadow: 0 0 0 4px rgba(31, 107, 255, 0.12);
}

.field[disabled] {
    background: rgba(245, 249, 255, 0.92);
    color: #7d94bc;
    cursor: default;
}

.textarea {
    min-height: 112px;
    resize: vertical;
}

.label {
    display: block;
    margin-bottom: 8px;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.01em;
    color: var(--text);
}

.button,
.button-secondary,
.button-danger {
    appearance: none;
    border: none;
    border-radius: 16px;
    padding: 13px 18px;
    font: inherit;
    font-weight: 800;
    cursor: pointer;
    transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease, opacity 0.18s ease;
}

.button:hover,
.button-secondary:hover,
.button-danger:hover {
    transform: translateY(-1px);
}

.button {
    background: linear-gradient(135deg, var(--royal), var(--royal-strong));
    color: #fff;
    box-shadow: 0 14px 26px rgba(31, 107, 255, 0.22);
}

.button-secondary {
    background: var(--surface-soft);
    color: var(--navy);
    border: 1px solid rgba(31, 107, 255, 0.14);
}

.button-danger {
    background: #fff0f2;
    color: var(--danger);
    border: 1px solid rgba(207, 61, 82, 0.14);
}

.muted-note {
    margin-top: 18px;
    color: var(--text-soft);
    font-size: 13px;
    line-height: 1.7;
}

.flash {
    margin-bottom: 20px;
    border-radius: 16px;
    padding: 14px 16px;
    font-weight: 700;
    border: 1px solid transparent;
}

.flash-success {
    background: #e7f8ef;
    color: #0e7a4d;
    border-color: rgba(31, 157, 103, 0.16);
}

.flash-error {
    background: #fff0f2;
    color: #a9283f;
    border-color: rgba(207, 61, 82, 0.14);
}

.flash-info {
    background: #edf4ff;
    color: var(--navy);
    border-color: rgba(31, 107, 255, 0.16);
}

.app-shell {
    display: grid;
    grid-template-columns: 292px minmax(0, 1fr);
}

.sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    padding: 26px 18px 22px;
    border-right: 1px solid rgba(217, 231, 255, 0.95);
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(14px);
    display: flex;
    flex-direction: column;
    gap: 22px;
}

.brand-block {
    border-radius: 26px;
    background:
        radial-gradient(circle at top right, rgba(240, 180, 55, 0.18), transparent 28%),
        linear-gradient(145deg, #092257, #1343a3 55%, #1f6bff 100%);
    padding: 22px 20px;
    color: #fff;
    box-shadow: 0 18px 36px rgba(8, 32, 83, 0.28);
}

.brand-lockup {
    display: flex;
    align-items: center;
    gap: 16px;
}

.brand-mark {
    position: relative;
    width: 72px;
    height: 72px;
    flex: 0 0 72px;
    border-radius: 50%;
    background: linear-gradient(180deg, #2b7cff 0%, #0c4ccb 100%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22);
}

.brand-mark::after {
    content: "";
    position: absolute;
    left: 8px;
    bottom: -4px;
    width: 20px;
    height: 20px;
    background: #0c4ccb;
    clip-path: polygon(0 0, 100% 0, 0 100%);
    border-bottom-left-radius: 6px;
}

.brand-dot {
    position: absolute;
    top: 28px;
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: #fff;
}

.dot-left {
    left: 18px;
}

.dot-center {
    left: 32px;
}

.dot-right {
    left: 46px;
}

.brand-smile {
    position: absolute;
    left: 16px;
    bottom: 16px;
    width: 40px;
    height: 18px;
    border-bottom: 5px solid var(--gold);
    border-radius: 0 0 28px 28px;
    transform: rotate(-3deg);
}

.brand-copy {
    min-width: 0;
}

.brand-title {
    margin: 0;
    font-size: 28px;
    font-weight: 800;
    letter-spacing: -0.03em;
}

.brand-tagline {
    margin: 8px 0 0;
    font-size: 11px;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.82);
}

.nav-list {
    margin: 0;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 10px;
}

.nav-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    border-radius: 18px;
    font-weight: 800;
    color: #173872;
    background: transparent;
    transition: background 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.nav-link:hover {
    background: rgba(31, 107, 255, 0.08);
    color: var(--navy);
}

.nav-link.active {
    background: linear-gradient(135deg, rgba(31, 107, 255, 0.13), rgba(31, 107, 255, 0.2));
    color: var(--royal-strong);
}

.sidebar-footer {
    margin-top: auto;
    padding: 14px 16px;
    border-radius: 18px;
    background: var(--surface-soft);
    border: 1px solid rgba(190, 212, 251, 0.7);
    color: var(--text-soft);
}

.sidebar-footer-label {
    display: block;
    margin-bottom: 8px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.sidebar-status {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 700;
}

.sidebar-status-dot {
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: #cbd5e1;
}

.sidebar-status-dot.is-online {
    background: var(--success);
    box-shadow: 0 0 0 6px rgba(31, 157, 103, 0.12);
}

.sidebar-status-dot.is-offline {
    background: var(--danger);
    box-shadow: 0 0 0 6px rgba(207, 61, 82, 0.08);
}

.content {
    padding: 28px;
}

.topbar {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 22px;
}

.topbar-actions,
.account-panel {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.icon-button {
    width: 48px;
    height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(217, 231, 255, 0.95);
    box-shadow: var(--shadow-card);
    font-size: 22px;
    color: var(--royal-strong);
}

.icon-button.active {
    background: linear-gradient(135deg, rgba(31, 107, 255, 0.1), rgba(240, 180, 55, 0.18));
}

.topbar-card {
    padding: 18px 20px;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(217, 231, 255, 0.98);
    box-shadow: var(--shadow-card);
}

.account-card {
    min-width: 0;
    padding: 16px 18px;
    display: flex;
    align-items: center;
    gap: 16px;
}

.account-copy {
    display: grid;
    gap: 2px;
    min-width: 220px;
}

.status-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: fit-content;
    padding: 8px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
    background: #e6f8ee;
    color: #0f8c56;
    flex-shrink: 0;
}

.account-card form {
    margin-left: auto;
}

.account-card .button-secondary {
    padding: 11px 18px;
    border-radius: 14px;
}

.grid-3,
.grid-2 {
    display: grid;
    gap: 18px;
}

.grid-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.grid-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.settings-tabs {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 18px;
}

.settings-tab {
    display: inline-flex;
    align-items: center;
    padding: 11px 16px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.88);
    border: 1px solid rgba(217, 231, 255, 0.96);
    color: var(--text-soft);
    font-size: 14px;
    font-weight: 800;
}

.settings-tab.active {
    background: linear-gradient(135deg, var(--royal), var(--royal-strong));
    border-color: transparent;
    color: #fff;
    box-shadow: 0 14px 28px rgba(31, 107, 255, 0.2);
}

.card {
    background: rgba(255, 255, 255, 0.94);
    border: 1px solid rgba(217, 231, 255, 0.96);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-card);
    overflow: hidden;
}

.card-body {
    padding: 22px;
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 22px 22px 0;
}

.section-title {
    margin: 0;
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.stat-label {
    margin: 0;
    color: var(--text-soft);
    font-size: 13px;
    font-weight: 700;
}

.stat-value {
    margin: 8px 0 0;
    font-size: 36px;
    line-height: 1;
    font-weight: 800;
    color: var(--navy);
}

.table-wrap {
    overflow-x: auto;
}

.table {
    width: 100%;
    border-collapse: collapse;
}

.table th,
.table td {
    padding: 14px 18px;
    border-top: 1px solid rgba(217, 231, 255, 0.86);
    text-align: left;
    vertical-align: top;
}

.table th {
    color: var(--text-soft);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
}

.badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    gap: 6px;
    border-radius: 999px;
    padding: 6px 10px;
    font-size: 12px;
    font-weight: 800;
    background: var(--surface-strong);
    color: var(--royal-strong);
}

.badge-success {
    background: #e6f8ee;
    color: #0f8c56;
}

.badge-warning {
    background: #fff2da;
    color: #a05d00;
}

.badge-danger {
    background: #fff0f2;
    color: #a9283f;
}

.form-grid {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.form-grid .full {
    grid-column: 1 / -1;
}

.empty {
    padding: 26px 22px;
    color: var(--text-soft);
    line-height: 1.7;
}

.small {
    font-size: 13px;
    color: var(--text-soft);
}

.code-chip {
    display: inline-flex;
    margin-top: 10px;
    padding: 7px 10px;
    border-radius: 12px;
    background: #edf4ff;
    color: var(--royal-strong);
    font-size: 12px;
    font-weight: 800;
}

.qr-preview {
    margin-top: 12px;
}

.qr-preview img {
    width: 132px;
    height: 132px;
    object-fit: contain;
    border-radius: 16px;
    border: 1px solid var(--line);
    background: #fff;
    padding: 8px;
}

.conversation-shell {
    display: grid;
    grid-template-columns: 410px minmax(0, 1fr);
    gap: 18px;
    align-items: stretch;
}

.conversation-list-card,
.conversation-detail-card {
    min-height: calc(100vh - 170px);
    max-height: calc(100vh - 170px);
    display: flex;
    flex-direction: column;
}

.conversation-search,
.conversation-buckets,
.conversation-header,
.composer {
    padding: 18px 20px;
}

.conversation-search {
    padding-bottom: 14px;
}

.conversation-buckets {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    border-top: 1px solid rgba(217, 231, 255, 0.78);
}

.bucket-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    border-radius: 14px;
    background: rgba(31, 107, 255, 0.08);
    color: var(--royal-strong);
    font-weight: 800;
}

.bucket-pill .badge {
    padding-inline: 8px;
    min-width: 24px;
}

.bucket-pill.active {
    background: linear-gradient(135deg, var(--royal), var(--royal-strong));
    color: #fff;
    box-shadow: 0 14px 24px rgba(31, 107, 255, 0.2);
}

.bucket-pill.active .badge {
    background: rgba(255, 255, 255, 0.18);
    color: #fff;
}

.conversation-items {
    display: grid;
    border-top: 1px solid rgba(217, 231, 255, 0.78);
    overflow: auto;
}

.conversation-item {
    display: grid;
    grid-template-columns: 52px minmax(0, 1fr) auto;
    gap: 14px;
    padding: 18px 20px;
    border-top: 1px solid rgba(217, 231, 255, 0.66);
    align-items: start;
    transition: background 0.18s ease, transform 0.18s ease;
}

.conversation-item:first-child {
    border-top: none;
}

.conversation-item:hover {
    background: rgba(31, 107, 255, 0.04);
}

.conversation-item.active {
    background: linear-gradient(135deg, rgba(31, 107, 255, 0.08), rgba(240, 180, 55, 0.12));
}

.conversation-avatar {
    width: 52px;
    height: 52px;
    border-radius: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(180deg, #d7e7ff 0%, #c2d8ff 100%);
    color: var(--navy);
    font-size: 24px;
    font-weight: 800;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.conversation-meta {
    min-width: 0;
}

.conversation-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.conversation-row strong {
    font-size: 16px;
    line-height: 1.2;
}

.conversation-subline {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 4px;
}

.conversation-preview {
    margin-top: 8px;
    color: var(--text-soft);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-size: 14px;
    line-height: 1.55;
}

.status-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.02em;
}

.status-waiting {
    background: #fff2da;
    color: #a05d00;
}

.status-open {
    background: #e6f8ee;
    color: #0f8c56;
}

.status-pending {
    background: #edf4ff;
    color: var(--royal-strong);
}

.status-closed {
    background: #f1f5f9;
    color: #475569;
}

.conversation-empty-state {
    min-height: 100%;
    display: grid;
    place-content: center;
    text-align: center;
    padding: 28px;
    background:
        radial-gradient(circle at center, rgba(31, 107, 255, 0.08), transparent 36%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(248, 251, 255, 0.92));
}

.conversation-empty-state .section-title {
    font-size: 40px;
}

.conversation-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    border-bottom: 1px solid rgba(217, 231, 255, 0.8);
    flex-wrap: wrap;
    background: rgba(255, 255, 255, 0.98);
}

.conversation-headline {
    min-width: 0;
    display: grid;
    gap: 8px;
}

.conversation-headline-meta {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
}

.conversation-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: flex-end;
    margin-left: auto;
    width: min(100%, 720px);
}

.inline-form {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.inline-form-transfer {
    width: 100%;
    justify-content: flex-end;
}

.action-stack {
    display: grid;
    gap: 12px;
    width: 100%;
}

.action-row {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    flex-wrap: wrap;
}

.compact-select {
    min-width: 170px;
    max-width: 220px;
    padding: 12px 14px;
}

.message-thread {
    display: grid;
    gap: 14px;
    padding: 24px;
    min-height: 0;
    flex: 1;
    background:
        linear-gradient(180deg, rgba(237, 244, 255, 0.86), rgba(248, 251, 255, 0.94)),
        linear-gradient(90deg, rgba(31, 107, 255, 0.03) 1px, transparent 1px);
    background-size: auto, 32px 32px;
    overflow: auto;
}

.message-bubble {
    max-width: 74%;
    padding: 14px 16px;
    border-radius: 22px;
    background: #fff;
    border: 1px solid rgba(217, 231, 255, 0.9);
    box-shadow: 0 12px 24px rgba(15, 39, 92, 0.05);
}

.message-bubble.outbound {
    margin-left: auto;
    background: linear-gradient(180deg, #edf4ff 0%, #dceaff 100%);
}

.message-body {
    line-height: 1.65;
    color: var(--text);
}

.message-meta {
    margin-top: 8px;
    color: var(--text-soft);
    font-size: 12px;
    font-weight: 700;
}

.composer {
    border-top: 1px solid rgba(217, 231, 255, 0.82);
    background: rgba(255, 255, 255, 0.94);
}

.composer-input {
    min-height: 104px;
}

.composer-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 12px;
}

.check-grid {
    display: grid;
    gap: 12px;
}

.check-item {
    display: flex;
    gap: 12px;
    align-items: center;
    justify-content: space-between;
    padding: 12px 14px;
    border-radius: 16px;
    border: 1px solid var(--line);
    background: #fff;
}

.split {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}

.mode-conversations .topbar {
    align-items: flex-start;
    margin-bottom: 16px;
}

.mode-conversations .page-copy {
    margin-top: 8px;
}

@media (max-width: 1280px) {
    .conversation-shell {
        grid-template-columns: 360px minmax(0, 1fr);
    }
}

@media (max-width: 1080px) {
    .app-shell {
        grid-template-columns: 1fr;
    }

    .sidebar {
        position: relative;
        height: auto;
    }

    .topbar,
    .topbar-actions,
    .account-panel,
    .conversation-header,
    .conversation-actions,
    .inline-form {
        flex-direction: column;
        align-items: stretch;
    }

    .grid-3,
    .grid-2,
    .form-grid,
    .conversation-shell,
    .auth-card {
        grid-template-columns: 1fr;
    }

    .conversation-list-card,
    .conversation-detail-card {
        min-height: auto;
        max-height: none;
    }

    .message-bubble {
        max-width: 100%;
    }
}
