/* EVBINOS AI Receptionist — application styles */
:root {
  --bg: #f6f7fb;
  --surface: #ffffff;
  --surface-2: #f9fafb;
  --border: #e5e7eb;
  --border-strong: #d1d5db;
  --text: #111827;
  --muted: #6b7280;
  --primary: #0f766e;
  --primary-600: #0d655e;
  --primary-50: #ecfdf8;
  --accent: #2563eb;
  --danger: #b91c1c;
  --danger-50: #fef2f2;
  --warning: #b45309;
  --warning-50: #fffbeb;
  --success: #047857;
  --success-50: #ecfdf5;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 1px 2px rgba(16,24,40,.05), 0 1px 3px rgba(16,24,40,.06);
  --shadow-lg: 0 12px 32px rgba(16,24,40,.12);
  --sidebar-w: 248px;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 15px/1.5 var(--font); color: var(--text); background: var(--bg); }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-size: 1.6rem; line-height: 1.25; margin: 0 0 .25rem; letter-spacing: -.01em; }
h2 { font-size: 1.1rem; margin: 0; }
h3 { font-size: 1rem; margin: 0 0 .5rem; }
p { margin: 0 0 .75rem; }
code, pre { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .85em; }
pre { white-space: pre-wrap; word-wrap: break-word; margin: 0; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.right { text-align: right; }
.mt { margin-top: 1.25rem; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: -999px; top: 8px; background: var(--text); color: #fff; padding: 8px 12px; border-radius: 6px; z-index: 100; }
.skip-link:focus { left: 8px; }
:focus-visible { outline: 3px solid rgba(15,118,110,.45); outline-offset: 2px; }
.truncate { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.prewrap { white-space: pre-wrap; background: var(--surface-2); border: 1px solid var(--border); padding: 12px; border-radius: var(--radius-sm); font-family: var(--font); font-size: .95rem; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 9px 16px; border-radius: var(--radius-sm); border: 1px solid transparent; font: 600 14px/1.2 var(--font); cursor: pointer; text-decoration: none !important; transition: background .15s, border-color .15s, box-shadow .15s; white-space: nowrap; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-600); }
.btn-ghost { background: var(--surface); border-color: var(--border-strong); color: var(--text); }
.btn-ghost:hover { background: var(--surface-2); }
.btn-danger-ghost { background: var(--surface); border-color: #fecaca; color: var(--danger); }
.btn-danger-ghost:hover { background: var(--danger-50); }
.btn-sm { padding: 6px 10px; font-size: 13px; }
.btn-block { width: 100%; }
.btn:disabled, .btn.is-loading { opacity: .65; cursor: progress; }
.btn.is-loading::after { content: ""; width: 14px; height: 14px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.linklike { background: none; border: 0; padding: 0; color: inherit; font: inherit; cursor: pointer; }
.icon-btn { background: none; border: 0; padding: 6px; border-radius: 8px; color: var(--text); cursor: pointer; }
.inline-form { display: inline-flex; gap: 6px; align-items: center; margin: 0; }

/* Forms */
.field { margin-bottom: 1rem; min-width: 0; }
.field label, .field legend { display: block; font-weight: 600; font-size: .9rem; margin-bottom: 6px; padding: 0; }
fieldset { border: 0; margin: 0 0 1rem; padding: 0; min-width: 0; }
fieldset.plain { margin: 0; }
fieldset:disabled { opacity: .85; }
input[type=text], input[type=email], input[type=password], input[type=tel], input[type=url], input:not([type]), select, textarea {
  width: 100%; padding: 9px 12px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); background: #fff; font: inherit; color: inherit; transition: border-color .15s, box-shadow .15s;
}
textarea { resize: vertical; min-height: 64px; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(15,118,110,.15); }
.has-error input, .has-error textarea, .has-error select { border-color: var(--danger); }
.field-error { color: var(--danger); font-size: .85rem; margin: 6px 0 0; }
.field-help { color: var(--muted); font-size: .85rem; margin: 6px 0 0; }
.req { color: var(--danger); }
.check { display: inline-flex; align-items: center; gap: 8px; font-weight: 500 !important; cursor: pointer; margin-right: 16px; }
.check input { width: 16px; height: 16px; accent-color: var(--primary); }
.check-row { display: flex; flex-wrap: wrap; gap: 6px 4px; }
.field-check { margin-bottom: .75rem; }
.switch { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; font-size: .9rem; cursor: pointer; }
.switch input { appearance: none; width: 40px; height: 22px; border-radius: 22px; background: var(--border-strong); position: relative; cursor: pointer; transition: background .2s; margin: 0; }
.switch input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .2s; box-shadow: 0 1px 2px rgba(0,0,0,.2); }
.switch input:checked { background: var(--primary); }
.switch input:checked::after { transform: translateX(18px); }
.color-row { display: flex; align-items: center; gap: 10px; }
.color-row input[type=color] { width: 48px; height: 38px; border: 1px solid var(--border-strong); border-radius: 8px; padding: 2px; background: #fff; }
.form-actions { display: flex; gap: 10px; justify-content: flex-end; align-items: center; margin-top: 1rem; flex-wrap: wrap; }
.form-actions.sticky { position: sticky; bottom: 0; background: linear-gradient(transparent, var(--bg) 30%); padding: 16px 0 8px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.filters { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; }
.filters .field { margin: 0; flex: 1 1 180px; }

/* Cards & layout */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); margin-bottom: 20px; min-width: 0; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.card-head a { font-size: .9rem; }
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.page-head .actions { display: flex; gap: 8px; flex-wrap: wrap; }
.narrow { max-width: 720px; }
.detail-layout { display: grid; grid-template-columns: minmax(0, 2fr) minmax(260px, 1fr); gap: 20px; align-items: start; }
.test-layout { display: grid; grid-template-columns: minmax(0, 2fr) minmax(240px, 1fr); gap: 20px; align-items: start; }
.center { text-align: center; }

/* Alerts & flashes */
.alert { padding: 12px 14px; border-radius: var(--radius-sm); margin-bottom: 16px; border: 1px solid; font-size: .92rem; }
.alert-error { background: var(--danger-50); border-color: #fecaca; color: #7f1d1d; }
.alert-warning { background: var(--warning-50); border-color: #fde68a; color: #78350f; }
.alert-success { background: var(--success-50); border-color: #a7f3d0; color: #064e3b; }
.flashes { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; }
.flash { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 11px 14px; border-radius: var(--radius-sm); border: 1px solid var(--border); background: var(--surface); box-shadow: var(--shadow); }
.flash-success { border-left: 4px solid var(--success); }
.flash-error { border-left: 4px solid var(--danger); }
.flash-warning { border-left: 4px solid var(--warning); }
.flash-info { border-left: 4px solid var(--accent); }
.flash-close { background: none; border: 0; font-size: 20px; line-height: 1; cursor: pointer; color: var(--muted); }

/* Badges & tags */
.badge { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: .75rem; font-weight: 600; background: #f3f4f6; color: #374151; white-space: nowrap; vertical-align: middle; }
.badge-ready, .badge-resolved, .badge-qualified, .badge-answered { background: var(--success-50); color: var(--success); }
.badge-failed, .badge-error { background: var(--danger-50); color: var(--danger); }
.badge-processing, .badge-pending, .badge-contacted, .badge-handoff { background: #eff6ff; color: #1d4ed8; }
.badge-open, .badge-new, .badge-unknown, .badge-unavailable { background: var(--warning-50); color: var(--warning); }
.badge-closed, .badge-archived, .badge-ignored, .badge-off { background: #f3f4f6; color: #6b7280; }
.badge-test { background: #f5f3ff; color: #6d28d9; }
.badge-count { background: #fff7ed; color: #c2410c; margin-left: 6px; }
.tag { display: inline-block; font-size: .72rem; font-weight: 700; letter-spacing: .03em; padding: 2px 6px; border-radius: 4px; background: #eef2ff; color: #3730a3; }

/* Tables */
.table-wrap { overflow-x: auto; margin: 0 -4px; }
.table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.table th { text-align: left; font-weight: 600; color: var(--muted); font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; padding: 10px 8px; border-bottom: 1px solid var(--border); white-space: nowrap; }
.table td { padding: 12px 8px; border-bottom: 1px solid var(--border); vertical-align: top; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: var(--surface-2); }
.row-muted { opacity: .6; }
.actions-cell { display: flex; gap: 6px; justify-content: flex-end; flex-wrap: wrap; }
.truncate-cell { max-width: 280px; overflow: hidden; text-overflow: ellipsis; }
.pagination { display: flex; align-items: center; justify-content: center; gap: 12px; margin-top: 16px; }

/* Lists */
.list { list-style: none; margin: 0; padding: 0; }
.list li a { display: flex; flex-direction: column; gap: 2px; padding: 10px 8px; border-radius: 8px; color: inherit; text-decoration: none; }
.list li a:hover { background: var(--surface-2); }
.list li + li { border-top: 1px solid var(--border); }
.simple-list { padding-left: 0; list-style: none; }
.simple-list li { padding: 6px 0; border-bottom: 1px solid var(--border); }
.faq-list { list-style: none; margin: 0; padding: 0; }
.faq-list li { display: flex; justify-content: space-between; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--border); }
.faq-list li:last-child { border-bottom: 0; }
.faq-list p { margin: 4px 0 0; }
.meta-grid { display: grid; grid-template-columns: max-content 1fr; gap: 8px 16px; margin: 0 0 16px; }
.meta-grid dt { color: var(--muted); font-size: .88rem; }
.meta-grid dd { margin: 0; overflow-wrap: anywhere; }
.quote { margin: 0 0 12px; padding: 12px 16px; border-left: 4px solid var(--warning); background: var(--warning-50); border-radius: 0 8px 8px 0; font-size: 1.05rem; }

/* Empty states */
.empty { text-align: center; padding: 28px 16px; color: var(--muted); }
.empty-icon { width: 52px; height: 52px; border-radius: 50%; background: var(--primary-50); color: var(--primary); display: inline-flex; align-items: center; justify-content: center; margin-bottom: 10px; }
.empty h3 { color: var(--text); margin-bottom: 4px; }

/* Stats */
.stats { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 14px; margin-bottom: 20px; }
.stats-sm { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.stat { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; display: flex; flex-direction: column; gap: 6px; color: inherit; text-decoration: none !important; box-shadow: var(--shadow); transition: border-color .15s, transform .15s; }
a.stat:hover { border-color: var(--primary); transform: translateY(-1px); }
.stat-label { font-size: .8rem; color: var(--muted); font-weight: 600; }
.stat-value { font-size: 1.7rem; font-weight: 700; letter-spacing: -.02em; }
.stat-warn .stat-value { color: var(--warning); }
.stat-status { font-size: 1rem; display: inline-flex; align-items: center; gap: 6px; }
.stat-status::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: currentColor; }
.stat-status.ok { color: var(--success); }
.stat-status.off { color: var(--muted); }

/* Tabs */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: 16px; overflow-x: auto; }
.tab { padding: 10px 14px; color: var(--muted); font-weight: 600; border-bottom: 2px solid transparent; text-decoration: none !important; white-space: nowrap; }
.tab.active { color: var(--primary); border-bottom-color: var(--primary); }
.tab-count { background: #f3f4f6; border-radius: 999px; padding: 1px 7px; font-size: .75rem; margin-left: 4px; }

/* App shell */
.shell { display: flex; min-height: 100vh; }
.sidebar { width: var(--sidebar-w); background: #0b1f1d; color: #d1e7e4; display: flex; flex-direction: column; position: fixed; inset: 0 auto 0 0; z-index: 40; padding: 18px 12px; overflow-y: auto; }
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px 18px; color: inherit; text-decoration: none !important; }
.brand strong { display: block; letter-spacing: .08em; font-size: .95rem; }
.brand small { display: block; font-size: .75rem; opacity: .75; }
.brand-mark { width: 34px; height: 34px; border-radius: 10px; background: linear-gradient(135deg, #14b8a6, #0f766e); color: #fff; font-weight: 800; display: flex; align-items: center; justify-content: center; }
.business-name { margin: 0 8px 14px; padding: 8px 10px; background: rgba(255,255,255,.06); border-radius: 8px; font-size: .88rem; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.business-switch { margin: 0 8px 14px; }
.business-switch select { background: rgba(255,255,255,.08); color: #fff; border-color: rgba(255,255,255,.15); }
.business-switch option { color: #111; }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav-link { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 8px; color: #b8d4d0; font-weight: 500; text-decoration: none !important; }
.nav-link:hover { background: rgba(255,255,255,.06); color: #fff; }
.nav-link.active { background: rgba(20,184,166,.18); color: #fff; }
.nav-link.small { font-size: .88rem; }
.nav-count { margin-left: auto; background: #f59e0b; color: #111; border-radius: 999px; font-size: .72rem; font-weight: 700; padding: 1px 7px; }
.sidebar-footer { margin-top: auto; padding-top: 12px; border-top: 1px solid rgba(255,255,255,.08); }
.main-col { flex: 1; margin-left: var(--sidebar-w); min-width: 0; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 12px; padding: 10px 28px; background: rgba(246,247,251,.9); backdrop-filter: blur(8px); border-bottom: 1px solid var(--border); min-height: 58px; }
.topbar-title { font-weight: 600; color: var(--muted); font-size: .92rem; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.topbar-title a { color: var(--muted); }
.topbar-actions { display: flex; align-items: center; gap: 12px; }
.menu-toggle { display: none; }
.content { padding: 28px; max-width: 1280px; width: 100%; }
.content:focus { outline: none; }
.locale-switch { display: inline-flex; border: 1px solid var(--border-strong); border-radius: 8px; overflow: hidden; background: var(--surface); }
.locale-switch form { margin: 0; }
.locale-btn { border: 0; background: transparent; padding: 5px 9px; font: 600 12px var(--font); color: var(--muted); cursor: pointer; }
.locale-btn.active { background: var(--primary); color: #fff; }
.menu { position: relative; }
.menu summary { list-style: none; cursor: pointer; }
.menu summary::-webkit-details-marker { display: none; }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--primary); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: .9rem; flex: none; }
.menu-panel { position: absolute; right: 0; top: 44px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-lg); min-width: 230px; padding: 6px; z-index: 50; }
.menu-panel a, .menu-panel button { display: block; width: 100%; text-align: left; padding: 8px 10px; border-radius: 6px; color: var(--text); font-size: .92rem; }
.menu-panel a:hover, .menu-panel button:hover { background: var(--surface-2); text-decoration: none; }
.menu-head { padding: 8px 10px 10px; border-bottom: 1px solid var(--border); margin-bottom: 4px; }
.menu-head small { display: block; color: var(--muted); }
.nav-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,.4); z-index: 35; }

/* Auth & onboarding */
.auth-wrap { min-height: 100vh; display: flex; flex-direction: column; background: radial-gradient(circle at 20% 0%, #d6f5ef 0, transparent 45%), var(--bg); }
.auth-top { display: flex; justify-content: space-between; align-items: center; padding: 18px 28px; }
.auth-top .brand { color: var(--text); padding: 0; }
.auth-main { flex: 1; display: flex; flex-direction: column; align-items: center; padding: 24px 16px 48px; }
.auth-main .flashes { width: 100%; max-width: 440px; }
.auth-card { width: 100%; max-width: 440px; padding: 32px; }
.auth-card h1 { margin-bottom: 6px; }
.auth-card form { margin-top: 18px; }
.auth-card .check { margin: 0 0 18px; }
.auth-switch { margin: 18px 0 0; text-align: center; color: var(--muted); }
.auth-foot { text-align: center; padding: 16px; font-size: .85rem; }
.error-code { font-size: 3rem; font-weight: 800; color: var(--primary); margin: 0; }
.wizard { width: 100%; max-width: 860px; }
.onboarding .auth-main .flashes { max-width: 860px; }
.wizard-card { padding: 32px; }
.steps { list-style: none; display: flex; gap: 8px; padding: 0; margin: 0 0 18px; counter-reset: s; overflow-x: auto; }
.step { flex: 1; display: flex; align-items: center; gap: 8px; padding: 10px 12px; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; font-size: .85rem; color: var(--muted); min-width: 120px; }
.step-num { width: 24px; height: 24px; border-radius: 50%; background: #f3f4f6; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: .8rem; flex: none; }
.step.current { border-color: var(--primary); color: var(--text); font-weight: 600; }
.step.current .step-num { background: var(--primary); color: #fff; }
.step.done .step-num { background: var(--success-50); color: var(--success); }
.wizard-actions { display: flex; justify-content: space-between; align-items: center; margin-top: 24px; padding-top: 18px; border-top: 1px solid var(--border); gap: 12px; }
.knowledge-forms { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-bottom: 20px; }
.knowledge-forms .card { margin: 0; display: flex; flex-direction: column; }
.knowledge-forms form { display: flex; flex-direction: column; flex: 1; }
.knowledge-forms form > .btn { margin-top: auto; align-self: flex-start; }
.dropzone { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 18px; border: 2px dashed var(--border-strong); border-radius: 10px; text-align: center; cursor: pointer; margin-bottom: 14px; background: var(--surface-2); min-height: 110px; transition: border-color .15s, background .15s; }
.dropzone.drag, .dropzone:hover { border-color: var(--primary); background: var(--primary-50); }
.dropzone input { max-width: 100%; font-size: .85rem; }
.dropzone-text { font-weight: 600; font-size: .9rem; }

/* Chat (test chat + transcripts) */
.test-chat { display: flex; flex-direction: column; padding: 0; overflow: hidden; }
.test-chat-head { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px; border-bottom: 1px solid var(--border); }
.test-chat .alert { margin: 12px 16px 0; }
.chat-id { display: flex; align-items: center; gap: 10px; }
.chat-id small { display: block; }
.chat-log { height: 460px; overflow-y: auto; padding: 16px; background: var(--surface-2); display: flex; flex-direction: column; gap: 10px; }
.chat-log.static { height: auto; max-height: none; background: transparent; padding: 0; }
.bubble-row { display: flex; }
.bubble-row.me { justify-content: flex-end; }
.bubble { max-width: 78%; padding: 10px 14px; border-radius: 16px; background: var(--surface); border: 1px solid var(--border); }
.bubble-row.me .bubble { background: var(--primary); color: #fff; border-color: var(--primary); border-bottom-right-radius: 4px; }
.bubble-row.them .bubble { border-bottom-left-radius: 4px; }
.bubble-row.pending .bubble { color: var(--muted); font-style: italic; }
.bubble-row.error .bubble { background: var(--danger-50); color: var(--danger); }
.bubble-text { white-space: pre-wrap; overflow-wrap: anywhere; }
.bubble-meta { font-size: .75rem; color: var(--muted); margin-top: 6px; display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.bubble-row.me .bubble-meta { color: rgba(255,255,255,.8); }
.sources { width: 100%; }
.sources summary { cursor: pointer; }
.sources ul { margin: 4px 0 0; padding-left: 18px; }
.chat-form { display: flex; gap: 8px; padding: 12px; border-top: 1px solid var(--border); background: var(--surface); }
.tips ul { padding-left: 18px; color: var(--muted); }
.tips li { margin-bottom: 6px; }
.chunk { border: 1px solid var(--border); border-radius: 8px; padding: 12px; margin-bottom: 10px; background: var(--surface-2); }
.chunk header { margin-bottom: 6px; }
.code-box { display: flex; gap: 10px; align-items: flex-start; background: #0b1f1d; color: #d1fae5; padding: 14px; border-radius: 10px; margin-bottom: 10px; }
.code-box code { flex: 1; word-break: break-all; font-size: .82rem; }

/* Widget preview */
.preview-card { position: sticky; top: 80px; }
.widget-preview { --brand: #2563eb; position: relative; height: 380px; background: repeating-linear-gradient(45deg, #f3f4f6, #f3f4f6 10px, #f9fafb 10px, #f9fafb 20px); border-radius: 10px; margin-bottom: 12px; overflow: hidden; }
.wp-panel { position: absolute; bottom: 76px; right: 12px; width: 240px; background: #fff; border-radius: 12px; box-shadow: var(--shadow-lg); overflow: hidden; }
.widget-preview[data-position="bottom-left"] .wp-panel { right: auto; left: 12px; }
.wp-head { background: var(--brand); color: #fff; padding: 10px; display: flex; gap: 8px; align-items: center; }
.wp-head small { display: block; opacity: .85; font-size: .72rem; }
.wp-avatar { width: 30px; height: 30px; border-radius: 50%; background: rgba(255,255,255,.25); display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: .75rem; }
.wp-body { padding: 10px; background: #f8fafc; min-height: 90px; }
.wp-bubble { background: #fff; border: 1px solid var(--border); border-radius: 12px; padding: 8px 10px; font-size: .8rem; }
.wp-launcher { position: absolute; bottom: 12px; right: 12px; width: 52px; height: 52px; border-radius: 50%; background: var(--brand); display: flex; align-items: center; justify-content: center; font-size: 22px; box-shadow: var(--shadow-lg); }
.widget-preview[data-position="bottom-left"] .wp-launcher { right: auto; left: 12px; }

/* Responsive */
@media (max-width: 1180px) {
  .stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .grid-3 { grid-template-columns: 1fr; }
  .knowledge-forms { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .sidebar { transform: translateX(-100%); transition: transform .2s; }
  .nav-open .sidebar { transform: none; box-shadow: var(--shadow-lg); }
  .main-col { margin-left: 0; }
  .menu-toggle { display: inline-flex; }
  .topbar { padding: 10px 16px; }
  .content { padding: 18px 16px; }
  .detail-layout, .test-layout { grid-template-columns: 1fr; }
  .preview-card { position: static; }
}
@media (max-width: 640px) {
  .grid-2 { grid-template-columns: 1fr; }
  .stats, .stats-sm { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .auth-card, .wizard-card { padding: 22px 18px; }
  .step-label { display: none; }
  .step { min-width: 0; justify-content: center; }
  .table thead { display: none; }
  .table tr { display: block; padding: 10px 0; border-bottom: 1px solid var(--border); }
  .table td { display: flex; justify-content: space-between; gap: 12px; border: 0; padding: 4px 4px; text-align: right; }
  .table td::before { content: attr(data-label); font-weight: 600; color: var(--muted); text-align: left; }
  .table td.right, .actions-cell { justify-content: flex-start; }
  .truncate-cell { max-width: none; }
  .chat-log { height: 56vh; }
  .bubble { max-width: 90%; }
  .page-head h1 { font-size: 1.35rem; }
  .faq-list li { flex-direction: column; }
  .locale-switch .locale-btn { padding: 5px 7px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
