:root {
  --ink: #17233b; --muted: #6f7b91; --line: #e5e9f0; --soft: #f5f7fa;
  --navy: #10213f; --blue: #2563eb; --blue-dark: #1d4ed8; --cyan: #42d5c5;
  --green: #169b72; --amber: #d88a16; --red: #dc4c4c; --white: #fff;
  --shadow: 0 22px 60px rgba(20, 36, 66, .12); --radius: 16px;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", Arial, sans-serif; color: var(--ink); background: var(--soft); }
button, input, textarea, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }
.hidden { display: none !important; }
.logo-mark { width: 54px; height: 54px; display: inline-grid; place-items: center; border-radius: 17px; background: linear-gradient(145deg, var(--cyan), #5ad6ff); color: #0b2941; font: 800 28px/1 Georgia, serif; box-shadow: 0 10px 30px rgba(66, 213, 197, .25); }
.logo-mark.small { width: 34px; height: 34px; border-radius: 10px; font-size: 18px; }
.brand-link { display: inline-flex; align-items: center; gap: 10px; font-weight: 750; font-size: 18px; }
.brand-link.inverse { color: white; }
.eyebrow { margin: 0 0 8px; color: var(--blue); font-size: 11px; letter-spacing: .16em; font-weight: 800; text-transform: uppercase; }
.button { border: 0; border-radius: 11px; padding: 12px 18px; display: inline-flex; justify-content: center; align-items: center; cursor: pointer; font-weight: 700; transition: .18s ease; }
.button:hover { transform: translateY(-1px); }
.button:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.button.primary { background: var(--blue); color: white; box-shadow: 0 8px 20px rgba(37, 99, 235, .2); }
.button.primary:hover { background: var(--blue-dark); }
.button.secondary { background: var(--navy); color: white; }
.button.ghost { background: white; color: var(--ink); border: 1px solid var(--line); }
.button.wide { width: 100%; }
.button.compact { padding: 8px 12px; border-radius: 8px; font-size: 13px; }
.text-button { border: 0; background: transparent; color: var(--blue); padding: 5px; cursor: pointer; font-weight: 650; }
label { display: grid; gap: 7px; color: #3f4b61; font-size: 13px; font-weight: 650; }
input, textarea, select { width: 100%; border: 1px solid #dce1e9; border-radius: 10px; padding: 11px 12px; color: var(--ink); background: white; outline: none; transition: border .15s, box-shadow .15s; }
input:focus, textarea:focus, select:focus { border-color: #7ba4fb; box-shadow: 0 0 0 3px rgba(37, 99, 235, .09); }
textarea { resize: none; }

/* Landing */
.landing-page { background: var(--navy); }
.landing-shell { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(420px, .88fr); }
.brand-panel { padding: clamp(44px, 8vw, 120px); display: flex; flex-direction: column; justify-content: center; color: white; position: relative; overflow: hidden; }
.brand-panel::after { content: ""; position: absolute; width: 520px; height: 520px; right: -280px; bottom: -250px; border: 1px solid rgba(255,255,255,.11); border-radius: 50%; box-shadow: 0 0 0 80px rgba(255,255,255,.025), 0 0 0 160px rgba(255,255,255,.02); }
.brand-panel .eyebrow { margin-top: 38px; color: var(--cyan); }
.brand-panel h1 { max-width: 760px; margin: 0; font-size: clamp(46px, 6.3vw, 86px); line-height: 1.06; letter-spacing: -.055em; }
.brand-panel .lead { max-width: 600px; color: #aebbd1; line-height: 1.8; font-size: 18px; }
.feature-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }
.feature-row span { padding: 8px 12px; border: 1px solid rgba(255,255,255,.12); border-radius: 999px; color: #cbd5e5; font-size: 12px; }
.entry-panel { background: #f7f9fc; padding: clamp(34px, 7vw, 100px); display: flex; flex-direction: column; justify-content: center; gap: 18px; }
.entry-card { background: white; border: 1px solid #e8ebf0; border-radius: 18px; padding: 26px; display: grid; grid-template-columns: 54px 1fr; gap: 18px; box-shadow: 0 10px 38px rgba(18, 36, 70, .06); }
.entry-card .button { grid-column: 1 / -1; }
.entry-card h2 { margin: 3px 0 5px; font-size: 20px; }
.entry-card p { margin: 0; color: var(--muted); font-size: 13px; }
.entry-icon { width: 52px; height: 52px; display: grid; place-items: center; border-radius: 15px; font-weight: 800; }
.visitor-icon { background: #e7f8f5; color: #0d7f6e; }.agent-icon { background: #eaf0ff; color: var(--blue); }
.entry-qr { grid-column: 1 / -1; display: flex; align-items: center; gap: 16px; padding: 13px; border-radius: 13px; background: #f5f8fd; border: 1px solid #e4e9f2; transition: .18s ease; }
.entry-qr:hover { border-color: #9fb9f5; background: #f0f5ff; transform: translateY(-1px); }
.entry-qr img { width: 92px; height: 92px; border-radius: 8px; background: white; padding: 4px; }
.entry-qr span { display: grid; gap: 5px; }.entry-qr strong { font-size: 14px; }.entry-qr small { color: var(--muted); font-size: 10px; line-height: 1.5; }
.entry-foot { color: #8a94a6; font-size: 12px; text-align: center; }

/* Auth */
.auth-page { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: radial-gradient(circle at 25% 20%, #e8f5ff, transparent 38%), var(--soft); }
.auth-card { width: min(430px, 100%); padding: 40px; border: 1px solid var(--line); border-radius: 22px; background: white; box-shadow: var(--shadow); }
.auth-copy { margin: 38px 0 25px; }.auth-copy h1 { margin: 0; font-size: 32px; }.auth-copy > p:last-child { color: var(--muted); }
.auth-card form { display: grid; gap: 17px; }.auth-help { margin: 22px 0 0; text-align: center; font-size: 11px; color: #8a94a6; }
.auth-help code { background: var(--soft); padding: 2px 4px; border-radius: 4px; }.alert { margin: -8px 0 18px; padding: 10px 12px; border-radius: 8px; color: #a12c2c; background: #fff0f0; font-size: 13px; }

/* Visitor */
.visitor-page { min-height: 100vh; background: linear-gradient(180deg, #edf4ff, #f7f9fc 42%); }
.visitor-header { height: 72px; padding: 0 clamp(20px, 5vw, 70px); display: flex; align-items: center; justify-content: space-between; }
.secure-label { color: #66748c; font-size: 12px; display: flex; align-items: center; gap: 7px; }.secure-label i, .live-state i { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 4px rgba(22,155,114,.12); }
.visitor-shell { width: min(850px, calc(100% - 32px)); margin: 28px auto 60px; }
.visitor-start { background: white; padding: clamp(28px, 6vw, 60px); border-radius: 24px; border: 1px solid var(--line); box-shadow: var(--shadow); }
.visitor-start h1 { margin: 0; font-size: clamp(30px, 5vw, 46px); letter-spacing: -.04em; }.visitor-start > p:not(.eyebrow) { color: var(--muted); }
.start-form { margin-top: 34px; display: grid; gap: 18px; }.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }.form-error { min-height: 18px; margin: 0; color: var(--red); font-size: 12px; }
.chat-card { height: min(780px, calc(100vh - 120px)); min-height: 560px; background: white; border: 1px solid var(--line); border-radius: 22px; box-shadow: var(--shadow); overflow: hidden; display: grid; grid-template-rows: auto 1fr auto auto auto; }
.chat-header { padding: 20px 24px; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; }.chat-header h2 { margin: 0; font-size: 19px; }.chat-status-wrap { display: flex; gap: 12px; align-items: center; }
.status-badge { display: inline-flex; align-items: center; padding: 5px 9px; border-radius: 999px; font-size: 11px; font-weight: 750; background: #edf1f6; color: #657086; white-space: nowrap; }
.status-badge.waiting { background: #fff5df; color: #a76a0e; }.status-badge.active { background: #e4f8f1; color: #087d5b; }.status-badge.resolved { background: #eaf0ff; color: var(--blue); }.status-badge.closed { background: #edf0f4; color: #6f7888; }
.status-badge.ready { background: #e7f8f5; color: #0d7f6e; }
.messages { overflow-y: auto; padding: 24px; display: flex; flex-direction: column; gap: 16px; scroll-behavior: smooth; }
.message { max-width: 76%; display: grid; gap: 5px; align-self: flex-start; }.message.outgoing { align-self: flex-end; justify-items: end; }.message.system { align-self: center; max-width: 90%; justify-items: center; }.message.note { align-self: stretch; max-width: 100%; }
.message-meta { color: #8a94a6; font-size: 10px; display: flex; gap: 7px; }.bubble { padding: 11px 14px; border-radius: 5px 15px 15px 15px; background: #f0f3f7; line-height: 1.55; font-size: 14px; white-space: pre-wrap; word-break: break-word; }
.message.outgoing .bubble { background: var(--blue); color: white; border-radius: 15px 5px 15px 15px; }.message.system .bubble { background: transparent; color: #8791a2; padding: 3px 9px; font-size: 11px; }.message.note .bubble { background: #fff8df; color: #695424; border: 1px solid #f2e5ab; border-radius: 10px; }
.receipt { font-size: 10px; color: #8993a4; min-height: 12px; }.receipt.read { color: var(--green); }
.image-bubble { padding: 6px; display: grid; gap: 6px; overflow: hidden; max-width: 332px; }
.image-bubble img { display: block; width: auto; max-width: min(320px, 62vw); max-height: 360px; border-radius: 10px; object-fit: contain; background: #e7ebf1; }
.image-bubble span { padding: 0 5px 2px; max-width: 310px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #66748a; font-size: 10px; }
.message.outgoing .image-bubble span { color: rgba(255,255,255,.82); }
.message.recalled .bubble, .message.outgoing.recalled .bubble { background: #f1f3f6; color: #8791a2; border: 1px dashed #d8dde5; font-style: italic; }
.message-footer { width: 100%; min-height: 14px; display: flex; align-items: center; justify-content: flex-end; gap: 9px; }
.message-recall { border: 0; padding: 0; background: transparent; color: #73809a; font-size: 10px; cursor: pointer; }
.message-recall:hover { color: var(--red); }.message-recall:disabled { opacity: .45; cursor: wait; }
.composer { margin: 0 18px 12px; border: 1px solid #dce2ea; border-radius: 14px; padding: 8px; display: flex; align-items: end; gap: 8px; }.composer:focus-within { border-color: #8daef6; box-shadow: 0 0 0 3px rgba(37,99,235,.07); }.composer textarea { border: 0; box-shadow: none; padding: 8px 0; min-height: 39px; max-height: 130px; }.send-button { height: 39px; min-width: 58px; padding: 0 13px; border: 0; border-radius: 9px; color: white; background: var(--blue); font-weight: 750; cursor: pointer; }
.composer-tool { flex: 0 0 39px; width: 39px; height: 39px; border: 1px solid #dce2ea; border-radius: 9px; background: #f6f8fb; color: #4d5f7e; font-size: 24px; line-height: 1; cursor: pointer; }
.composer-tool:hover { border-color: #91acf0; color: var(--blue); }.composer-tool:disabled { opacity: .4; cursor: not-allowed; }
.connection-wrap { padding: 0 22px 10px; display: flex; justify-content: space-between; gap: 14px; color: #9aa3b1; font-size: 9px; }.connection-state { font-size: 10px; }.connection-wrap small { color: #afb6c2; text-align: right; }.visitor-privacy-note { margin: 18px 0 0; color: #929cab; font-size: 10px; line-height: 1.6; }
.rating-panel { margin: 0 18px 12px; background: #f6f8fb; border-radius: 12px; padding: 13px 16px; display: flex; align-items: center; justify-content: space-between; }.rating-panel div:first-child { display: grid; gap: 3px; font-size: 12px; }.rating-panel span { color: var(--muted); font-size: 10px; }.stars { display: flex; }.stars button { border: 0; background: transparent; color: #cbd1da; font-size: 23px; cursor: pointer; padding: 1px; }.stars button.active { color: #f2ac2f; }

/* Agent workspace */
.agent-page { min-height: 100vh; overflow: hidden; }.workspace { height: 100vh; display: grid; grid-template-columns: 210px 1fr; }
.sidebar { background: var(--navy); padding: 24px 16px; color: #c9d4e6; display: flex; flex-direction: column; min-width: 0; }.sidebar nav { display: grid; gap: 5px; margin-top: 42px; }.nav-item { border: 0; color: #aebbd0; background: transparent; border-radius: 9px; padding: 11px 12px; display: flex; justify-content: space-between; cursor: pointer; text-align: left; }.nav-item:hover, .nav-item.active { background: rgba(255,255,255,.09); color: white; }.nav-item b { color: var(--cyan); font-size: 12px; }
.sidebar-bottom { margin-top: auto; border-top: 1px solid rgba(255,255,255,.09); padding-top: 18px; }.presence-control { color: #94a4bc; font-size: 10px; }.presence-control select { margin-top: 3px; padding: 7px; border-color: rgba(255,255,255,.12); background: rgba(255,255,255,.07); color: white; }
.agent-profile { display: flex; gap: 10px; align-items: center; margin: 18px 0 12px; }.agent-profile > span { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: #284363; color: white; font-weight: 800; }.agent-profile div { display: grid; }.agent-profile strong { color: white; font-size: 12px; }.agent-profile small { color: #8798b2; font-size: 9px; }.logout-button { color: #9babc2; background: transparent; border: 0; cursor: pointer; font-size: 11px; padding: 3px 0; }
.operations { min-width: 0; padding: 24px 28px; overflow: hidden; display: grid; grid-template-rows: auto auto 1fr; gap: 17px; }.operations-header { display: flex; justify-content: space-between; align-items: center; }.operations-header h1 { margin: 0; font-size: 25px; }.live-state { color: #657188; font-size: 11px; display: flex; align-items: center; gap: 8px; }
.operations-header-actions { display: flex; align-items: center; gap: 14px; }
.mobile-agent-nav, .mobile-back { display: none; }
.metrics-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; }.metrics-grid article { background: white; border: 1px solid var(--line); border-radius: 11px; padding: 13px 15px; display: grid; gap: 4px; }.metrics-grid span { color: var(--muted); font-size: 10px; }.metrics-grid strong { font-size: 21px; }.metrics-grid .metric-alert strong { color: var(--red); }
.desk { min-height: 0; display: grid; grid-template-columns: 310px minmax(380px, 1fr); background: white; border: 1px solid var(--line); border-radius: 15px; overflow: hidden; box-shadow: 0 10px 35px rgba(21,37,65,.05); position: relative; }
.queue-panel { min-height: 0; display: grid; grid-template-rows: auto auto 1fr; border-right: 1px solid var(--line); }.queue-tools { padding: 12px; display: flex; gap: 7px; border-bottom: 1px solid var(--line); }.queue-tools input { font-size: 11px; padding: 8px 10px; }.queue-tools button { border: 1px solid var(--line); border-radius: 8px; background: white; width: 35px; cursor: pointer; }.queue-title { padding: 10px 14px 6px; color: #8a94a5; font-size: 10px; font-weight: 750; text-transform: uppercase; letter-spacing: .08em; }.conversation-list { overflow-y: auto; }
.conversation-item { width: 100%; border: 0; border-bottom: 1px solid #edf0f4; padding: 13px 14px; background: white; cursor: pointer; display: grid; gap: 7px; text-align: left; }.conversation-item:hover, .conversation-item.active { background: #f5f8ff; }.conversation-item.active { box-shadow: inset 3px 0 var(--blue); }.conversation-top { display: flex; justify-content: space-between; align-items: center; }.conversation-top strong { font-size: 13px; }.conversation-top time { color: #9aa3b1; font-size: 9px; }.conversation-subject { color: #657086; font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }.conversation-bottom { display: flex; gap: 5px; align-items: center; }.priority-dot { width: 6px; height: 6px; border-radius: 50%; background: #9ba5b5; }.priority-dot.HIGH { background: var(--amber); }.priority-dot.URGENT { background: var(--red); }.sla-breach { margin-left: auto; color: var(--red); font-size: 9px; font-weight: 700; }.unread-count { margin-left: auto; min-width: 17px; height: 17px; border-radius: 9px; background: var(--blue); color: white; display: grid; place-items: center; font-size: 9px; }
.conversation-customer-context { min-width: 0; display: flex; gap: 7px; color: #8490a4; font-size: 9px; }
.conversation-customer-context span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.conversation-remark { flex: 1; color: #586b8d; }
.empty-chat { display: grid; place-content: center; justify-items: center; color: var(--muted); text-align: center; }.empty-chat h2 { margin-bottom: 3px; color: var(--ink); font-size: 18px; }.empty-chat p { font-size: 11px; }.empty-icon { width: 62px; height: 62px; display: grid; place-items: center; border-radius: 22px; background: #eff4fc; color: var(--blue); font-size: 38px; }
.agent-chat { min-width: 0; min-height: 0; display: grid; grid-template-rows: auto 1fr auto auto; }.agent-chat-header { min-height: 70px; padding: 13px 18px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; gap: 12px; }.title-line { display: flex; align-items: center; gap: 8px; }.title-line h2 { margin: 0; font-size: 16px; }.agent-chat-header p { margin: 5px 0 0; color: var(--muted); font-size: 10px; }.chat-actions { display: flex; gap: 6px; }.agent-messages { padding: 17px; }.agent-messages .message { max-width: 72%; }.quick-bar { padding: 7px 18px; display: flex; gap: 10px; align-items: center; border-top: 1px solid var(--line); }.quick-bar select { max-width: 220px; padding: 7px 9px; font-size: 11px; }.agent-chat .composer { margin-bottom: 11px; }
.selected-customer { min-width: 0; }.selected-customer-context { max-width: 520px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #697a96 !important; }
.detail-panel { position: absolute; z-index: 5; right: 0; top: 0; bottom: 0; width: 280px; background: white; border-left: 1px solid var(--line); box-shadow: -15px 0 35px rgba(20,36,66,.09); padding: 18px; overflow-y: auto; }.detail-head { display: flex; justify-content: space-between; align-items: center; }.detail-head h3 { margin: 0; }.detail-head button { border: 0; background: none; font-size: 24px; color: var(--muted); cursor: pointer; }.detail-panel dl { margin: 22px 0; display: grid; grid-template-columns: 72px 1fr; row-gap: 10px; font-size: 10px; }.detail-panel dt { color: var(--muted); }.detail-panel dd { margin: 0; word-break: break-all; }.detail-panel label { margin: 14px 0 7px; font-size: 11px; }.detail-panel select, .detail-panel input { padding: 8px; font-size: 11px; }
.detail-panel textarea { min-height: 88px; padding: 9px; resize: vertical; font-size: 11px; line-height: 1.5; }
.toast { position: fixed; z-index: 50; right: 24px; bottom: 24px; max-width: 360px; background: var(--navy); color: white; border-radius: 10px; padding: 11px 16px; box-shadow: var(--shadow); font-size: 12px; }
.modal-backdrop { position: fixed; inset: 0; z-index: 60; background: rgba(8, 20, 40, .56); display: grid; place-items: center; padding: 24px; backdrop-filter: blur(4px); }
.entry-modal-card { width: min(680px, 100%); padding: 25px; border-radius: 20px; background: white; box-shadow: 0 30px 80px rgba(5, 18, 42, .28); }
.modal-head { display: flex; align-items: flex-start; justify-content: space-between; }.modal-head h2 { margin: 0; font-size: 23px; }.modal-head > button { border: 0; background: transparent; color: var(--muted); font-size: 28px; cursor: pointer; }
.entry-share-body { display: grid; grid-template-columns: 245px 1fr; gap: 28px; align-items: center; margin-top: 24px; }
.entry-qr-large { padding: 12px; border: 1px solid var(--line); border-radius: 16px; background: #f8fafc; }.entry-qr-large img { display: block; width: 100%; aspect-ratio: 1; border-radius: 9px; background: white; }
.entry-share-copy { display: grid; gap: 12px; }.entry-share-copy > strong { font-size: 17px; }.entry-share-copy > p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.7; }.entry-share-copy label { font-size: 11px; }.entry-share-copy input { font-size: 11px; }.entry-share-copy small { color: #8a94a6; font-size: 10px; line-height: 1.5; }
.account-modal-card { width: min(880px, 100%); max-height: min(760px, calc(100vh - 36px)); padding: 25px; border-radius: 20px; background: white; box-shadow: 0 30px 80px rgba(5, 18, 42, .28); overflow: auto; }
.account-modal-layout { display: grid; grid-template-columns: minmax(310px, .9fr) minmax(340px, 1.1fr); gap: 20px; margin-top: 22px; align-items: start; }
.account-form, .account-list-panel { border: 1px solid var(--line); border-radius: 15px; background: #f9fbfe; padding: 18px; }
.account-form { display: grid; gap: 13px; }.account-form > div:first-child { display: grid; gap: 5px; margin-bottom: 2px; }.account-form > div:first-child strong { font-size: 16px; }.account-form > div:first-child p { margin: 0; color: var(--muted); font-size: 10px; line-height: 1.55; }
.account-form label { font-size: 11px; }.account-form input, .account-form select { padding: 9px 10px; font-size: 12px; }.account-form .form-error { margin: -2px 0; }
.account-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.account-list-panel { padding: 0; overflow: hidden; background: white; }.account-list-head { min-height: 68px; padding: 14px 16px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); }.account-list-head > div { display: grid; gap: 3px; }.account-list-head strong { font-size: 14px; }.account-list-head span { color: var(--muted); font-size: 10px; }.account-list-head b { min-width: 30px; height: 30px; padding: 0 8px; display: grid; place-items: center; border-radius: 10px; color: var(--blue); background: #eaf0ff; font-size: 13px; }
.account-list { max-height: 450px; overflow-y: auto; }.account-list-empty { margin: 0; padding: 28px 18px; color: var(--muted); text-align: center; font-size: 11px; }
.account-row { padding: 13px 15px; display: grid; grid-template-columns: 36px 1fr; gap: 10px; align-items: center; border-bottom: 1px solid #edf0f4; }.account-row:last-child { border-bottom: 0; }.account-avatar { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 11px; color: #174aa7; background: #eaf1ff; font-size: 13px; font-weight: 800; }.account-row-body { min-width: 0; display: grid; gap: 5px; }.account-row-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }.account-row-top > div { min-width: 0; display: flex; align-items: baseline; gap: 6px; }.account-row-top strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }.account-row-top span { color: #8a94a6; font-size: 9px; }.account-row-body small { color: var(--muted); font-size: 9px; }.account-state { flex: 0 0 auto; padding: 4px 7px; border-radius: 999px; font-size: 9px; }.account-state.enabled { color: #087d5b; background: #e4f8f1; }.account-state.disabled { color: #6f7888; background: #edf0f4; }
.analytics-modal-card { width: min(1180px, 100%); max-height: min(820px, calc(100vh - 32px)); padding: 25px; border-radius: 20px; background: white; box-shadow: 0 30px 80px rgba(5, 18, 42, .28); overflow: auto; }
.analytics-toolbar { margin-top: 13px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }.analytics-toolbar p { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.6; }
.analytics-metrics-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; margin-top: 18px; }.analytics-metrics-grid article { min-width: 0; padding: 14px 15px; display: grid; gap: 4px; border: 1px solid var(--line); border-radius: 12px; background: #f9fbfe; }.analytics-metrics-grid span { color: var(--muted); font-size: 10px; }.analytics-metrics-grid strong { overflow: hidden; text-overflow: ellipsis; font-size: 21px; }.analytics-metrics-grid small { color: #9aa3b1; font-size: 8px; }.analytics-metrics-grid .metric-online { border-color: #c8ebdf; background: #f1fbf7; }.analytics-metrics-grid .metric-online strong { color: var(--green); }
.analytics-list-head { margin-top: 19px; padding: 0 2px 9px; display: flex; justify-content: space-between; align-items: end; }.analytics-list-head > div { display: grid; gap: 3px; }.analytics-list-head strong { font-size: 14px; }.analytics-list-head span { color: var(--muted); font-size: 9px; }
.analytics-table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 13px; }.analytics-table { width: 100%; min-width: 1120px; border-collapse: collapse; background: white; }.analytics-table th { padding: 10px 12px; color: #7d8799; background: #f6f8fb; font-size: 9px; font-weight: 750; text-align: left; white-space: nowrap; }.analytics-table td { padding: 12px; border-top: 1px solid #edf0f4; color: #4d596d; font-size: 10px; vertical-align: middle; }.analytics-table td strong, .analytics-table td small { display: block; }.analytics-table td strong { max-width: 170px; overflow: hidden; text-overflow: ellipsis; color: var(--ink); font-size: 10px; white-space: nowrap; }.analytics-table td small { margin-top: 3px; max-width: 210px; overflow: hidden; text-overflow: ellipsis; color: #9099a8; font-size: 8px; white-space: nowrap; }.analytics-ip { color: #243b65 !important; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; white-space: nowrap; }.analytics-location { min-width: 155px; }.analytics-location strong { max-width: 230px !important; }.visitor-online-state { display: inline-flex; align-items: center; gap: 5px; padding: 4px 7px; border-radius: 999px; font-size: 9px; font-weight: 750; }.visitor-online-state::before { content: ""; width: 6px; height: 6px; border-radius: 50%; }.visitor-online-state.online { color: #087d5b; background: #e4f8f1; }.visitor-online-state.online::before { background: var(--green); box-shadow: 0 0 0 3px rgba(22,155,114,.12); }.visitor-online-state.offline { color: #70798a; background: #edf0f4; }.visitor-online-state.offline::before { background: #9ba5b5; }.analytics-empty { padding: 34px !important; color: var(--muted) !important; text-align: center; }.analytics-privacy { margin: 12px 2px 0; color: #8e98a9; font-size: 9px; line-height: 1.6; }

@media (max-width: 980px) {
  .landing-shell { grid-template-columns: 1fr; }.brand-panel { min-height: 55vh; }.entry-panel { padding-top: 50px; padding-bottom: 60px; }
  .workspace { grid-template-columns: 68px 1fr; }.sidebar { padding: 18px 9px; }.sidebar .brand-link { font-size: 0; justify-content: center; }.sidebar nav { margin-top: 30px; }.nav-item span, .sidebar-bottom label, .agent-profile div, .logout-button { display: none; }.nav-item { justify-content: center; }.agent-profile { justify-content: center; }
  .metrics-grid { grid-template-columns: repeat(3, 1fr); }.desk { grid-template-columns: 270px minmax(360px, 1fr); }.analytics-metrics-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 720px) {
  .form-grid { grid-template-columns: 1fr; }
  .visitor-page { height: 100dvh; overflow: hidden; }
  .visitor-header { height: 58px; padding: 0 16px; }
  .visitor-shell { width: 100%; height: calc(100dvh - 58px); margin: 0; }
  .visitor-start { min-height: 100%; padding: 24px 18px calc(24px + env(safe-area-inset-bottom)); border: 0; border-radius: 0; overflow-y: auto; }
  .chat-card { height: 100%; min-height: 0; border-width: 1px 0 0; border-radius: 0; box-shadow: none; }
  .chat-header { padding: 13px 14px; }.messages { padding: 15px 13px; }.message { max-width: 88%; }
  .composer { margin: 0 8px 8px; padding: 6px; }.composer textarea, input, select { font-size: 16px; }
  .connection-wrap { padding: 0 12px calc(8px + env(safe-area-inset-bottom)); align-items: flex-start; flex-direction: column; gap: 4px; }.connection-wrap small { text-align: left; }

  .sidebar { display: none; }.workspace { height: 100dvh; grid-template-columns: 1fr; }
  .operations { height: 100dvh; padding: 10px; grid-template-rows: auto auto auto minmax(0, 1fr); gap: 9px; }
  .operations-header { align-items: center; gap: 10px; }.operations-header h1 { font-size: 20px; }
  .operations-header-actions { max-width: 64%; justify-content: flex-end; flex-wrap: wrap; gap: 6px; }
  .operations-header-actions .button { min-height: 34px; padding: 7px 9px; font-size: 10px; }
  .live-state { width: 100%; justify-content: flex-end; font-size: 9px; }
  .mobile-agent-nav { display: flex; gap: 7px; overflow-x: auto; padding-bottom: 1px; scrollbar-width: none; }
  .mobile-agent-nav::-webkit-scrollbar { display: none; }
  .mobile-agent-nav button { flex: 0 0 auto; min-height: 35px; padding: 7px 11px; border: 1px solid var(--line); border-radius: 999px; color: #64718a; background: white; font-size: 11px; }
  .mobile-agent-nav button.active { border-color: #9bb5f5; color: var(--blue); background: #edf3ff; font-weight: 750; }
  .mobile-agent-nav b { margin-left: 4px; }
  .metrics-grid { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; }
  .metrics-grid::-webkit-scrollbar { display: none; }.metrics-grid article { flex: 0 0 122px; padding: 10px 12px; }
  .desk { height: 100%; grid-template-columns: 1fr; border-radius: 12px; }
  .queue-panel { border-right: 0; }.desk.chat-open .queue-panel { display: none; }
  .agent-chat-header { min-height: 66px; padding: 9px 10px; display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; }
  .mobile-back { width: 34px; height: 34px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 10px; color: var(--ink); background: white; font-size: 26px; }
  .chat-actions { grid-column: 1 / -1; overflow-x: auto; }.chat-actions .button { flex: 0 0 auto; }
  .selected-customer-context { max-width: 100%; }.agent-messages { padding: 13px 10px; }.agent-messages .message { max-width: 88%; }
  .quick-bar { padding: 6px 10px; overflow-x: auto; }.agent-chat .composer { margin: 0 8px 8px; }
  .detail-panel { width: min(360px, 94%); padding-bottom: calc(18px + env(safe-area-inset-bottom)); }
  .entry-share-body { grid-template-columns: 1fr; }.entry-qr-large { width: 210px; margin: auto; }
  .modal-backdrop { padding: 10px; }.account-modal-card, .analytics-modal-card { max-height: calc(100dvh - 20px); padding: 16px; }
  .account-modal-layout { grid-template-columns: 1fr; }.account-list { max-height: 280px; }
  .analytics-toolbar { align-items: stretch; flex-direction: column; }.analytics-metrics-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 480px) {
  .visitor-header .secure-label { font-size: 10px; }.chat-status-wrap { gap: 8px; }.chat-header h2 { max-width: 54vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 17px; }
  .send-button { min-width: 52px; }.composer-tool { flex-basis: 38px; width: 38px; }
  .operations-header .eyebrow, .metrics-grid article:nth-child(n+4) { display: none; }
  .operations-header-actions { max-width: 70%; }.operations-header-actions .button { padding: 7px 8px; }
  .analytics-metrics-grid { grid-template-columns: 1fr 1fr; }.detail-panel { width: 100%; border-left: 0; }
}
