/* ============================================================
   Barnam Mail — Design System
   Brand palette:
     Deep Navy    #1B436F
     Vibrant Orange #F38321
     Golden Yellow  #FFB845
     Burnt Orange   #BC521B
   Theme: light by default, dark via [data-theme="dark"],
          system preference auto-applied by JS in app.js
   ============================================================ */

/* ---- CSS Custom Properties ---- */
:root {
    /* Brand */
    --bm-navy:       #1B436F;
    --bm-navy-dark:  #132f4f;
    --bm-navy-light: #2a5a8f;
    --bm-orange:     #F38321;
    --bm-orange-dark:#BC521B;
    --bm-gold:       #FFB845;

    /* Light theme tokens */
    --bg-app:        #f0f2f5;
    --bg-surface:    #ffffff;
    --bg-surface-2:  #f7f8fa;
    --bg-surface-3:  #eef0f4;
    --bg-sidebar:    #1B436F;
    --bg-navbar:     #1B436F;

    --text-primary:  #1a1d23;
    --text-secondary:#5a6170;
    --text-muted:    #8b93a4;
    --text-on-brand: #ffffff;

    --border:        #e2e5ea;
    --border-light:  #f0f2f5;

    --accent:        #F38321;
    --accent-hover:  #d97318;
    --accent-subtle: rgba(243,131,33,.10);

    --item-hover:    #f0f2f5;
    --item-active-bg:#fff5eb;
    --item-active-border: #F38321;

    --unread-bg:     #fff9f2;
    --unread-dot:    #F38321;

    --scrollbar-track: #f0f2f5;
    --scrollbar-thumb: #c8cdd6;

    --shadow-sm: 0 1px 3px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04);
    --shadow-md: 0 4px 16px rgba(0,0,0,.08), 0 2px 6px rgba(0,0,0,.05);
    --shadow-lg: 0 12px 40px rgba(0,0,0,.12);

    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 14px;

    --transition: 0.18s ease;
}

/* ---- Dark theme ---- */
[data-theme="dark"] {
    --bg-app:        #0e1117;
    --bg-surface:    #161b24;
    --bg-surface-2:  #1c2233;
    --bg-surface-3:  #222a3a;
    --bg-sidebar:    #0f1822;
    --bg-navbar:     #0f1822;

    --text-primary:  #e8eaf0;
    --text-secondary:#9ba5ba;
    --text-muted:    #606880;
    --text-on-brand: #ffffff;

    --border:        #242d3e;
    --border-light:  #1c2233;

    --accent:        #F38321;
    --accent-hover:  #FFB845;
    --accent-subtle: rgba(243,131,33,.12);

    --item-hover:    #1c2233;
    --item-active-bg:rgba(243,131,33,.12);
    --item-active-border: #F38321;

    --unread-bg:     rgba(243,131,33,.06);
    --unread-dot:    #FFB845;

    --scrollbar-track: #161b24;
    --scrollbar-thumb: #2d3548;

    --shadow-sm: 0 1px 3px rgba(0,0,0,.3);
    --shadow-md: 0 4px 16px rgba(0,0,0,.4);
    --shadow-lg: 0 12px 40px rgba(0,0,0,.5);
}

/* ============================================================
   Reset & Base
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; }

body {
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
                 "Inter", "Helvetica Neue", Arial, sans-serif;
    font-size: 14px;
    line-height: 1.5;
    background-color: var(--bg-app);
    color: var(--text-primary);
    height: 100vh;
    overflow: hidden;
    -webkit-font-smoothing: antialiased;
}

/* Auth pages need scrolling */
body.auth-body {
    height: auto;
    min-height: 100vh;
    overflow: auto;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); text-decoration: underline; }

/* ============================================================
   Scrollbars
   ============================================================ */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--scrollbar-track); }
::-webkit-scrollbar-thumb {
    background: var(--scrollbar-thumb);
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* ============================================================
   Dashboard Layout
   ============================================================ */
.dashboard {
    display: flex;
    flex-direction: column;
    height: 100vh;
}

.main-content {
    display: flex;
    flex: 1;
    overflow: hidden;
}

/* ============================================================
   Top Navbar
   ============================================================ */
.bm-navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 56px;
    padding: 0 16px 0 0;
    background: var(--bg-navbar);
    border-bottom: 1px solid rgba(255,255,255,.06);
    flex-shrink: 0;
    gap: 12px;
    box-shadow: var(--shadow-sm);
    z-index: 100;
}

.bm-navbar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 250px;
    padding: 0 16px;
    flex-shrink: 0;
    text-decoration: none;
}

.bm-navbar-logo {
    width: 32px;
    height: 32px;
    background: var(--bm-orange);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 17px;
    color: #fff;
    flex-shrink: 0;
}

.bm-navbar-brand-name {
    font-size: 17px;
    font-weight: 700;
    color: #fff;
    letter-spacing: -0.3px;
}

.bm-navbar-center {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    max-width: 480px;
    margin: 0 auto;
}

.bm-search {
    position: relative;
    width: 100%;
}

.bm-search input {
    width: 100%;
    height: 36px;
    padding: 0 12px 0 36px;
    background: rgba(255,255,255,.10);
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 20px;
    color: #fff;
    font-size: 13px;
    outline: none;
    transition: var(--transition);
}

.bm-search input::placeholder { color: rgba(255,255,255,.45); }

.bm-search input:focus {
    background: rgba(255,255,255,.16);
    border-color: var(--bm-orange);
}

.bm-search-icon {
    position: absolute;
    left: 11px;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255,255,255,.45);
    font-size: 14px;
    pointer-events: none;
}

.bm-navbar-end {
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Theme toggle button */
.bm-icon-btn {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    border: none;
    background: transparent;
    color: rgba(255,255,255,.7);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    cursor: pointer;
    transition: var(--transition);
    padding: 0;
}

.bm-icon-btn:hover {
    background: rgba(255,255,255,.10);
    color: #fff;
}

/* Status dot */
.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
    animation: pulse 2.5s infinite;
    flex-shrink: 0;
}
.status-green  { background: #34d399; }
.status-yellow { background: var(--bm-gold); }
.status-red    { background: #f87171; }

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: .45; }
}

/* User menu */
.bm-user-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 10px 4px 4px;
    border-radius: 20px;
    border: 1px solid rgba(255,255,255,.12);
    background: transparent;
    color: rgba(255,255,255,.85);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
}

.bm-user-btn:hover {
    background: rgba(255,255,255,.10);
    border-color: rgba(255,255,255,.2);
    color: #fff;
}

.bm-avatar {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--bm-orange);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
    flex-shrink: 0;
}

/* Override Bootstrap dropdown to match theme */
.dropdown-menu {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    padding: 6px;
    min-width: 180px;
}

.dropdown-item {
    color: var(--text-primary);
    border-radius: var(--radius-sm);
    font-size: 13px;
    padding: 7px 10px;
    transition: var(--transition);
}

.dropdown-item:hover {
    background: var(--item-hover);
    color: var(--accent);
}

.dropdown-item-text {
    color: var(--text-muted);
    font-size: 12px;
    padding: 4px 10px;
    display: block;
}

.dropdown-divider { border-color: var(--border); margin: 4px 0; }

/* ============================================================
   Sidebar
   ============================================================ */
.sidebar {
    width: 250px;
    background: var(--bg-sidebar);
    border-right: 1px solid rgba(255,255,255,.05);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    overflow: hidden;
}

.sidebar-inner {
    padding: 14px 10px;
    flex: 1;
    overflow-y: auto;
}

/* Compose button */
.btn-compose {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    height: 40px;
    border-radius: var(--radius-md);
    border: none;
    background: var(--bm-orange);
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    margin-bottom: 16px;
    letter-spacing: 0.2px;
}

.btn-compose:hover {
    background: var(--bm-orange-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(243,131,33,.4);
}

.btn-compose:active { transform: translateY(0); }

/* Folder section label */
.sidebar-label {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: rgba(255,255,255,.35);
    padding: 10px 10px 6px;
}

/* Folder item */
.folder-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.folder-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 9px 12px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
    color: rgba(255,255,255,.65);
    text-decoration: none;
    font-size: 13.5px;
    margin-bottom: 2px;
}

.folder-item:hover {
    background: rgba(255,255,255,.08);
    color: #fff;
    text-decoration: none;
}

.folder-item.active {
    background: var(--bm-orange);
    color: #fff;
    font-weight: 600;
}

.folder-item.active:hover {
    background: var(--bm-orange-dark);
}

.folder-item-left {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.folder-item i {
    font-size: 15px;
    flex-shrink: 0;
    opacity: .8;
}

.folder-item.active i { opacity: 1; }

.folder-name {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.folder-badge {
    background: var(--bm-orange);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    padding: 1px 7px;
    border-radius: 10px;
    min-width: 20px;
    text-align: center;
    flex-shrink: 0;
}

.folder-item.active .folder-badge {
    background: rgba(255,255,255,.25);
}

/* Sidebar footer */
.sidebar-footer {
    padding: 10px;
    border-top: 1px solid rgba(255,255,255,.06);
}

/* ============================================================
   Message List Panel
   ============================================================ */
.message-list {
    width: 340px;
    background: var(--bg-surface);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
}

.message-list-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
}

.message-list-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

.message-items {
    flex: 1;
    overflow-y: auto;
}

/* Individual message row */
.message-item {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-light);
    cursor: pointer;
    transition: background-color var(--transition);
    position: relative;
}

.message-item:hover { background: var(--item-hover); }

.message-item.active {
    background: var(--item-active-bg);
    border-left: 3px solid var(--item-active-border);
    padding-left: 13px;
}

.message-item.unread { background: var(--unread-bg); }

.message-item.unread::before {
    content: '';
    position: absolute;
    left: 6px;
    top: 50%;
    transform: translateY(-50%);
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--unread-dot);
}

.message-item.unread.active::before { display: none; }

.message-sender {
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 3px;
    font-size: 13px;
}

.message-item.unread .message-sender { font-weight: 700; }

.message-date {
    font-size: 11px;
    color: var(--text-muted);
    flex-shrink: 0;
    margin-left: 8px;
}

.message-subject {
    color: var(--text-secondary);
    font-size: 12.5px;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.message-item.unread .message-subject {
    color: var(--text-primary);
    font-weight: 600;
}

.message-preview {
    font-size: 11.5px;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.message-size {
    font-size: 11px;
    color: var(--text-muted);
    opacity: .7;
}

.msg-from {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 160px;
    display: inline-block;
}

.message-list-footer {
    padding: 10px 16px;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: center;
    flex-shrink: 0;
}

/* ============================================================
   Message Viewer
   ============================================================ */
.message-viewer {
    flex: 1;
    background: var(--bg-surface);
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.no-message-selected {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: var(--text-muted);
    gap: 12px;
}

.no-message-icon {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: var(--bg-surface-3);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    color: var(--text-muted);
}

.no-message-selected p {
    font-size: 14px;
    margin: 0;
}

/* Action toolbar */
.message-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 20px;
    border-bottom: 1px solid var(--border);
    background: var(--bg-surface-2);
    flex-wrap: wrap;
    flex-shrink: 0;
}

/* Message content area */
.message-content {
    padding: 28px 32px;
    flex: 1;
}

.message-header {
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 2px solid var(--border-light);
}

.message-header h3 {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 16px;
    line-height: 1.3;
}

.message-meta {
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-size: 13px;
}

.message-meta-row {
    display: flex;
    align-items: flex-start;
}

.message-meta-label {
    font-weight: 600;
    color: var(--text-muted);
    min-width: 60px;
    flex-shrink: 0;
    padding-top: 1px;
}

.message-meta-value { color: var(--text-secondary); }

.message-body {
    line-height: 1.75;
    color: var(--text-primary);
    font-size: 14px;
}

.message-body img { max-width: 100%; height: auto; }

/* Attachments */
.message-attachments {
    margin-top: 28px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
}

.message-attachments h6 {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .8px;
    color: var(--text-muted);
    margin-bottom: 10px;
}

.attachment-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.attachment-item {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 7px 12px;
    background: var(--bg-surface-2);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    text-decoration: none;
    color: var(--text-secondary);
    font-size: 12.5px;
    transition: var(--transition);
}

.attachment-item:hover {
    background: var(--accent-subtle);
    border-color: var(--accent);
    color: var(--accent);
    text-decoration: none;
}

.attachment-item i {
    color: var(--accent);
    font-size: 15px;
}

/* ============================================================
   Buttons (override Bootstrap for brand consistency)
   ============================================================ */
.btn-primary {
    background: var(--accent) !important;
    border-color: var(--accent) !important;
    color: #fff !important;
    font-weight: 600;
    border-radius: var(--radius-sm) !important;
}

.btn-primary:hover, .btn-primary:focus {
    background: var(--accent-hover) !important;
    border-color: var(--accent-hover) !important;
    box-shadow: 0 0 0 3px rgba(243,131,33,.25) !important;
}

.btn-outline-secondary {
    border-color: var(--border) !important;
    color: var(--text-secondary) !important;
    border-radius: var(--radius-sm) !important;
    background: var(--bg-surface) !important;
}

.btn-outline-secondary:hover {
    background: var(--item-hover) !important;
    border-color: var(--text-muted) !important;
    color: var(--text-primary) !important;
}

.btn-outline-danger {
    border-radius: var(--radius-sm) !important;
}

/* ============================================================
   Forms (override Bootstrap for dark theme compatibility)
   ============================================================ */
.form-control, .form-select {
    background: var(--bg-surface-2) !important;
    border-color: var(--border) !important;
    color: var(--text-primary) !important;
    border-radius: var(--radius-sm) !important;
    font-size: 13.5px;
    transition: var(--transition);
}

.form-control::placeholder { color: var(--text-muted) !important; }

.form-control:focus, .form-select:focus {
    background: var(--bg-surface) !important;
    border-color: var(--accent) !important;
    box-shadow: 0 0 0 3px rgba(243,131,33,.15) !important;
    color: var(--text-primary) !important;
    outline: none;
}

.form-label {
    font-size: 12.5px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 5px;
}

.form-text {
    color: var(--text-muted) !important;
    font-size: 11.5px;
}

.form-check-input:checked {
    background-color: var(--accent) !important;
    border-color: var(--accent) !important;
}

/* ============================================================
   Modals
   ============================================================ */
.modal-content {
    background: var(--bg-surface) !important;
    border: 1px solid var(--border) !important;
    border-radius: var(--radius-lg) !important;
    box-shadow: var(--shadow-lg) !important;
}

.modal-header {
    border-bottom: 1px solid var(--border) !important;
    padding: 16px 20px;
}

.modal-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary) !important;
}

.modal-body { padding: 20px; }

.modal-footer {
    border-top: 1px solid var(--border) !important;
    padding: 12px 20px;
}

.btn-close {
    filter: none !important;
}

[data-theme="dark"] .btn-close {
    filter: invert(1) !important;
}

/* Section labels inside modals */
.section-label {
    font-size: 10.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border);
}

/* ============================================================
   Toast Notifications
   ============================================================ */
.toast {
    background: var(--bg-surface) !important;
    border: 1px solid var(--border) !important;
    border-radius: var(--radius-md) !important;
    box-shadow: var(--shadow-md) !important;
    min-width: 280px;
}

.toast-header {
    background: transparent !important;
    border-bottom: 1px solid var(--border) !important;
    color: var(--text-primary) !important;
    font-weight: 600;
    font-size: 13px;
}

.toast-body {
    color: var(--text-secondary) !important;
    font-size: 13px;
}

/* ============================================================
   Pagination
   ============================================================ */
.pagination { gap: 3px; }

.page-link {
    border-radius: var(--radius-sm) !important;
    border: 1px solid var(--border) !important;
    background: var(--bg-surface) !important;
    color: var(--text-secondary) !important;
    font-size: 12.5px;
    padding: 4px 10px;
    transition: var(--transition);
}

.page-link:hover {
    background: var(--item-hover) !important;
    color: var(--accent) !important;
    border-color: var(--border) !important;
}

.page-item.active .page-link {
    background: var(--accent) !important;
    border-color: var(--accent) !important;
    color: #fff !important;
}

.page-item.disabled .page-link { opacity: .4; }

/* ============================================================
   Login / Register Pages
   ============================================================ */
.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--bm-navy) 0%, var(--bm-navy-dark) 60%, var(--bm-orange-dark) 100%);
    padding: 32px 16px;
}

.auth-card {
    position: relative;
    z-index: 1;
    background: var(--bg-surface);
    border-radius: var(--radius-lg);
    padding: 40px;
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 480px;
    border: 1px solid var(--border);
}

.auth-card-wide { max-width: 700px; }

.auth-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 28px;
}

.auth-logo-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--bm-orange), var(--bm-orange-dark));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: #fff;
    box-shadow: 0 4px 16px rgba(243,131,33,.4);
}

.auth-logo-text {
    font-size: 24px;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -0.5px;
}

.auth-subtitle {
    text-align: center;
    color: var(--text-muted);
    font-size: 13.5px;
    margin-top: -18px;
    margin-bottom: 28px;
}

.auth-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 20px 0;
    color: var(--text-muted);
    font-size: 12px;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
}

.auth-footer {
    text-align: center;
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 20px;
}

/* ============================================================
   Summernote overrides
   ============================================================ */
.note-editor.note-frame {
    border: 1px solid var(--border) !important;
    border-radius: var(--radius-sm) !important;
    background: var(--bg-surface-2) !important;
}

.note-toolbar {
    background: var(--bg-surface-3) !important;
    border-bottom: 1px solid var(--border) !important;
}

.note-editing-area {
    min-height: 260px;
    background: var(--bg-surface) !important;
}

.note-editable {
    color: var(--text-primary) !important;
    background: var(--bg-surface) !important;
}

/* ============================================================
   Loading
   ============================================================ */
.spinner-border-sm {
    width: 1rem;
    height: 1rem;
    border-width: 0.15em;
}

.loading-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 48px 20px;
    gap: 12px;
    color: var(--text-muted);
}

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 1024px) {
    .sidebar { width: 220px; }
    .bm-navbar-brand { width: 220px; }
    .message-list { width: 300px; }
}

@media (max-width: 768px) {
    body { overflow: auto; }

    .bm-navbar { padding: 0 10px; }
    .bm-navbar-brand { width: auto; }
    .bm-navbar-center { display: none; }

    .main-content { flex-direction: column; overflow: auto; }

    .sidebar {
        width: 100%;
        max-height: 200px;
        border-right: none;
        border-bottom: 1px solid rgba(255,255,255,.06);
    }

    .message-list {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid var(--border);
        max-height: 40vh;
    }

    .message-viewer { min-height: 50vh; }

    .message-content { padding: 16px; }

    .auth-card { padding: 28px 20px; }
}
