/* NaukriGo Connect — customer PWA. Palette taken from leads.naukrigo.com (theme #8f2f63, --nk-pink #d6338a, --nk-violet #8b5cf6, Plus Jakarta Sans). */
:root {
  --nk-pink: #d6338a; --nk-violet: #8b5cf6; --nk-deep: #8f2f63;
  --grad: linear-gradient(135deg, var(--nk-pink), var(--nk-violet));
  --brand: #b42f7c; --brand-2: var(--nk-violet); --brand-ink: #ffffff;
  --bg: #f5f6f8; --bg-chat: #f7f2f8; --surface: #ffffff; --surface-2: #faf6fb;
  --ink: #1a1220; --ink-2: #3d3042; --ink-3: #7a6c80; --line: #ece3ef;
  --mine: #f7e3f0; --theirs: #ffffff; --auto: #f1ebff; --danger: #b42318; --ok: #0f7b4b; --warn: #a15c00;
  --read: #8b5cf6; --radius: 18px; --shadow: 0 1px 2px rgba(26, 18, 32, .06), 0 10px 28px rgba(143, 47, 99, .08);
  --glass: rgba(255, 255, 255, .62);
  --font: "Plus Jakarta Sans", Inter, system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", "Noto Sans Devanagari", sans-serif;
  color-scheme: light dark;
}
:root[data-theme="dark"] {
  color-scheme: dark;
    --brand: #e45aa6; --bg: #120c17; --bg-chat: #150e1b; --surface: #1d1524; --surface-2: #241a2c; --ink: #f2ecf5; --ink-2: #cbbfd2;
    --ink-3: #9a8ba3; --line: #33263b; --mine: #4a1f3c; --theirs: #241a2c; --auto: #2a2140; --glass: rgba(29, 21, 36, .7);
    --shadow: 0 1px 2px rgba(0, 0, 0, .45);
}
:root[data-theme="light"] { color-scheme: light; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --brand: #e45aa6; --bg: #120c17; --bg-chat: #150e1b; --surface: #1d1524; --surface-2: #241a2c; --ink: #f2ecf5; --ink-2: #cbbfd2;
    --ink-3: #9a8ba3; --line: #33263b; --mine: #4a1f3c; --theirs: #241a2c; --auto: #2a2140; --glass: rgba(29, 21, 36, .7);
    --shadow: 0 1px 2px rgba(0, 0, 0, .45);
  }
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { font: 16px/1.45 var(--font); color: var(--ink); background: var(--bg); -webkit-font-smoothing: antialiased; }
body::before { content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(55vmax 45vmax at 12% 10%, rgba(215, 127, 169, .30), transparent 60%),
              radial-gradient(55vmax 45vmax at 88% 22%, rgba(169, 145, 207, .34), transparent 60%),
              radial-gradient(50vmax 40vmax at 50% 100%, rgba(255, 233, 220, .55), transparent 60%); }
:root[data-theme="dark"] body::before { opacity: .35; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) body::before { opacity: .35; } }
main { min-height: 100dvh; display: flex; flex-direction: column; outline: none; }
button, input, textarea { font: inherit; color: inherit; }
a { color: var(--brand); }
.skip { position: absolute; left: -9999px; } .skip:focus { left: 8px; top: 8px; z-index: 99; background: var(--surface); padding: 8px; }
.center { flex: 1; display: grid; place-items: center; padding: 24px; text-align: center; }
.spinner { width: 34px; height: 34px; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--brand); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* ---------- onboarding pages ---------- */
.page { width: 100%; max-width: 460px; margin: 0 auto; padding: max(20px, env(safe-area-inset-top)) 20px 28px; flex: 1; display: flex; flex-direction: column; gap: 18px; }
.hero { position: relative; overflow: hidden; border-radius: 26px; padding: 26px 22px 22px; color: var(--brand-ink);
  background: radial-gradient(120% 140% at 100% 0%, var(--nk-violet) 0%, var(--nk-pink) 60%, var(--nk-deep) 100%); box-shadow: var(--shadow); }
.hero::after { content: ""; position: absolute; inset: auto -40px -60px auto; width: 180px; height: 180px; border-radius: 50%; background: rgba(255, 255, 255, .12); }
.hero .logo { display: flex; align-items: center; gap: 10px; font-weight: 700; letter-spacing: .2px; }
.hero .logo img { width: 34px; height: 34px; border-radius: 10px; background: #fff; padding: 3px; object-fit: contain; }
.hero h1 { margin: 18px 0 6px; font-size: 1.55rem; line-height: 1.2; }
.hero p { margin: 0; opacity: .92; }
.card { background: var(--glass); backdrop-filter: blur(16px) saturate(140%); -webkit-backdrop-filter: blur(16px) saturate(140%); border-radius: 22px; padding: 20px; box-shadow: var(--shadow); border: 1px solid var(--line); }
.steps { display: flex; gap: 6px; justify-content: center; }
.steps span { width: 28px; height: 4px; border-radius: 4px; background: var(--line); } .steps span.on { background: var(--grad); }
label.field { display: block; margin-bottom: 14px; }
label.field > span { display: block; font-weight: 600; font-size: .92rem; margin-bottom: 6px; }
label.field small { display: block; color: var(--ink-3); font-size: .8rem; margin-top: 5px; }
.input { display: flex; align-items: center; border: 1.5px solid var(--line); border-radius: 14px; background: var(--surface-2); transition: border-color .15s; }
.input:focus-within { border-color: var(--brand); background: var(--surface); }
.input .pre { padding: 0 2px 0 14px; color: var(--ink-2); font-weight: 600; }
.input input { flex: 1; min-width: 0; border: 0; background: transparent; padding: 14px; font-size: 1.02rem; outline: none; }
.field.err .input { border-color: var(--danger); }
.consent .msg, .field .msg { color: var(--danger); font-size: .82rem; margin-top: 5px; display: none; } .field.err .msg, .consent.err .msg { display: block; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: .9rem; color: var(--ink-2); margin: 8px 0; }
.check input { width: 20px; height: 20px; margin-top: 1px; accent-color: var(--brand); flex: none; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.btn { width: 100%; min-height: 50px; border: 0; border-radius: 999px; background: var(--grad); color: var(--brand-ink); font-weight: 700; box-shadow: 0 8px 20px rgba(214, 51, 138, .25); font-size: 1rem; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.btn:disabled { opacity: .6; cursor: default; }
.btn.ghost { background: var(--surface); color: var(--brand); border: 1.5px solid var(--line); box-shadow: none; }
.btn.link { background: none; color: var(--ink-2); min-height: 40px; font-weight: 600; box-shadow: none; }
.note { font-size: .82rem; color: var(--ink-3); text-align: center; margin: 0; }
.alert { border-radius: 14px; padding: 12px 14px; font-size: .9rem; background: var(--surface-2); border: 1px solid var(--line); }
.alert.err { background: #fef3f2; color: var(--danger); border-color: #fecdca; }
.alert.ok { background: #ecfdf3; color: var(--ok); border-color: #abefc6; }
.alert.warn { background: #fffaeb; color: var(--warn); border-color: #fedf89; }
:root[data-theme="dark"] :is(.alert.err, .alert.ok, .alert.warn) { background: var(--surface-2); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) :is(.alert.err, .alert.ok, .alert.warn) { background: var(--surface-2); } }
.howto { list-style: none; padding: 0; margin: 6px 0 0; display: grid; gap: 10px; counter-reset: s; }
.howto li { display: flex; gap: 12px; align-items: center; padding: 12px; border-radius: 14px; background: var(--surface-2); counter-increment: s; }
.howto li::before { content: counter(s); flex: none; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--grad); color: #fff; font-weight: 700; font-size: .85rem; }
.howto .ico { flex: none; width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--surface); border: 1px solid var(--line); }
.howto .ico svg { width: 20px; height: 20px; stroke: var(--brand); fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.code { font: 700 1.9rem/1 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: 4px; text-align: center; padding: 16px; border-radius: 14px; background: var(--surface-2); border: 1.5px dashed var(--nk-violet); color: var(--nk-deep); }
.bell { width: 64px; height: 64px; border-radius: 20px; margin: 0 auto 6px; display: grid; place-items: center; background: var(--grad); }
.bell svg { width: 32px; height: 32px; stroke: #fff; fill: none; stroke-width: 2; }
.tabs { display: flex; gap: 6px; background: var(--surface-2); padding: 4px; border-radius: 12px; }
.tabs button { flex: 1; border: 0; background: transparent; padding: 8px; border-radius: 9px; font-weight: 600; color: var(--ink-2); cursor: pointer; }
.tabs button[aria-selected="true"] { background: var(--surface); color: var(--brand); color: var(--ink); box-shadow: var(--shadow); }
h2 { margin: 0 0 6px; font-size: 1.2rem; }
p.sub { margin: 0 0 14px; color: var(--ink-2); font-size: .93rem; }

/* ---------- chat ---------- */
.chat { height: 100dvh; display: flex; flex-direction: column; background: var(--bg-chat); }
.chat header { display: flex; align-items: center; gap: 12px; padding: max(10px, env(safe-area-inset-top)) 12px 10px; color: #fff;
  background: linear-gradient(120deg, rgba(214, 51, 138, .95), rgba(139, 92, 246, .93)); backdrop-filter: saturate(160%) blur(12px); -webkit-backdrop-filter: saturate(160%) blur(12px); position: sticky; top: 0; z-index: 5; }
.avatar { width: 40px; height: 40px; border-radius: 50%; background: #fff; display: grid; place-items: center; flex: none; }
.avatar img { width: 28px; height: 28px; object-fit: contain; }
.chat header .who { flex: 1; min-width: 0; }
.chat header .who b { display: block; font-size: 1.02rem; }
.chat header .who small { opacity: .85; font-size: .78rem; }
.iconbtn { width: 42px; height: 42px; border: 0; border-radius: 50%; background: transparent; color: inherit; display: grid; place-items: center; cursor: pointer; }
.iconbtn svg { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.banner { margin: 8px 10px 0; padding: 9px 12px; border-radius: 12px; font-size: .84rem; display: flex; gap: 10px; align-items: center; background: #fffaeb; color: var(--warn); border: 1px solid #fedf89; }
.banner button { margin-left: auto; border: 0; background: none; color: inherit; font-weight: 700; cursor: pointer; }
.msgs { flex: 1; overflow-y: auto; padding: 10px 10px 14px; display: flex; flex-direction: column; gap: 3px; overscroll-behavior: contain; }
.day { align-self: center; margin: 10px 0 6px; font-size: .74rem; color: var(--ink-2); background: var(--surface); padding: 4px 10px; border-radius: 9px; box-shadow: var(--shadow); }
.b { max-width: min(82%, 520px); padding: 7px 10px 5px; border-radius: 14px; background: var(--theirs); box-shadow: 0 1px 1px rgba(0, 0, 0, .06); align-self: flex-start; position: relative; white-space: pre-wrap; overflow-wrap: anywhere; }
.b.mine { align-self: flex-end; background: var(--mine); border-top-right-radius: 4px; }
.b.theirs { border-top-left-radius: 4px; }
.b.auto { background: var(--auto); }
.b .lbl { display: block; font-size: .74rem; font-weight: 700; color: var(--nk-deep); margin-bottom: 2px; }
.b .lbl em { font-style: normal; font-weight: 600; color: var(--ink-3); margin-left: 6px; }
.b .meta { float: right; margin: 6px 0 -2px 10px; font-size: .68rem; color: var(--ink-3); display: inline-flex; gap: 3px; align-items: center; }
.tick { width: 16px; height: 11px; stroke: var(--ink-3); fill: none; stroke-width: 1.8; } .tick.read { stroke: var(--read); } .tick.dbl { width: 20px; }
.b.failed { outline: 1.5px solid var(--danger); } .b .retry { display: block; color: var(--danger); font-size: .75rem; font-weight: 700; border: 0; background: none; padding: 4px 0 0; cursor: pointer; }
.typing { align-self: flex-start; font-size: .8rem; color: var(--ink-2); padding: 4px 10px; }
.composer { display: flex; gap: 8px; align-items: flex-end; padding: 8px 8px max(8px, env(safe-area-inset-bottom)); background: var(--bg-chat); }
.composer .box { flex: 1; background: var(--surface); border-radius: 24px; padding: 4px 6px 4px 14px; display: flex; align-items: flex-end; box-shadow: var(--shadow); }
.composer textarea { flex: 1; border: 0; outline: none; resize: none; background: transparent; padding: 9px 0; max-height: 132px; line-height: 1.35; font-size: 1rem; }
.send { width: 48px; height: 48px; flex: none; border-radius: 50%; border: 0; background: var(--grad); color: #fff; display: grid; place-items: center; cursor: pointer; }
.send:disabled { opacity: .5; }
.send svg { width: 22px; height: 22px; fill: currentColor; }
.sheet { position: fixed; inset: 0; background: rgba(0, 0, 0, .35); display: flex; align-items: flex-end; z-index: 20; }
.sheet > div { width: 100%; max-width: 520px; margin: 0 auto; background: var(--surface); border-radius: 22px 22px 0 0; padding: 18px 18px max(18px, env(safe-area-inset-bottom)); display: grid; gap: 10px; }
.netbar { position: fixed; top: 0; left: 0; right: 0; z-index: 30; text-align: center; font-size: .82rem; padding: 6px; background: #1f2937; color: #fff; }
.toast { position: fixed; left: 50%; bottom: 90px; transform: translateX(-50%); background: #1f2937; color: #fff; padding: 10px 16px; border-radius: 12px; font-size: .9rem; z-index: 40; max-width: 90vw; }
.older { align-self: center; font-size: .8rem; border: 0; background: var(--surface); padding: 6px 12px; border-radius: 10px; color: var(--ink-2); cursor: pointer; margin: 6px 0; }

/* theme switch */
.page { position: relative; }
.theme-fab { position: absolute; top: max(14px, env(safe-area-inset-top)); right: 14px; z-index: 3; width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line); background: var(--glass); color: var(--ink); display: grid; place-items: center; cursor: pointer; backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.theme-fab svg, .seg svg { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.page > .steps { margin-top: 12px; }
.seg { display: flex; gap: 6px; background: var(--surface-2); padding: 4px; border-radius: 999px; }
.seg button { flex: 1; display: inline-flex; gap: 6px; align-items: center; justify-content: center; border: 0; background: transparent; padding: 9px; border-radius: 999px; font-weight: 600; color: var(--ink-2); cursor: pointer; }
.seg button[aria-pressed="true"] { background: var(--surface); color: var(--brand); box-shadow: var(--shadow); }
.steps span { background: rgba(143, 47, 99, .18); }
:root[data-theme="dark"] .b .lbl { color: #f29ccb; }
:root[data-theme="dark"] .banner { background: #2b2114; border-color: #5c4313; color: #f5c46b; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .b .lbl { color: #f29ccb; }
  :root:not([data-theme="light"]) .banner { background: #2b2114; border-color: #5c4313; color: #f5c46b; }
}

/* ---------- chats: list + conversation (mobile: one pane; desktop: two panes) ---------- */
.app { height: 100dvh; display: grid; grid-template-columns: minmax(0, 1fr); background: var(--bg-chat); overflow: hidden; }
.app .pane-chat { display: none; min-width: 0; }
.app.show-chat .pane-list { display: none; }
.app.show-chat .pane-chat { display: flex; }
.pane-list, .pane-chat { flex-direction: column; height: 100dvh; min-height: 0; }
.pane-list { display: flex; background: var(--surface); min-width: 0; }
.citem, .cmain, .crow { min-width: 0; }
@media (min-width: 900px) {
  .app { grid-template-columns: minmax(300px, 380px) minmax(0, 1fr); }
  .app .pane-list, .app.show-chat .pane-list { display: flex; border-right: 1px solid var(--line); }
  .app .pane-chat { display: flex; }
  .pane-chat .back { display: none; }
}
.bar { display: flex; align-items: center; gap: 10px; padding: max(10px, env(safe-area-inset-top)) 10px 10px; color: #fff; min-height: 60px;
  background: linear-gradient(120deg, rgba(214, 51, 138, .95), rgba(139, 92, 246, .93)); position: sticky; top: 0; z-index: 5; }
.bar .brand { flex: 1; display: flex; align-items: center; gap: 10px; min-width: 0; }
.bar .brand img { width: 36px; height: 36px; border-radius: 50%; background: #fff; padding: 4px; object-fit: contain; }
.bar .brand b, .bar .who b { display: block; font-size: 1.05rem; }
.bar small { opacity: .85; font-size: .76rem; }
.bar .who { flex: 1; min-width: 0; }
.bar .who b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.clist-wrap { flex: 1; overflow-y: auto; overscroll-behavior: contain; }
.clist { list-style: none; margin: 0; padding: 4px 0; }
.citem { width: 100%; display: flex; gap: 12px; align-items: center; padding: 10px 14px; border: 0; background: transparent; text-align: left; cursor: pointer; color: var(--ink); min-height: 72px; }
.citem:hover, .citem.on { background: var(--surface-2); }
.citem:focus-visible { outline: 2px solid var(--nk-violet); outline-offset: -2px; }
.cmain { flex: 1; min-width: 0; border-bottom: 1px solid var(--line); padding-bottom: 10px; }
.crow { display: flex; align-items: center; gap: 8px; justify-content: space-between; }
.crow b { font-size: 1rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.crow time { font-size: .74rem; color: var(--ink-3); flex: none; }
.crow time.hot { color: var(--nk-pink); font-weight: 700; }
.cprev { color: var(--ink-3); font-size: .9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 2px; }
.badge { flex: none; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px; background: var(--grad); color: #fff; font-size: .74rem; font-weight: 700; display: grid; place-items: center; }
.avatar { width: 48px; height: 48px; flex: none; border-radius: 50%; display: grid; place-items: center; }
.bar .avatar { width: 40px; height: 40px; background: #fff; }
.av-icon { background: var(--grad); }
.av-icon svg { width: 24px; height: 24px; stroke: #fff; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.bar .av-icon { background: rgba(255, 255, 255, .22); }
.av-initials { background: var(--grad); color: #fff; font-weight: 700; }
.pane-chat .msgs { flex: 1; }
.empty { flex: 1; display: grid; place-content: center; justify-items: center; gap: 10px; color: var(--ink-3); text-align: center; padding: 24px; }
.empty img { width: 72px; height: 72px; opacity: .8; }
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 0 10px 2px; scrollbar-width: none; }
.chips:empty { display: none; }
.chip { flex: none; border: 1px solid var(--line); background: var(--surface); color: var(--brand); border-radius: 999px; padding: 8px 12px; font-size: .86rem; font-weight: 600; cursor: pointer; }

/* attachments */
.composer .box { align-items: flex-end; }
.composer .attach { width: 38px; height: 38px; color: var(--ink-3); margin: 0 2px 2px -8px; flex: none; }
.att-img { display: block; margin: 2px 0 4px; border-radius: 10px; overflow: hidden; line-height: 0; background: var(--surface-2); max-width: 240px; }
.att-img img { display: block; max-width: 100%; height: auto; }
.att-file { display: flex; gap: 8px; align-items: center; padding: 8px 10px; margin: 2px 0 4px; border-radius: 10px; background: var(--surface-2); color: var(--ink); text-decoration: none; font-weight: 600; font-size: .9rem; }
.att-file svg { width: 18px; height: 18px; stroke: var(--brand); fill: none; stroke-width: 2; }
.att-file small { font-weight: 400; color: var(--ink-3); }

/* audio call */
.callsheet { position: fixed; inset: 0; z-index: 50; display: grid; place-content: center; justify-items: center; gap: 10px; padding: 24px; text-align: center; color: #fff;
  background: radial-gradient(120% 120% at 50% 0%, var(--nk-violet), var(--nk-deep) 70%, #2a1030); }
.callsheet h2 { font-size: 1.5rem; margin: 8px 0 0; } .callsheet .sub { color: rgba(255, 255, 255, .85); margin: 0 0 18px; }
.avatar.big { width: 96px; height: 96px; background: rgba(255, 255, 255, .18); } .avatar.big svg { width: 44px; height: 44px; }
.callbtns { display: flex; gap: 14px; } .callbtns .btn { min-width: 132px; box-shadow: none; }
.btn.danger { background: #d92d20; } .btn.ok { background: #079455; } .callsheet .btn.ghost { background: rgba(255, 255, 255, .16); color: #fff; border-color: transparent; }

/* install-first, "I am in", passkey */
.pbar { height: 8px; border-radius: 8px; background: var(--line); overflow: hidden; margin: 14px 0 6px; }
.pbar span { display: block; height: 100%; width: 40%; border-radius: 8px; background: var(--grad); animation: pbar 1.4s ease-in-out infinite; }
@keyframes pbar { 0% { margin-left: -40%; } 100% { margin-left: 100%; } }
.ios-one { display: grid; justify-items: center; gap: 8px; text-align: center; padding: 8px 0 0; }
.ios-one .ico svg { width: 34px; height: 34px; stroke: var(--brand); fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ios-one p { margin: 0; font-size: 1.1rem; }
.arrow { font-size: 2rem; color: var(--brand); animation: nudge 1.2s ease-in-out infinite; }
@keyframes nudge { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(8px); } }
.okl { list-style: none; padding: 0; margin: 10px 0 12px; display: grid; gap: 10px; }
.okl li { display: flex; gap: 10px; align-items: flex-start; font-size: .95rem; line-height: 1.45; }
.okmark { width: 22px; height: 22px; border-radius: 50%; background: var(--grad); color: var(--brand-ink); font-size: .8rem; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; flex: none; margin-top: 1px; }
@media (prefers-reduced-motion: reduce) { .pbar span, .arrow { animation: none; } .pbar span { width: 100%; } }

.att-audio-wrap { margin: 2px 0 4px; max-width: 260px; }
.att-audio { width: 240px; max-width: 100%; }
.att-audio-btn { border: 0; border-radius: 999px; padding: 8px 14px; background: var(--surface-2); color: inherit; font: inherit; cursor: pointer; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
