:root {
    --green: #20b15a;
    --blue: #2563eb;
    --ink: #17202a;
    --muted: #667085;
    --line: #e6eaf0;
    --bg: #f6f8fb;
}

body { background: var(--bg); color: var(--ink); font-family: Inter, system-ui, -apple-system, Segoe UI, sans-serif; }
.app-shell { min-height: 100vh; display: flex; }
.sidebar { width: 260px; background: #111827; color: #fff; padding: 20px; position: sticky; top: 0; height: 100vh; }
.brand { font-size: 22px; font-weight: 800; margin-bottom: 24px; color: #fff; }
.sidebar nav a { display: block; color: #cbd5e1; text-decoration: none; padding: 11px 12px; border-radius: 8px; margin-bottom: 4px; }
.sidebar nav a:hover { background: rgba(255,255,255,.08); color: #fff; }
.main { flex: 1; min-width: 0; }
.topbar { height: 64px; background: #fff; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; padding: 0 24px; position: sticky; top: 0; z-index: 2; }
.content { padding: 24px; }
.page-title { font-size: 26px; font-weight: 800; margin: 0; }
.metric, .panel { background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 20px; box-shadow: 0 10px 22px rgba(15,23,42,.04); }
.metric span { display: block; color: var(--muted); font-size: 14px; }
.metric strong { font-size: 34px; line-height: 1.1; }
.panel h2 { font-size: 18px; margin-bottom: 16px; }
.empty-state { border: 1px dashed #cbd5e1; border-radius: 8px; padding: 28px; color: var(--muted); background: #f8fafc; text-align: center; }
.status-row { display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); padding: 12px 0; }
.login-page { min-height: 100vh; display: grid; place-items: center; padding: 20px; }
.login-card { width: min(420px, 100%); background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 28px; box-shadow: 0 24px 70px rgba(15,23,42,.12); }
.login-card h1 { font-weight: 800; }
.inbox { display: grid; grid-template-columns: 330px 1fr 300px; min-height: calc(100vh - 136px); background: #fff; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.conversation-list, .contact-pane { background: #fff; }
.conversation-list { border-right: 1px solid var(--line); overflow: auto; }
.contact-pane { border-left: 1px solid var(--line); padding: 18px; }
.message-pane { display: grid; place-items: center; background: #f8fafc; padding: 20px; }
.conversation-item { display: flex; gap: 12px; padding: 14px; border-bottom: 1px solid var(--line); color: inherit; text-decoration: none; }
.conversation-item:hover { background: #f8fafc; }
.conversation-item small, .conversation-item p { display: block; color: var(--muted); margin: 0; font-size: 13px; }
.avatar { width: 42px; height: 42px; border-radius: 50%; background: var(--green); color: #fff; display: grid; place-items: center; font-weight: 800; flex: 0 0 auto; }
.qr-image { width: min(360px, 100%); height: auto; border: 1px solid var(--line); border-radius: 8px; padding: 12px; background: #fff; }
.contact-picker { max-height: 220px; overflow: auto; border: 1px solid var(--line); border-radius: 8px; padding: 12px; background: #f8fafc; }
.schedule-message { max-width: 260px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.timeline-list { display: grid; gap: 12px; }
.timeline-list div { border: 1px solid var(--line); border-radius: 8px; padding: 14px; background: #f8fafc; }
.timeline-list strong { display: block; font-size: 16px; }
.timeline-list span { color: var(--muted); }
.billing-message { min-height: 210px; font-family: Consolas, Monaco, monospace; font-size: 13px; }

@media (max-width: 992px) {
    .sidebar { position: fixed; left: -280px; transition: left .2s ease; z-index: 10; }
    .sidebar.open { left: 0; }
    .content { padding: 16px; }
    .inbox { grid-template-columns: 1fr; }
    .contact-pane { display: none; }
}
