:root {
    --mbt-bg: #f4f6fb;
    --mbt-sidebar: #14213d;
    --mbt-sidebar-active: #1f2f57;
    --mbt-accent: #4361ee;
    --mbt-accent-soft: #eef1fe;
    --mbt-border: #e4e8f0;
    --mbt-text-muted: #6b7280;
}

body {
    background: var(--mbt-bg);
    font-family: -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: #1f2937;
}

.mbt-shell { display: flex; min-height: 100vh; }

.mbt-sidebar {
    width: 240px;
    flex-shrink: 0;
    background: var(--mbt-sidebar);
    color: #cbd5e1;
    display: flex;
    flex-direction: column;
}

.mbt-sidebar .brand {
    padding: 1.25rem 1.25rem 1rem;
    font-weight: 700;
    color: #fff;
    font-size: 1.05rem;
    display: flex;
    align-items: center;
    gap: .5rem;
}

.mbt-sidebar nav { flex: 1; padding: .5rem; }

.mbt-sidebar .nav-link {
    color: #cbd5e1;
    border-radius: .5rem;
    padding: .55rem .85rem;
    margin-bottom: .15rem;
    font-size: .92rem;
    display: flex;
    align-items: center;
    gap: .6rem;
}

.mbt-sidebar .nav-link:hover { background: var(--mbt-sidebar-active); color: #fff; }
.mbt-sidebar .nav-link.active { background: var(--mbt-accent); color: #fff; }

.mbt-sidebar .sidebar-user {
    padding: 1rem 1.25rem;
    border-top: 1px solid rgba(255,255,255,.08);
    font-size: .82rem;
}

.mbt-main { flex: 1; min-width: 0; }

.mbt-topbar {
    background: #fff;
    border-bottom: 1px solid var(--mbt-border);
    padding: .85rem 1.5rem;
}

.mbt-content { padding: 1.5rem; }

.card { border: 1px solid var(--mbt-border); border-radius: .75rem; }
.card-header { background: #fff; border-bottom: 1px solid var(--mbt-border); font-weight: 600; }

.stat-card { border-radius: .85rem; padding: 1.1rem 1.3rem; background: #fff; border: 1px solid var(--mbt-border); }
.stat-card .stat-value { font-size: 1.8rem; font-weight: 700; }
.stat-card .stat-label { color: var(--mbt-text-muted); font-size: .82rem; text-transform: uppercase; letter-spacing: .04em; }

.badge-status-open { background: #4361ee; }
.badge-status-pending { background: #f59e0b; }
.badge-status-in_progress { background: #06b6d4; }
.badge-status-resolved { background: #10b981; }
.badge-status-closed { background: #6b7280; }

.badge-priority-low { background: #94a3b8; }
.badge-priority-normal { background: #4361ee; }
.badge-priority-high { background: #f97316; }
.badge-priority-urgent { background: #ef4444; }

.msg-bubble { border-radius: .75rem; padding: .9rem 1.1rem; margin-bottom: 1rem; border: 1px solid var(--mbt-border); }
.msg-bubble.inbound { background: #fff; }
.msg-bubble.outbound { background: var(--mbt-accent-soft); }
.msg-bubble .msg-meta { font-size: .78rem; color: var(--mbt-text-muted); margin-bottom: .4rem; }
.msg-bubble .msg-body { font-size: .92rem; }
.msg-bubble.auto-response { border-style: dashed; }

.note-card { background: #fffbea; border: 1px solid #fde68a; border-radius: .75rem; padding: .8rem 1rem; margin-bottom: .75rem; }

.timeline-item { font-size: .82rem; color: var(--mbt-text-muted); padding: .3rem 0; border-left: 2px solid var(--mbt-border); padding-left: .8rem; margin-left: .2rem; }

.btn-ms {
    background: #fff;
    border: 1px solid #8c8c8c;
    color: #5e5e5e;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: .6rem;
    padding: .6rem 1.1rem;
}
.btn-ms:hover { background: #f3f3f3; }

.login-card { max-width: 400px; width: 100%; }

.table > :not(caption) > * > * { vertical-align: middle; }
