:root {
    --bg: #f6f7fb;
    --bg-2: #eef1f8;
    --card: #ffffff;
    --ink: #161929;
    --ink-2: #3a4051;
    --muted: #757c8c;
    --line: #e7e9f1;
    --line-2: #eef0f6;
    --primary: #4f46e5;
    --primary-2: #6366f1;
    --primary-dark: #4338ca;
    --primary-soft: #eef0fe;
    --green: #0a9d6b;
    --green-2: #12b886;
    --radius: 16px;
    --radius-sm: 11px;
    --shadow-sm: 0 1px 2px rgba(16,24,40,.05), 0 1px 3px rgba(16,24,40,.04);
    --shadow: 0 4px 12px rgba(16,24,40,.06), 0 18px 40px -12px rgba(16,24,40,.12);
    --shadow-lg: 0 12px 28px rgba(79,70,229,.14), 0 30px 60px -20px rgba(16,24,40,.22);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
    font-family: 'Inter', -apple-system, system-ui, sans-serif;
    background:
        radial-gradient(900px 500px at 100% -10%, #e9ecfb 0%, transparent 60%),
        radial-gradient(700px 400px at -10% 0%, #eafaf3 0%, transparent 55%),
        var(--bg);
    background-attachment: fixed;
    color: var(--ink);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

.container { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 22px; }

a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-dark); }
code { background: var(--primary-soft); color: var(--primary-dark); padding: 2px 7px; border-radius: 6px; font-size: .88em; font-weight: 600; }

/* Icons */
.ic { width: 20px; height: 20px; flex: 0 0 auto; }
.ic-sm { width: 17px; height: 17px; flex: 0 0 auto; }

/* ---------- Header ---------- */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(255,255,255,.72); backdrop-filter: saturate(180%) blur(14px); border-bottom: 1px solid var(--line); }
.nav { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.22rem; color: var(--ink); letter-spacing: -.02em; }
.brand:hover { color: var(--ink); }
.brand-mark { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; color: #fff;
    background: linear-gradient(135deg, var(--primary-2), var(--primary-dark)); box-shadow: 0 6px 16px -4px rgba(79,70,229,.55); }
.brand-mark .ic { width: 20px; height: 20px; animation: spin-slow 9s linear infinite; }
.brand-accent { color: var(--primary); }
.nav-links { display: flex; align-items: center; gap: 6px; }
.nav-link { display: inline-flex; align-items: center; gap: 7px; color: var(--ink-2); font-weight: 600; font-size: .94rem; padding: 8px 12px; border-radius: 9px; transition: .16s; }
.nav-link:hover { color: var(--primary); background: var(--primary-soft); }
.nav-link.active { color: var(--primary); background: var(--primary-soft); }
.nav-link .ic-sm { opacity: .85; }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-family: inherit; font-weight: 600; font-size: .95rem; line-height: 1; padding: 12px 20px; border-radius: 11px; border: 1px solid transparent; cursor: pointer; transition: transform .16s cubic-bezier(.34,1.56,.64,1), box-shadow .2s, background .2s, border-color .2s; white-space: nowrap; }
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0) scale(.98); }
.btn-primary { color: #fff; background: linear-gradient(135deg, var(--primary-2), var(--primary-dark)); box-shadow: 0 6px 16px -5px rgba(79,70,229,.6); }
.btn-primary:hover { color: #fff; box-shadow: 0 10px 24px -6px rgba(79,70,229,.7); }
.btn-ghost { background: #fff; color: var(--ink); border-color: var(--line); box-shadow: var(--shadow-sm); }
.btn-ghost:hover { color: var(--ink); border-color: #cdd2e2; }
.btn-block { width: 100%; }
.btn-lg { padding: 14px 26px; font-size: 1rem; border-radius: 12px; }
.btn-sm { padding: 9px 15px; font-size: .9rem; border-radius: 10px; }
.btn-icon { padding: 12px; aspect-ratio: 1; }
.btn-call { color: #fff; background: linear-gradient(135deg, var(--green-2), var(--green)); box-shadow: 0 6px 16px -5px rgba(10,157,107,.6); }
.btn-call:hover { color: #fff; box-shadow: 0 10px 24px -6px rgba(10,157,107,.7); }
.btn-call.active { background: linear-gradient(135deg, #f1556c, #dc2626); box-shadow: 0 6px 18px -5px rgba(220,38,38,.6); animation: pulse-call 1.8s ease-in-out infinite; }

main.container { padding-top: 46px; padding-bottom: 64px; min-height: calc(100vh - 68px - 64px); }

/* ---------- Hero ---------- */
.hero { position: relative; text-align: center; padding: 64px 0 56px; }
.hero-glow { position: absolute; inset: -40px 0 auto 0; height: 320px; z-index: -1; margin: auto; max-width: 720px;
    background: radial-gradient(closest-side, rgba(99,102,241,.22), transparent 70%); filter: blur(10px); animation: float-glow 7s ease-in-out infinite; }
.hero-badge { display: inline-flex; align-items: center; gap: 7px; font-size: .85rem; font-weight: 600; color: var(--primary-dark);
    background: #fff; border: 1px solid var(--line); padding: 7px 14px; border-radius: 999px; box-shadow: var(--shadow-sm); margin-bottom: 22px; animation: rise .6s ease both; }
.hero h1 { font-size: clamp(2.3rem, 5.2vw, 3.6rem); font-weight: 900; letter-spacing: -.03em; line-height: 1.06; animation: rise .6s .05s ease both; }
.grad { background: linear-gradient(100deg, #4f46e5, #7c3aed 45%, #0ea5e9); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lead { max-width: 640px; margin: 22px auto 0; color: var(--muted); font-size: 1.17rem; animation: rise .6s .12s ease both; }
.hero-cta { display: flex; gap: 12px; justify-content: center; margin-top: 32px; flex-wrap: wrap; animation: rise .6s .18s ease both; }

.features { display: grid; grid-template-columns: repeat(3,1fr); gap: 20px; margin-top: 34px; }
.feature { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow); transition: transform .25s, box-shadow .25s; }
.feature:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); }
.feature-ic { width: 50px; height: 50px; border-radius: 13px; display: grid; place-items: center; color: var(--primary); background: var(--primary-soft); margin-bottom: 16px; }
.feature-ic .ic { width: 24px; height: 24px; }
.feature h3 { font-size: 1.12rem; }
.feature p { color: var(--muted); font-size: .95rem; margin-top: 6px; }

/* ---------- Eyebrow ---------- */
.eyebrow { display: inline-flex; align-items: center; gap: 6px; font-size: .8rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--primary); margin-bottom: 10px; }
.eyebrow .ic-sm { width: 15px; height: 15px; }

/* ---------- Cards / forms ---------- */
.auth-card, .form-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 36px; max-width: 440px; margin: 24px auto; animation: rise .5s ease both; }
.form-card.wide { max-width: 700px; }
.auth-card h1, .form-card h1 { font-size: 1.65rem; font-weight: 800; letter-spacing: -.02em; }
.muted { color: var(--muted); }
.center { text-align: center; }
.hint { color: var(--muted); font-weight: 400; font-size: .82rem; }

label { display: block; margin-top: 18px; font-weight: 600; font-size: .9rem; color: var(--ink-2); }
input[type=text], input[type=email], input[type=password], textarea {
    width: 100%; margin-top: 7px; padding: 12px 14px; font-family: inherit; font-size: .98rem;
    border: 1px solid var(--line); border-radius: var(--radius-sm); background: #fdfdff; color: var(--ink); font-weight: 400; transition: .16s; }
input::placeholder, textarea::placeholder { color: #aab0c0; }
input:focus, textarea:focus { outline: none; border-color: var(--primary); background: #fff; box-shadow: 0 0 0 4px var(--primary-soft); }
textarea { resize: vertical; min-height: 110px; }
form .btn-block { margin-top: 24px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

.color-row { display: flex; gap: 11px; margin-top: 9px; }
.color-dot input { display: none; }
.color-dot span { display: block; width: 32px; height: 32px; border-radius: 50%; cursor: pointer; box-shadow: inset 0 0 0 2px rgba(255,255,255,.7); outline: 2px solid transparent; outline-offset: 2px; transition: .16s; }
.color-dot input:checked + span { outline-color: var(--ink); transform: scale(1.12); }

.alert { background: #fff1f2; border: 1px solid #fecdd3; color: #be123c; padding: 11px 15px; border-radius: var(--radius-sm); font-size: .9rem; margin-top: 16px; }

/* ---------- Dashboard ---------- */
.dash-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 30px; animation: rise .5s ease both; }
.dash-head h1 { font-size: 1.85rem; font-weight: 800; letter-spacing: -.02em; }
.empty { text-align: center; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 64px 24px; box-shadow: var(--shadow); animation: rise .5s ease both; }
.empty-ic { width: 76px; height: 76px; margin: 0 auto 8px; border-radius: 20px; display: grid; place-items: center; color: var(--primary); background: var(--primary-soft); }
.empty-ic .ic { width: 38px; height: 38px; }
.empty h2 { margin: 12px 0 6px; font-size: 1.4rem; }
.empty .btn { margin-top: 20px; }

.agent-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(300px,1fr)); gap: 20px; }
.agent-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); transition: transform .25s, box-shadow .25s, border-color .25s; }
.agent-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: #dfe2ee; }
.agent-card-top { display: flex; align-items: center; gap: 14px; }
.agent-meta h3 { font-size: 1.12rem; }
.agent-meta p { font-size: .9rem; }
.agent-avatar { width: 52px; height: 52px; border-radius: 15px; color: #fff; display: grid; place-items: center; font-size: 1.45rem; font-weight: 700; flex: 0 0 auto;
    background: var(--c, var(--primary)); background-image: linear-gradient(135deg, color-mix(in srgb, var(--c) 88%, #fff 12%), color-mix(in srgb, var(--c) 72%, #000 28%));
    box-shadow: 0 8px 18px -6px color-mix(in srgb, var(--c) 60%, transparent); }
.agent-avatar.xl { width: 92px; height: 92px; border-radius: 26px; font-size: 2.4rem; }

.link-pill { display: flex; align-items: center; gap: 9px; width: 100%; margin: 18px 0 16px; padding: 10px 13px; font-family: inherit; font-size: .85rem; color: var(--muted);
    background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius-sm); cursor: pointer; transition: .16s; text-align: left; }
.link-pill:hover { border-color: var(--primary); color: var(--primary-dark); background: var(--primary-soft); }
.link-pill .link-text { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
.link-pill .ic-sm { opacity: .7; }
.link-pill .copy-ic { transition: .16s; }
.link-pill.copied { color: var(--green); border-color: var(--green); background: #e8f9f2; }
.agent-actions { display: flex; gap: 10px; }
.agent-actions .btn { flex: 1; }

.flash { display: inline-flex; align-items: center; gap: 8px; background: #e8f9f2; border: 1px solid #b6ebd6; color: #0a7a52; padding: 11px 16px; border-radius: var(--radius-sm); font-size: .92rem; font-weight: 500; margin-bottom: 22px; animation: rise .4s ease both; }
.flash .ic-sm { width: 16px; height: 16px; }

.form-actions { display: flex; align-items: center; justify-content: flex-end; gap: 12px; margin-top: 26px; }

/* ---------- Public agent page ---------- */
.agent-page { display: grid; grid-template-columns: 340px 1fr; gap: 26px; align-items: start; }
.agent-profile { position: relative; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 40px 30px 30px; text-align: center; }
.agent-profile .agent-avatar.xl { position: relative; z-index: 1; margin: 0 auto; width: 88px; height: 88px; border-radius: 26px; font-size: 2.2rem; }
.agent-profile h1 { margin: 20px 0 5px; font-size: 1.5rem; font-weight: 800; letter-spacing: -.02em; }
.agent-profile .tagline { font-weight: 600; color: var(--primary); font-size: 1rem; }
.agent-profile .profession { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: .9rem; margin-top: 7px; }
.agent-profile .profession .ic-sm { width: 15px; height: 15px; opacity: .8; }
.bio-block { text-align: left; margin-top: 26px; padding-top: 22px; border-top: 1px solid var(--line-2); }
.bio-label { display: block; font-size: .72rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #9aa0b0; margin-bottom: 9px; }
.agent-profile .bio { color: var(--ink-2); font-size: .93rem; line-height: 1.72; }
.call-box { margin-top: 26px; }
.call-status { margin-top: 11px; font-size: .87rem; color: var(--muted); min-height: 20px; }
.powered { display: inline-flex; align-items: center; gap: 6px; margin-top: 20px; font-size: .76rem; color: #a3a9b8; }
.powered .ic-sm { width: 14px; height: 14px; }

.chat-wrap { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); display: flex; flex-direction: column; height: 74vh; min-height: 520px; overflow: hidden; }
.chat-header { display: flex; align-items: center; gap: 12px; padding: 15px 20px; border-bottom: 1px solid var(--line); background: #fff; }
.chat-ava { width: 42px; height: 42px; border-radius: 12px; color: #fff; display: grid; place-items: center; font-weight: 700;
    background: var(--c, var(--primary)); background-image: linear-gradient(135deg, color-mix(in srgb, var(--c) 88%, #fff 12%), color-mix(in srgb, var(--c) 72%, #000 28%)); }
.chat-name { font-weight: 700; font-size: 1rem; }
.chat-sub { display: flex; align-items: center; gap: 6px; font-size: .8rem; color: var(--muted); }
.dot-online { width: 8px; height: 8px; border-radius: 50%; background: var(--green-2); display: inline-block; box-shadow: 0 0 0 3px rgba(18,184,134,.2); animation: pulse-dot 2s infinite; }
.chat-messages { flex: 1; overflow-y: auto; padding: 22px; display: flex; flex-direction: column; gap: 12px;
    background: linear-gradient(180deg, #fafbff, #f6f7fc); }
.chat-messages::-webkit-scrollbar { width: 8px; }
.chat-messages::-webkit-scrollbar-thumb { background: #d7dae6; border-radius: 8px; }
.msg { display: flex; animation: bubble-in .32s cubic-bezier(.22,1,.36,1) both; }
.msg.user { justify-content: flex-end; }
.bubble { max-width: 80%; padding: 11px 15px; border-radius: 16px; font-size: .96rem; line-height: 1.5; white-space: pre-wrap; word-wrap: break-word; box-shadow: var(--shadow-sm); }
.msg.bot .bubble { background: #fff; border: 1px solid var(--line); color: var(--ink); border-bottom-left-radius: 5px; }
.msg.user .bubble { color: #fff; background: linear-gradient(135deg, var(--primary-2), var(--primary-dark)); border-bottom-right-radius: 5px; }
.chat-input { display: flex; gap: 10px; padding: 15px; border-top: 1px solid var(--line); background: #fff; }
.chat-input input { margin: 0; }
.dots { display: inline-flex; gap: 5px; padding: 2px 0; }
.dots i { width: 7px; height: 7px; background: #b9bed0; border-radius: 50%; animation: bounce 1.2s infinite; }
.dots i:nth-child(2){ animation-delay:.15s } .dots i:nth-child(3){ animation-delay:.3s }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); background: rgba(255,255,255,.7); }
.site-footer .container { display: flex; align-items: center; justify-content: center; gap: 10px; flex-wrap: wrap; padding-top: 20px; padding-bottom: 20px; color: var(--muted); font-size: .86rem; }
.foot-brand { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; color: var(--ink-2); }
.foot-text { color: var(--muted); }
.foot-copy { color: #a3a9b8; }

/* ---------- Animations ---------- */
.page-enter { animation: page-fade .4s ease both; }
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .55s ease, transform .55s cubic-bezier(.22,1,.36,1); }
.reveal.in { opacity: 1; transform: none; }

@keyframes page-fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes bubble-in { from { opacity: 0; transform: translateY(8px) scale(.97); } to { opacity: 1; transform: none; } }
@keyframes bounce { 0%,60%,100%{ transform: translateY(0); opacity:.5 } 30%{ transform: translateY(-5px); opacity:1 } }
@keyframes spin-slow { to { transform: rotate(360deg); } }
@keyframes float-glow { 0%,100%{ transform: translateY(0) scale(1); opacity:.9 } 50%{ transform: translateY(14px) scale(1.05); opacity:1 } }
@keyframes pulse-dot { 0%,100%{ box-shadow: 0 0 0 3px rgba(18,184,134,.2) } 50%{ box-shadow: 0 0 0 5px rgba(18,184,134,.08) } }
@keyframes pulse-call { 0%,100%{ box-shadow: 0 6px 18px -5px rgba(220,38,38,.6) } 50%{ box-shadow: 0 6px 26px -2px rgba(220,38,38,.85) } }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
    .reveal { opacity: 1; transform: none; }
}

/* ---------- Avatar photos ---------- */
.agent-avatar img, .chat-ava img, .call-avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: inherit; display: block; }
.agent-avatar.has-img, .chat-ava.has-img { background: none; overflow: hidden; }
.call-avatar.has-img, .avatar-preview.has-img { background-size: cover; background-position: center; }

/* ---------- Avatar uploader ---------- */
.avatar-upload { display: flex; align-items: center; gap: 18px; margin-top: 9px; padding: 16px; border: 1px solid var(--line); border-radius: 13px; background: #fdfdff; }
.avatar-preview { width: 78px; height: 78px; flex: 0 0 auto; border-radius: 20px; display: grid; place-items: center; color: #b6bccb;
    background: var(--bg-2); border: 1px dashed #cdd2e2; background-size: cover; background-position: center; }
.avatar-preview.has-img { border-style: solid; border-color: var(--line); color: transparent; }
.avatar-preview .ic { width: 28px; height: 28px; }
.avatar-upload-text { flex: 1; min-width: 0; }
.avatar-upload-text .btn { cursor: pointer; }
.avatar-upload-text .hint { margin-top: 7px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.remove-photo { display: inline-flex; align-items: center; gap: 5px; margin-top: 9px; font-size: .82rem; font-weight: 500; color: #b91c1c; cursor: pointer; }
.remove-photo input { width: auto; margin: 0; }
.remove-photo .ic-sm { width: 14px; height: 14px; }

/* ---------- CV upload ---------- */
.cv-upload { margin-top: 9px; padding: 16px; border: 1px solid var(--line); border-radius: 13px; background: #fdfdff; }
.cv-upload .btn { cursor: pointer; }
.cv-upload .hint { margin-top: 9px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cv-upload .remove-photo { margin-top: 11px; }
.cv-status { margin-top: 8px; font-size: .82rem; font-weight: 500; min-height: 1px; }
.cv-status.ok  { color: #059669; }
.cv-status.bad { color: #b91c1c; }

.dash-head-actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* ---------- App shell + sidebar ---------- */
.app-shell { display: grid; grid-template-columns: 232px 1fr; gap: 26px; align-items: start; padding-top: 26px; padding-bottom: 26px; }
.app-main { min-width: 0; }
.sidebar { position: sticky; top: 90px; display: flex; flex-direction: column; gap: 4px; background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 12px; box-shadow: var(--shadow-sm); }
.side-nav { display: flex; flex-direction: column; gap: 4px; }
.side-link { display: flex; align-items: center; gap: 11px; padding: 11px 14px; border-radius: 11px; font-weight: 600; font-size: .92rem; color: var(--ink-2); margin: 0; transition: background .15s, color .15s; }
.side-link:hover { background: var(--bg-2); color: var(--ink); }
.side-link.active { background: linear-gradient(135deg, var(--primary-2), var(--primary-dark)); color: #fff; }
.side-link.active .ic { color: #fff; }
.side-link .ic-sm { width: 18px; height: 18px; flex: 0 0 auto; }
.side-foot { margin-top: 8px; border-top: 1px solid var(--line); padding-top: 14px; color: var(--muted); }
@media (max-width: 820px) {
    .app-shell { grid-template-columns: 1fr; gap: 16px; }
    .sidebar { position: static; flex-direction: row; flex-wrap: wrap; }
    .side-nav { flex-direction: row; flex-wrap: wrap; }
    .side-foot { margin: 0; border: 0; padding: 11px 14px; }
}

/* ---------- Integrations ---------- */
.int-head h1 { display: flex; align-items: center; gap: 10px; margin-bottom: 4px; }
.int-head h1 .ic { width: 26px; height: 26px; color: var(--primary); }
.int-cat { font-size: 1.05rem; margin: 30px 0 14px; color: var(--ink); }
.int-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(248px, 1fr)); gap: 16px; }
.int-card { display: flex; flex-direction: column; justify-content: space-between; gap: 16px; background: #fff; border: 1px solid var(--line); border-radius: 15px; padding: 18px; box-shadow: var(--shadow-sm); transition: transform .15s, box-shadow .15s, border-color .15s; }
.int-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: #d7dbe8; }
.int-card.int-on { border-color: #a7f3d0; background: #f6fffb; }
.int-top { display: flex; gap: 13px; align-items: flex-start; }
.int-logo { flex: 0 0 auto; width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; font-weight: 800; font-size: 1.15rem; color: #fff; background: var(--c, var(--primary)); box-shadow: 0 4px 12px -3px var(--c); }
.int-info { min-width: 0; }
.int-info h3 { margin: 0 0 3px; font-size: 1rem; }
.int-info p { margin: 0; font-size: .82rem; color: var(--muted); line-height: 1.4; }
.int-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.int-foot form { margin: 0; }
.int-status { display: inline-flex; align-items: center; gap: 6px; font-size: .78rem; font-weight: 600; color: var(--muted); }
.int-status .int-dot { width: 8px; height: 8px; border-radius: 50%; background: #c2c7d6; }
.int-status.on { color: #059669; }
.int-status.on .int-dot { background: #10b981; box-shadow: 0 0 0 3px #d1fae5; }
.int-btn { display: inline-flex; align-items: center; gap: 6px; font-size: .84rem; font-weight: 600; color: #fff; background: linear-gradient(135deg, var(--primary-2), var(--primary-dark)); border: 0; border-radius: 10px; padding: 8px 14px; cursor: pointer; transition: filter .15s; }
.int-btn:hover { filter: brightness(1.07); }
.int-btn.ghost { background: #fff; color: #b91c1c; border: 1px solid var(--line); }
.int-btn .ic-sm { width: 15px; height: 15px; }

/* ---------- AI picker in chat header ---------- */
.ai-pick { margin-left: auto; display: flex; align-items: center; gap: 7px; }
.ai-pick label { margin: 0; font-size: .72rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.ai-pick select { margin: 0; padding: 7px 10px; font-size: .85rem; font-weight: 600; color: var(--ink); background: var(--bg-2); border: 1px solid var(--line); border-radius: 9px; cursor: pointer; max-width: 220px; }

/* ---------- Device-paste connect steps ---------- */
.steps { list-style: none; counter-reset: s; padding: 0; margin: 22px 0 0; display: flex; flex-direction: column; gap: 18px; }
.steps > li { counter-increment: s; position: relative; padding-left: 46px; }
.steps > li::before { content: counter(s); position: absolute; left: 0; top: 0; width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; background: linear-gradient(135deg, var(--primary-2), var(--primary-dark)); color: #fff; font-weight: 700; font-size: .9rem; }
.steps > li b { display: block; font-size: 1rem; color: var(--ink); }
.steps > li p { margin: 4px 0 10px; }
.steps code { background: var(--bg-2); padding: 1px 6px; border-radius: 5px; font-size: .85em; }
.paste-form textarea { margin-top: 0; font-family: ui-monospace, monospace; font-size: .85rem; }
.paste-form .btn { margin-top: 12px; }

/* ---------- Toast ---------- */
.toast { position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 20px); background: var(--ink); color: #fff; padding: 12px 20px; border-radius: 12px; font-size: .9rem; font-weight: 500; box-shadow: var(--shadow); opacity: 0; pointer-events: none; transition: opacity .25s, transform .25s; z-index: 999; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Assistant / tools ---------- */
.tools-row { display: grid; gap: 14px; margin: 6px 0 22px; }
.tool-card { display: flex; align-items: center; gap: 16px; padding: 18px 20px; background: #fff; border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-sm); }
.tool-card.tool-on { border-color: #a7f3d0; background: #f6fffb; }
.tool-ic { flex: 0 0 auto; width: 46px; height: 46px; display: grid; place-items: center; border-radius: 12px; background: var(--bg-2); color: var(--primary); }
.tool-card.tool-on .tool-ic { background: #dcfce7; color: #059669; }
.tool-ic .ic { width: 22px; height: 22px; }
.tool-body { flex: 1; min-width: 0; }
.tool-body h3 { margin: 0 0 2px; font-size: 1.02rem; }
.tool-body p { margin: 0; font-size: .88rem; }
.tool-action { flex: 0 0 auto; }
.tool-action form { margin: 0; }
.assistant-chat { height: 60vh; min-height: 420px; }
.suggest-row { display: flex; flex-wrap: wrap; gap: 8px; padding: 12px 15px 0; }
.suggest { font-size: .84rem; font-weight: 500; color: var(--primary-dark); background: var(--bg-2); border: 1px solid var(--line); border-radius: 20px; padding: 7px 13px; cursor: pointer; transition: background .15s, border-color .15s; }
.suggest:hover { background: #eef2ff; border-color: #c7d2fe; }

/* ---------- Gender / voice selector ---------- */
.gender-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 9px; }
.gender-card input { position: absolute; opacity: 0; pointer-events: none; }
.gender-inner { display: flex; align-items: center; gap: 13px; padding: 14px; border: 1.5px solid var(--line); border-radius: 13px; cursor: pointer; transition: .16s; background: #fdfdff; }
.gender-card:hover .gender-inner { border-color: #cdd2e2; }
.gender-ic { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary); flex: 0 0 auto; transition: .16s; }
.gender-ic .ic { width: 22px; height: 22px; }
.gender-text { display: flex; flex-direction: column; line-height: 1.3; }
.gender-title { font-weight: 700; font-size: .98rem; color: var(--ink); }
.gender-sub { font-size: .8rem; color: var(--muted); font-weight: 400; }
.gender-check { margin-left: auto; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: var(--primary); color: #fff; opacity: 0; transform: scale(.5); transition: .18s cubic-bezier(.34,1.56,.64,1); }
.gender-card input:checked + .gender-inner { border-color: var(--primary); background: var(--primary-soft); box-shadow: 0 0 0 3px var(--primary-soft); }
.gender-card input:checked + .gender-inner .gender-check { opacity: 1; transform: none; }
.gender-card input:focus-visible + .gender-inner { border-color: var(--primary); }

/* ---------- Voice call popup ---------- */
.call-overlay { position: fixed; inset: 0; z-index: 200; display: flex; align-items: center; justify-content: center;
    background: radial-gradient(1000px 600px at 50% 0%, #1d2240, #0c0f1f 70%); backdrop-filter: blur(4px);
    opacity: 0; visibility: hidden; transition: opacity .3s ease, visibility .3s; }
.call-overlay.open { opacity: 1; visibility: visible; }
.call-screen { width: 100%; max-width: 420px; min-height: 100%; display: flex; flex-direction: column; align-items: center; padding: 30px 24px 40px; color: #fff;
    transform: translateY(24px); transition: transform .35s cubic-bezier(.22,1,.36,1); }
.call-overlay.open .call-screen { transform: none; }

.call-top { width: 100%; display: flex; align-items: center; justify-content: space-between; font-size: .85rem; color: #aab; }
.call-net { display: inline-flex; align-items: center; gap: 7px; font-weight: 600; }
.net-dot { width: 8px; height: 8px; border-radius: 50%; background: #34d399; box-shadow: 0 0 0 3px rgba(52,211,153,.18); animation: pulse-dot 2s infinite; }
.call-timer { font-variant-numeric: tabular-nums; color: #cdd3e6; font-weight: 600; }

.call-stage { position: relative; margin: auto 0 0; display: grid; place-items: center; width: 200px; height: 200px; }
.call-rings { position: absolute; inset: 0; display: grid; place-items: center; }
.call-rings span { position: absolute; width: 130px; height: 130px; border-radius: 50%; border: 2px solid rgba(124,131,255,.45); opacity: 0; }
.call-stage[data-mode="listening"] .call-rings span { animation: ring 2.4s ease-out infinite; border-color: rgba(52,211,153,.5); }
.call-stage[data-mode="speaking"] .call-rings span { animation: ring 1.8s ease-out infinite; border-color: rgba(124,131,255,.6); }
.call-stage[data-mode="thinking"] .call-rings span { animation: ring 3.2s ease-out infinite; border-color: rgba(180,190,255,.35); }
.call-rings span:nth-child(2) { animation-delay: .6s !important; }
.call-rings span:nth-child(3) { animation-delay: 1.2s !important; }
.call-avatar { position: relative; width: 124px; height: 124px; border-radius: 50%; display: grid; place-items: center; font-size: 3.2rem; font-weight: 800; color: #fff;
    background: var(--c, #4f46e5); background-image: linear-gradient(135deg, color-mix(in srgb, var(--c) 85%, #fff 15%), color-mix(in srgb, var(--c) 70%, #000 30%));
    box-shadow: 0 18px 50px -10px color-mix(in srgb, var(--c) 70%, transparent); }
.call-stage[data-mode="speaking"] .call-avatar { animation: talk 1.1s ease-in-out infinite; }

.call-name { margin-top: 26px; font-size: 1.7rem; font-weight: 800; letter-spacing: -.02em; }
.call-state { margin-top: 6px; color: #aeb6d4; font-size: .98rem; min-height: 22px; }
.call-caption { margin: 14px auto 0; max-width: 360px; min-height: 44px; color: #e7eaf6; font-size: .98rem; line-height: 1.5; text-align: center; }

.call-controls { margin-top: auto; padding-top: 28px; display: flex; align-items: center; gap: 28px; }
.call-ctl { display: inline-flex; flex-direction: column; align-items: center; justify-content: center; gap: 7px; width: 66px; height: 66px; border-radius: 50%;
    background: rgba(255,255,255,.12); color: #fff; border: 1px solid rgba(255,255,255,.16); cursor: pointer; font-family: inherit; font-size: .72rem; font-weight: 600;
    transition: transform .16s, background .2s; backdrop-filter: blur(4px); }
.call-ctl:hover { transform: translateY(-2px); background: rgba(255,255,255,.2); }
.call-ctl .ctl-ic .ic-sm { width: 22px; height: 22px; }
.call-ctl.on { background: #fff; color: #1d2240; }
.call-ctl.hangup { width: 70px; height: 70px; background: linear-gradient(135deg, #f1556c, #dc2626); border: none; box-shadow: 0 10px 26px -6px rgba(220,38,38,.7); }
.call-ctl.hangup .ic-sm { width: 26px; height: 26px; }
.call-ctl.hangup:hover { transform: translateY(-2px) scale(1.04); }

@keyframes ring { 0% { transform: scale(.7); opacity: .8; } 100% { transform: scale(1.5); opacity: 0; } }
@keyframes talk { 0%,100% { transform: scale(1); } 50% { transform: scale(1.05); } }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
    .features { grid-template-columns: 1fr; }
    .agent-page { grid-template-columns: 1fr; }
    .grid-2 { grid-template-columns: 1fr; }
    .chat-wrap { height: 70vh; }
    .nav-link span { }
}
@media (max-width: 520px) {
    .nav-link { padding: 8px; }
    .brand-name { font-size: 1.1rem; }
    main.container { padding-top: 32px; }
}

/* ---- Mr. Elon "sell my product" card ---- */
.sell-card { margin: 18px 0 6px; padding: 16px 18px; border: 1px solid #e5e7eb; border-radius: 14px; background: linear-gradient(180deg,#faf5ff,#fff); }
.sell-toggle { display: flex; align-items: flex-start; gap: 12px; cursor: pointer; margin: 0; }
.sell-toggle input { width: 20px; height: 20px; margin-top: 2px; accent-color: #7c3aed; flex: none; }
.sell-toggle-text { display: flex; flex-direction: column; gap: 2px; }
.sell-title { font-weight: 700; }
.sell-box { margin-top: 14px; }
.sell-box textarea { width: 100%; }
.elon-status { margin-top: 14px; padding: 14px; border-radius: 12px; background: #fff; border: 1px solid #ede9fe; }
.elon-status-head { display: flex; align-items: center; gap: 8px; font-size: .95rem; margin-bottom: 12px; text-transform: capitalize; }
.elon-dot { width: 9px; height: 9px; border-radius: 50%; background: #22c55e; box-shadow: 0 0 0 0 rgba(34,197,94,.5); animation: elonpulse 1.6s infinite; flex: none; }
@keyframes elonpulse { 0%{box-shadow:0 0 0 0 rgba(34,197,94,.5);} 70%{box-shadow:0 0 0 8px rgba(34,197,94,0);} 100%{box-shadow:0 0 0 0 rgba(34,197,94,0);} }
.elon-stats { display: grid; grid-template-columns: repeat(4,1fr); gap: 10px; }
.elon-stat { text-align: center; padding: 10px 4px; border-radius: 10px; background: #f5f3ff; }
.elon-stat span { display: block; font-size: 1.5rem; font-weight: 800; color: #6d28d9; line-height: 1; }
.elon-stat small { display: block; margin-top: 4px; color: #6b7280; font-size: .72rem; }

/* ---- Legal pages + footer links ---- */
.legal h2 { margin: 22px 0 8px; font-size: 1.12rem; }
.legal p, .legal li { color: #374151; line-height: 1.7; }
.legal ul { margin: 6px 0 6px 18px; }
.legal a { color: #6d28d9; }
.foot-links { display: inline-flex; gap: 14px; margin: 0 8px; }
.foot-links a { color: inherit; opacity: .85; text-decoration: none; }
.foot-links a:hover { opacity: 1; text-decoration: underline; }
