:root {
	--brand: #0f766e;
	--brand-dark: #115e59;
	--brand-soft: #ccfbf1;
	--ink: #0f172a;
	--muted: #64748b;
	--bg: #f4f6f8;
	--line: #e2e8f0;
	--sidebar: #0b1f1d;
	--bs-primary: #0f766e;
	--bs-primary-rgb: 15, 118, 110;
	--bs-link-color: #0f766e;
	--bs-link-color-rgb: 15, 118, 110;
	--bs-link-hover-color: #115e59;
}
body { font-family: Inter, system-ui, -apple-system, "Segoe UI", sans-serif; background: var(--bg); color: var(--ink); font-size: .925rem; }
.btn-primary { --bs-btn-bg: var(--brand); --bs-btn-border-color: var(--brand); --bs-btn-hover-bg: var(--brand-dark); --bs-btn-hover-border-color: var(--brand-dark); --bs-btn-active-bg: var(--brand-dark); --bs-btn-disabled-bg: var(--brand); --bs-btn-disabled-border-color: var(--brand); }
.btn-outline-primary { --bs-btn-color: var(--brand); --bs-btn-border-color: var(--brand); --bs-btn-hover-bg: var(--brand); --bs-btn-hover-border-color: var(--brand); --bs-btn-active-bg: var(--brand-dark); }
.form-check-input:checked { background-color: var(--brand); border-color: var(--brand); }
.text-brand { color: var(--brand) !important; }
.bg-brand-soft { background: var(--brand-soft) !important; }

/* Layout */
.app { display: flex; min-height: 100vh; }
.sidebar { width: 250px; background: var(--sidebar); color: #cbd5e1; display: flex; flex-direction: column; padding: 18px 12px; position: sticky; top: 0; height: 100vh; overflow-y: auto; flex-shrink: 0; }
.sidebar a { color: #cbd5e1; text-decoration: none; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 1.15rem; color: #fff !important; padding: 4px 8px 16px; }
.brand-mark { width: 32px; height: 32px; border-radius: 9px; background: linear-gradient(135deg, #14b8a6, #0f766e); display: grid; place-items: center; color: #fff; }
.biz-chip { display: flex; gap: 10px; align-items: center; background: rgba(255,255,255,.06); border-radius: 10px; padding: 10px; margin-bottom: 14px; color: #fff; }
.biz-avatar { width: 34px; height: 34px; border-radius: 8px; background: #134e4a; display: grid; place-items: center; font-weight: 700; flex-shrink: 0; }
.nav-section { font-size: .7rem; text-transform: uppercase; letter-spacing: .08em; color: #64748b; padding: 14px 10px 6px; }
.sidebar .nav-link { display: flex; align-items: center; gap: 10px; border-radius: 8px; padding: 8px 10px; font-weight: 500; }
.sidebar .nav-link:hover { background: rgba(255,255,255,.06); color: #fff; }
.sidebar .nav-link.active { background: var(--brand); color: #fff; }
.sidebar-foot { margin-top: auto; padding: 12px 10px 0; border-top: 1px solid rgba(255,255,255,.08); display: flex; justify-content: space-between; gap: 8px; }
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar { display: flex; align-items: center; gap: 12px; padding: 16px 28px; background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 10; }
.content { padding: 24px 28px; }
@media (max-width: 991.98px) {
	.sidebar { position: fixed; left: -260px; z-index: 1050; transition: left .2s; }
	.sidebar.open { left: 0; box-shadow: 0 0 0 100vmax rgba(0,0,0,.35); }
	.content { padding: 16px; }
	.topbar { padding: 12px 16px; }
}

/* Cards & stats */
.card { border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 1px 2px rgba(15,23,42,.04); }
.card-header { background: #fff; border-bottom: 1px solid var(--line); font-weight: 600; border-radius: 12px 12px 0 0 !important; }
.stat { padding: 18px; }
.stat .label { color: var(--muted); font-size: .8rem; font-weight: 500; }
.stat .value { font-size: 1.7rem; font-weight: 700; line-height: 1.2; }
.stat .icon { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; font-size: 1.15rem; }
.table > :not(caption) > * > * { padding: .65rem .75rem; }
.table thead th { font-size: .75rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 600; background: #f8fafc; }
.empty { text-align: center; padding: 48px 16px; color: var(--muted); }
.empty i { font-size: 2.4rem; display: block; margin-bottom: 8px; color: #cbd5e1; }
.setup-step { display: flex; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px dashed var(--line); }
.setup-step:last-child { border-bottom: 0; }
.setup-step .dot { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: #e2e8f0; color: #64748b; flex-shrink: 0; font-size: .8rem; }
.setup-step.done .dot { background: var(--brand); color: #fff; }
.tag { display: inline-block; background: #f1f5f9; color: #334155; border-radius: 999px; padding: 1px 8px; font-size: .75rem; margin: 1px; }

/* Inbox */
.inbox { display: grid; grid-template-columns: 330px 1fr; height: calc(100vh - 130px); min-height: 480px; background: #fff; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.inbox-list { border-right: 1px solid var(--line); display: flex; flex-direction: column; min-height: 0; }
.inbox-list .items { overflow-y: auto; flex: 1; }
.conv { display: flex; gap: 10px; padding: 12px 14px; border-bottom: 1px solid #f1f5f9; color: inherit; text-decoration: none; }
.conv:hover { background: #f8fafc; }
.conv.active { background: #f0fdfa; }
.conv .avatar, .chat-head .avatar { width: 38px; height: 38px; border-radius: 50%; background: #e2e8f0; display: grid; place-items: center; font-weight: 600; color: #475569; flex-shrink: 0; }
.conv .preview { color: var(--muted); font-size: .82rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat { display: flex; flex-direction: column; min-height: 0; }
.chat-head { display: flex; align-items: center; gap: 10px; padding: 10px 16px; border-bottom: 1px solid var(--line); }
.chat-body { flex: 1; overflow-y: auto; padding: 18px; background: #efeae2; background-image: radial-gradient(rgba(0,0,0,.035) 1px, transparent 1px); background-size: 16px 16px; }
.msg { max-width: 72%; padding: 7px 10px 5px; border-radius: 10px; margin-bottom: 8px; box-shadow: 0 1px 1px rgba(0,0,0,.08); word-wrap: break-word; }
.msg .text, .msg .js-wa { white-space: pre-wrap; }
.msg .who + .text, .msg .who + .js-wa { display: block; }
.msg.in { background: #fff; margin-right: auto; border-top-left-radius: 2px; }
.msg.out { background: #d9fdd3; margin-left: auto; border-top-right-radius: 2px; }
.msg.out.ai { background: #e0f2fe; }
.msg.out.campaign { background: #fef9c3; }
.msg.out.system { background: #f1f5f9; }
.msg .meta { font-size: .7rem; color: #64748b; text-align: right; margin-top: 2px; white-space: nowrap; }
.msg .who { font-size: .7rem; font-weight: 600; color: var(--brand); display: block; }
.chat-foot { border-top: 1px solid var(--line); padding: 10px; background: #f8fafc; }
@media (max-width: 991.98px) {
	.inbox { grid-template-columns: 1fr; height: auto; }
	.inbox.has-active .inbox-list { display: none; }
	.inbox:not(.has-active) .chat { display: none; }
	.chat-body { height: 60vh; }
}

/* Reviews */
.review { border-bottom: 1px solid var(--line); padding: 18px; }
.review:last-child { border-bottom: 0; }
.review .reply-box { background: #f8fafc; border-left: 3px solid var(--brand); border-radius: 6px; padding: 10px 12px; }
.bar { height: 8px; background: #e2e8f0; border-radius: 99px; overflow: hidden; }
.bar > span { display: block; height: 100%; background: #f59e0b; }

/* Auth pages */
.auth-wrap { min-height: 100vh; display: grid; grid-template-columns: 1fr 1fr; }
.auth-side { background: linear-gradient(160deg, #0b1f1d, #0f766e); color: #e2e8f0; padding: 56px; display: flex; flex-direction: column; justify-content: center; }
.auth-form { display: flex; align-items: center; justify-content: center; padding: 32px 16px; background: #fff; }
.auth-form .inner { width: 100%; max-width: 420px; }
@media (max-width: 767.98px) { .auth-wrap { grid-template-columns: 1fr; } .auth-side { display: none; } }

/* Playground */
.playground { height: 360px; }

/* Brand colour for tabs & links */
.nav-pills { --bs-nav-pills-link-active-bg: var(--brand); --bs-nav-link-color: var(--brand); --bs-nav-link-hover-color: var(--brand-dark); }
a { color: var(--brand); }
.sidebar a, .btn { text-decoration: none; }
.brand-logo { width: 34px; height: 34px; border-radius: 9px; flex-shrink: 0; }
.brand-wordmark { height: 34px; width: auto; display: block; }
.navbar .brand-wordmark { height: 36px; }
