:root { --brand: #075e54; --brand-2: #0b7a6d; --sidebar-w: 250px; }
body { background: #f4f6f8; }
.bg-brand { background: var(--brand) !important; }
.app-shell { min-height: 100vh; }
.main { min-width: 0; }

.sidebar { width: var(--sidebar-w); }
@media (min-width: 992px) {
  .sidebar { position: sticky; top: 0; height: 100vh; flex-shrink: 0; overflow-y: auto; }
}
.sidebar .nav-link { color: rgba(255,255,255,.82); border-radius: .5rem; padding: .55rem .75rem; margin-bottom: 2px; }
.sidebar .nav-link:hover { color: #fff; background: rgba(255,255,255,.08); }
.sidebar .nav-link.active { color: #fff; background: rgba(255,255,255,.16); font-weight: 600; }
.sidebar .brand { border-bottom: 1px solid rgba(255,255,255,.1); margin-bottom: .5rem; }
.offcanvas-lg.bg-brand .offcanvas-header { color: #fff; }

.card { border: 1px solid #e3e7eb; border-radius: .75rem; }
.card-header:first-child { border-radius: .75rem .75rem 0 0; }
.stat-card .stat-icon { width: 2.5rem; height: 2.5rem; border-radius: .6rem; display: inline-flex; align-items: center; justify-content: center; font-size: 1.2rem; }
.table > :not(caption) > * > * { padding-left: .75rem; padding-right: .75rem; }
.table thead th { font-size: .8rem; text-transform: uppercase; letter-spacing: .02em; color: #6c757d; font-weight: 600; background: #fafbfc; }

.login-page { background: linear-gradient(160deg, #e7f3f1 0%, #f4f6f8 60%); }
.login-logo { width: 3.5rem; height: 3.5rem; border-radius: 1rem; background: var(--brand); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 1.8rem; }

.step { display: inline-flex; width: 1.5rem; height: 1.5rem; border-radius: 50%; background: var(--brand); color: #fff; font-size: .8rem; align-items: center; justify-content: center; margin-right: .35rem; }
.template-body { white-space: pre-wrap; background: #f8f9fa; border: 1px dashed #ced4da; border-radius: .5rem; padding: .75rem; }
.contact-list { max-height: 340px; overflow-y: auto; background: #fff; }
.contact-list .contact-row { display: flex; align-items: center; gap: .6rem; padding: .45rem .75rem; border-bottom: 1px solid #f1f3f5; cursor: pointer; margin: 0; }
.contact-list .contact-row:hover { background: #f8f9fa; }
.wa-bubble { white-space: pre-wrap; background: #dcf8c6; border-radius: .6rem; padding: .75rem 1rem; max-width: 30rem; box-shadow: 0 1px 1px rgba(0,0,0,.08); word-wrap: break-word; }

.thread-card { min-height: 70vh; }
.thread { background: #ece5dd; overflow-y: auto; max-height: 62vh; min-height: 300px; display: flex; flex-direction: column; gap: .4rem; }
.msg { max-width: 80%; padding: .45rem .7rem; border-radius: .6rem; box-shadow: 0 1px 1px rgba(0,0,0,.08); word-wrap: break-word; }
.msg-in { align-self: flex-start; background: #fff; }
.msg-out { align-self: flex-end; background: #dcf8c6; }
.msg-body { white-space: pre-wrap; }
.msg-meta { font-size: .72rem; color: #6c757d; text-align: right; margin-top: .15rem; }
.msg-error { font-size: .75rem; color: #dc3545; }
.conversation-list { max-height: 72vh; overflow-y: auto; }
.history-body { max-width: 22rem; }
.progress { height: .9rem; }
