/* ── Variables ──────────────────────────────────────────────────────────── */ :root { --bg-0: #0d1117; --bg-1: #161b22; --bg-2: #21262d; --bg-hover: #2d333b; --border: #30363d; --border-subtle: #21262d; --text: #e6edf3; --text-2: #c9d1d9; --text-muted: #8b949e; --text-dim: #6e7681; --green: #00d4aa; --green-dim: rgba(0, 212, 170, 0.12); --green-border: rgba(0, 212, 170, 0.3); --purple: #a78bfa; --purple-dim: rgba(167, 139, 250, 0.12); --purple-border: rgba(167, 139, 250, 0.3); --blue: #58a6ff; --success: #3fb950; --warning: #d29922; --danger: #f85149; --danger-dim: rgba(248, 81, 73, 0.12); --radius-sm: 6px; --radius: 10px; --radius-lg: 14px; --radius-xl: 20px; --shadow: 0 8px 32px rgba(0,0,0,0.6); --shadow-sm: 0 2px 8px rgba(0,0,0,0.4); --sidebar-w: 280px; --ops-w: 270px; --transition: 180ms ease; } /* ── Reset ──────────────────────────────────────────────────────────────── */ *, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; } html, body { height: 100%; overflow: hidden; } body { font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif; background: var(--bg-0); color: var(--text); font-size: 14px; line-height: 1.5; -webkit-font-smoothing: antialiased; } button { cursor: pointer; border: none; background: none; font-family: inherit; } input, textarea { font-family: inherit; color: var(--text); } code { font-family: 'SF Mono', 'Fira Code', monospace; font-size: .85em; background: var(--bg-2); padding: 2px 5px; border-radius: 4px; } .hidden { display: none !important; } /* ── Loading Screen ──────────────────────────────────────────────────────── */ .loading-screen { position: fixed; inset: 0; background: var(--bg-0); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2rem; z-index: 100; } /* ── Logo ────────────────────────────────────────────────────────────────── */ .logo-lockup { display: flex; align-items: center; gap: .6rem; font-size: 1rem; font-weight: 500; color: var(--text); white-space: nowrap; } .logo-lockup strong { font-weight: 700; } .logo-icon { width: 32px; height: 32px; background: var(--green); border-radius: 50%; display: flex; align-items: center; justify-content: center; flex-shrink: 0; color: #000; } .logo-icon svg { width: 18px; height: 18px; } .loading-logo { display: flex; align-items: center; gap: .75rem; font-size: 1.25rem; font-weight: 600; } /* ── Spinner ──────────────────────────────────────────────────────────────── */ .loading-spinner { width: 36px; height: 36px; border: 3px solid var(--border); border-top-color: var(--green); border-radius: 50%; animation: spin .8s linear infinite; } .loading-spinner.small { width: 18px; height: 18px; border-width: 2px; } @keyframes spin { to { transform: rotate(360deg); } } /* ── Status Badges ───────────────────────────────────────────────────────── */ .status-badge { display: inline-flex; align-items: center; gap: .4rem; padding: .25rem .7rem; border-radius: 999px; font-size: .75rem; font-weight: 500; border: 1px solid transparent; } .dot { width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0; } .status-connected { background: var(--green-dim); border-color: var(--green-border); color: var(--green); } .status-connected .dot { background: var(--green); animation: pulse-green 2s ease-in-out infinite; } .status-awaiting { background: rgba(210, 153, 34, .12); border-color: rgba(210, 153, 34, .3); color: var(--warning); } .status-awaiting .dot { background: var(--warning); } .status-reconnecting { background: rgba(88, 166, 255, .1); border-color: rgba(88, 166, 255, .25); color: var(--blue); } .status-reconnecting .dot { background: var(--blue); animation: pulse-blue 1.5s ease-in-out infinite; } .status-disconnected, .status-degraded { background: var(--danger-dim); border-color: rgba(248,81,73,.25); color: var(--danger); } .status-disconnected .dot, .status-degraded .dot { background: var(--danger); } .status-failed { background: var(--danger-dim); border-color: rgba(248,81,73,.25); color: var(--danger); } .status-failed .dot { background: var(--danger); } .status-idle { background: var(--bg-2); border-color: var(--border); color: var(--text-muted); } .status-idle .dot { background: var(--text-muted); } .status-busy { background: var(--purple-dim); border-color: var(--purple-border); color: var(--purple); } .status-busy .dot { background: var(--purple); animation: pulse-purple 1s ease-in-out infinite; } @keyframes pulse-green { 0%, 100% { box-shadow: 0 0 0 0 rgba(0,212,170,.4); } 50% { box-shadow: 0 0 0 4px rgba(0,212,170,0); } } @keyframes pulse-blue { 0%, 100% { box-shadow: 0 0 0 0 rgba(88,166,255,.4); } 50% { box-shadow: 0 0 0 4px rgba(88,166,255,0); } } @keyframes pulse-purple { 0%, 100% { box-shadow: 0 0 0 0 rgba(167,139,250,.4); } 50% { box-shadow: 0 0 0 4px rgba(167,139,250,0); } } /* ── QR Screen ───────────────────────────────────────────────────────────── */ .qr-screen { position: fixed; inset: 0; background: var(--bg-0); display: flex; align-items: center; justify-content: center; padding: 1.5rem; } .qr-card { background: var(--bg-1); border: 1px solid var(--border); border-radius: var(--radius-xl); padding: 2rem; width: 100%; max-width: 360px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 1.25rem; } .qr-header { display: flex; align-items: center; justify-content: space-between; } .qr-body { display: flex; flex-direction: column; align-items: center; gap: 1rem; } .qr-image-wrap { position: relative; width: 240px; height: 240px; border-radius: var(--radius-lg); overflow: hidden; background: white; padding: 12px; box-shadow: 0 0 0 1px var(--border), var(--shadow-sm); } .qr-image-wrap img { width: 100%; height: 100%; display: block; } .qr-overlay { position: absolute; inset: 0; background: rgba(13,17,23,.92); display: flex; align-items: center; justify-content: center; backdrop-filter: blur(4px); } .qr-refresh-msg { display: flex; flex-direction: column; align-items: center; gap: .5rem; color: var(--text-muted); font-size: .85rem; } .qr-refresh-msg svg { width: 28px; height: 28px; color: var(--warning); } .qr-hint { color: var(--text-muted); font-size: .85rem; text-align: center; line-height: 1.6; } .qr-hint strong { color: var(--text); } .qr-steps { display: flex; flex-direction: column; gap: .5rem; width: 100%; } .step { display: flex; align-items: center; gap: .75rem; color: var(--text-muted); font-size: .8rem; } .step span { width: 22px; height: 22px; border-radius: 50%; background: var(--green-dim); border: 1px solid var(--green-border); color: var(--green); font-size: .7rem; font-weight: 600; display: flex; align-items: center; justify-content: center; flex-shrink: 0; } .qr-connecting { display: flex; align-items: center; gap: .75rem; color: var(--text-muted); font-size: .85rem; padding: .5rem; } /* ── Dashboard Layout ────────────────────────────────────────────────────── */ .dashboard { display: grid; grid-template-columns: var(--sidebar-w) 1fr var(--ops-w); height: 100vh; overflow: hidden; } /* ── Sidebar ──────────────────────────────────────────────────────────────── */ .sidebar { background: var(--bg-1); border-right: 1px solid var(--border); display: flex; flex-direction: column; overflow: hidden; } .sidebar-header { padding: 1rem; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; gap: .5rem; flex-shrink: 0; } .inbox-search-wrap { padding: .75rem 1rem .5rem; flex-shrink: 0; } .inbox-search { width: 100%; padding: .5rem .75rem; background: var(--bg-2); border: 1px solid var(--border); border-radius: var(--radius); font-size: .85rem; outline: none; transition: border-color var(--transition); } .inbox-search::placeholder { color: var(--text-dim); } .inbox-search:focus { border-color: var(--green-border); } .inbox-label { padding: .25rem 1rem .5rem; display: flex; align-items: center; justify-content: space-between; font-size: .7rem; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--text-dim); flex-shrink: 0; } .unread-pill { background: var(--green); color: #000; font-size: .65rem; font-weight: 700; padding: .1rem .4rem; border-radius: 999px; min-width: 18px; text-align: center; } .inbox-list { flex: 1; overflow-y: auto; } .inbox-list::-webkit-scrollbar { width: 4px; } .inbox-list::-webkit-scrollbar-track { background: transparent; } .inbox-list::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; } .inbox-empty { padding: 2rem 1rem; color: var(--text-dim); font-size: .85rem; text-align: center; } /* Inbox Item */ .inbox-item { padding: .75rem 1rem; display: flex; align-items: center; gap: .75rem; cursor: pointer; transition: background var(--transition); border-bottom: 1px solid var(--border-subtle); position: relative; } .inbox-item:hover { background: var(--bg-hover); } .inbox-item.active { background: var(--green-dim); } .inbox-item.active::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--green); border-radius: 0 3px 3px 0; } .avatar { width: 40px; height: 40px; border-radius: 50%; background: linear-gradient(135deg, var(--green-dim), var(--green-border)); border: 1px solid var(--green-border); color: var(--green); font-weight: 600; font-size: .95rem; display: flex; align-items: center; justify-content: center; flex-shrink: 0; } .avatar-lg { width: 38px; height: 38px; font-size: .9rem; } .inbox-info { flex: 1; min-width: 0; } .inbox-row1 { display: flex; justify-content: space-between; align-items: center; } .inbox-name { font-weight: 500; font-size: .9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .inbox-time { font-size: .7rem; color: var(--text-dim); flex-shrink: 0; margin-left: .5rem; } .inbox-row2 { display: flex; justify-content: space-between; align-items: center; margin-top: .2rem; } .inbox-preview { font-size: .8rem; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex: 1; } .inbox-unread { background: var(--green); color: #000; font-size: .65rem; font-weight: 700; width: 18px; height: 18px; border-radius: 50%; display: flex; align-items: center; justify-content: center; flex-shrink: 0; margin-left: .5rem; } /* ── Conversation Panel ──────────────────────────────────────────────────── */ .conv-panel { display: flex; flex-direction: column; background: var(--bg-0); overflow: hidden; min-width: 0; } .conv-placeholder { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1rem; color: var(--text-muted); padding: 2rem; } .placeholder-icon { width: 64px; height: 64px; background: var(--bg-2); border-radius: 50%; display: flex; align-items: center; justify-content: center; color: var(--text-dim); } .placeholder-icon svg { width: 28px; height: 28px; } .conv-placeholder h3 { font-size: 1rem; font-weight: 600; color: var(--text-2); } .conv-placeholder p { font-size: .85rem; text-align: center; } .conv-view { flex: 1; display: flex; flex-direction: column; overflow: hidden; } .conv-header { padding: .875rem 1.25rem; border-bottom: 1px solid var(--border); background: var(--bg-1); display: flex; align-items: center; justify-content: space-between; flex-shrink: 0; } .conv-header-info { display: flex; align-items: center; gap: .75rem; } .conv-name { font-weight: 600; font-size: .95rem; } .conv-phone { font-size: .75rem; color: var(--text-muted); } .conv-header-actions { display: flex; gap: .5rem; } /* Messages */ .message-list { flex: 1; overflow-y: auto; padding: 1.25rem; display: flex; flex-direction: column; gap: .6rem; } .message-list::-webkit-scrollbar { width: 4px; } .message-list::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; } .msg-wrap { display: flex; animation: fadeUp .2s ease; } .msg-wrap.from-me { justify-content: flex-end; } @keyframes fadeUp { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } } .bubble { max-width: 72%; padding: .6rem .9rem; border-radius: var(--radius-lg); font-size: .88rem; line-height: 1.55; word-break: break-word; } .from-them .bubble { background: var(--bg-2); border: 1px solid var(--border); border-bottom-left-radius: var(--radius-sm); color: var(--text); } .from-me .bubble { background: linear-gradient(135deg, #00b894, var(--green)); color: #000; border-bottom-right-radius: var(--radius-sm); } .bubble-meta { display: flex; align-items: center; justify-content: flex-end; gap: .3rem; margin-top: .3rem; font-size: .67rem; opacity: .65; } .tick { font-size: .75rem; } .tick.sent { color: #000; } .date-divider { text-align: center; color: var(--text-dim); font-size: .7rem; padding: .5rem 0; display: flex; align-items: center; gap: .75rem; } .date-divider::before, .date-divider::after { content: ''; flex: 1; height: 1px; background: var(--border); } /* ── Compose Area ─────────────────────────────────────────────────────────── */ .compose-area { border-top: 1px solid var(--border); background: var(--bg-1); padding: .875rem 1.25rem; display: flex; flex-direction: column; gap: .625rem; flex-shrink: 0; } .ai-draft-bar { background: var(--purple-dim); border: 1px solid var(--purple-border); border-radius: var(--radius); padding: .5rem .75rem; display: flex; align-items: center; justify-content: space-between; animation: fadeUp .2s ease; } .ai-draft-inner { display: flex; align-items: center; gap: .5rem; color: var(--purple); font-size: .8rem; } .ai-icon { width: 14px; height: 14px; flex-shrink: 0; } .compose-input { width: 100%; resize: none; background: var(--bg-2); border: 1px solid var(--border); border-radius: var(--radius); padding: .6rem .875rem; font-size: .9rem; line-height: 1.5; outline: none; transition: border-color var(--transition); max-height: 140px; overflow-y: auto; } .compose-input::placeholder { color: var(--text-dim); } .compose-input:focus { border-color: var(--green-border); } .compose-actions { display: flex; align-items: center; justify-content: space-between; gap: .75rem; } .compose-right { display: flex; align-items: center; gap: .75rem; } .char-count { font-size: .75rem; color: var(--text-dim); } /* ── Buttons ──────────────────────────────────────────────────────────────── */ .btn { display: inline-flex; align-items: center; gap: .4rem; padding: .5rem 1rem; border-radius: var(--radius); font-size: .85rem; font-weight: 500; transition: all var(--transition); } .btn svg { width: 14px; height: 14px; flex-shrink: 0; } .btn-ai { background: var(--purple-dim); border: 1px solid var(--purple-border); color: var(--purple); } .btn-ai:hover { background: rgba(167,139,250,.2); border-color: rgba(167,139,250,.5); } .btn-ai:disabled { opacity: .4; cursor: not-allowed; } .btn-send { background: var(--green); color: #000; font-weight: 600; } .btn-send:hover { background: #00e5b8; } .btn-send:disabled { opacity: .4; cursor: not-allowed; } .icon-btn { width: 32px; height: 32px; border-radius: var(--radius-sm); background: var(--bg-2); border: 1px solid var(--border); color: var(--text-muted); display: flex; align-items: center; justify-content: center; transition: all var(--transition); } .icon-btn:hover { background: var(--bg-hover); color: var(--text); } .icon-btn svg { width: 15px; height: 15px; } .icon-btn.small { width: 24px; height: 24px; background: transparent; border: none; font-size: .7rem; } /* ── Operations Panel ────────────────────────────────────────────────────── */ .ops-panel { background: var(--bg-1); border-left: 1px solid var(--border); overflow-y: auto; padding: 1.25rem 1rem; display: flex; flex-direction: column; gap: 1.25rem; } .ops-panel::-webkit-scrollbar { width: 4px; } .ops-panel::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; } .ops-title { font-size: .7rem; font-weight: 600; text-transform: uppercase; letter-spacing: .07em; color: var(--text-dim); margin-bottom: .625rem; } .ops-card { background: var(--bg-2); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; } .ops-row { display: flex; align-items: center; justify-content: space-between; padding: .625rem .875rem; border-bottom: 1px solid var(--border-subtle); } .ops-row:last-child { border-bottom: none; } .ops-label { font-size: .8rem; color: var(--text-muted); } .ops-value { font-size: .8rem; color: var(--text-2); } .ops-value.mono { font-family: 'SF Mono', 'Fira Code', monospace; font-size: .75rem; } .ops-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; } .metric-card { background: var(--bg-2); border: 1px solid var(--border); border-radius: var(--radius); padding: .75rem; text-align: center; } .metric-card.success { border-color: rgba(63,185,80,.25); background: rgba(63,185,80,.07); } .metric-card.danger { border-color: rgba(248,81,73,.2); background: rgba(248,81,73,.07); } .metric-value { font-size: 1.5rem; font-weight: 700; color: var(--text); line-height: 1; } .metric-card.success .metric-value { color: var(--success); } .metric-card.danger .metric-value { color: var(--danger); } .metric-label { font-size: .7rem; color: var(--text-muted); margin-top: .25rem; } .demo-banner { display: flex; align-items: flex-start; gap: .625rem; background: rgba(210,153,34,.1); border: 1px solid rgba(210,153,34,.3); border-radius: var(--radius); padding: .75rem; color: var(--warning); font-size: .8rem; } .demo-banner svg { width: 16px; height: 16px; flex-shrink: 0; margin-top: 1px; } .demo-banner strong { display: block; margin-bottom: .15rem; font-size: .82rem; } .demo-banner p { color: rgba(210,153,34,.8); font-size: .75rem; } /* ── Toasts ───────────────────────────────────────────────────────────────── */ .toast-container { position: fixed; bottom: 1.25rem; right: 1.25rem; display: flex; flex-direction: column; gap: .5rem; z-index: 200; pointer-events: none; } .toast { background: var(--bg-2); border: 1px solid var(--border); border-radius: var(--radius); padding: .75rem 1rem; font-size: .85rem; color: var(--text); box-shadow: var(--shadow); max-width: 300px; animation: toastIn .25s ease, toastOut .25s ease 2.75s forwards; display: flex; align-items: center; gap: .6rem; pointer-events: auto; } .toast-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; } .toast.green { border-left: 3px solid var(--green); } .toast.green .toast-dot { background: var(--green); } .toast.purple { border-left: 3px solid var(--purple); } .toast.purple .toast-dot { background: var(--purple); } .toast.red { border-left: 3px solid var(--danger); } .toast.red .toast-dot { background: var(--danger); } @keyframes toastIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } } @keyframes toastOut { from { opacity: 1; } to { opacity: 0; } } /* ── Responsive ───────────────────────────────────────────────────────────── */ @media (max-width: 900px) { .dashboard { grid-template-columns: var(--sidebar-w) 1fr; } .ops-panel { display: none; } .ops-panel.open { display: flex; position: fixed; right: 0; top: 0; bottom: 0; width: var(--ops-w); z-index: 50; box-shadow: var(--shadow); } } @media (max-width: 600px) { :root { --sidebar-w: 200px; } .inbox-time { display: none; } .bubble { max-width: 88%; } }