/* =====================================================================================================================
   owns.ai  -  THE MEMBER DASHBOARD

   Everything inside .app-main on /dashboard, /new, /assistant/<id>/<tab> and /admin. Builds on app.css tokens and
   components only; every class here is prefixed d- (or bot-/pg-/conv- for the assistant screen) so it can never
   collide with marketing.css or account.css.

   Coded By Darko G.
   ===================================================================================================================== */

/* ---- SHARED BITS --------------------------------------------------------------------------------------------------- */

.d-spin { display: inline-block; animation: spin .8s linear infinite; }
.d-section-title { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 34px 0 14px; }
.d-section-title h2 { font-size: 1.15rem; margin: 0; letter-spacing: -0.015em; display: flex; align-items: center; gap: 10px; }
.d-section-title h2 i { color: var(--brand); }
.d-muted-link { color: var(--muted); font-size: .88rem; font-weight: 600; }
.d-muted-link:hover { color: var(--text); }
.d-sub { color: var(--muted); font-size: .88rem; }
.d-hint { font-size: .82rem; color: var(--faint); }
.d-sk-line { height: 14px; margin: 10px 0; }
.d-sk-block { height: 120px; border-radius: var(--r-lg); }
.d-pill-num { font-variant-numeric: tabular-nums; }

.d-av { width: 44px; height: 44px; border-radius: var(--r-sm); display: grid; place-items: center; font-weight: 800; font-size: 1.25rem; color: #fff; flex: none; overflow: hidden;
        box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .14), 0 8px 22px -10px var(--av-c, color-mix(in srgb, var(--accent) 80%, transparent)); background: var(--av-c, var(--brand)); }
.d-av img { width: 100%; height: 100%; object-fit: cover; }
.d-av.is-lg { width: 60px; height: 60px; border-radius: var(--r); font-size: 1.7rem; }
.d-av.is-sm { width: 32px; height: 32px; border-radius: var(--r-sm); font-size: .95rem; }

.d-kpis { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 14px; }
.d-kpis .kpi { padding: 18px; }
.d-kpis .kpi-value { font-size: 1.7rem; }
.d-kpi-trend { font-size: .76rem; font-weight: 700; color: var(--success); }
@media (max-width: 1200px) { .d-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 600px) { .d-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } .d-kpis .kpi-value { font-size: 1.4rem; } }

.d-chart-card { padding: 20px 22px 14px; }
.d-chart-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.d-chart-head h3 { font-size: 1rem; margin: 0; }
.d-chart-wrap { position: relative; height: 260px; }
.d-chart-legend { display: flex; gap: 16px; font-size: .8rem; color: var(--muted); }
.d-chart-legend i { display: inline-block; width: 10px; height: 10px; border-radius: var(--r-xs); margin-right: 6px; vertical-align: -1px; }

.d-two { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 18px; }
@media (max-width: 1100px) { .d-two { grid-template-columns: minmax(0, 1fr); } }

.d-list { list-style: none; margin: 0; padding: 0; }
.d-list li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--border); font-size: .9rem; color: var(--text-2); }
.d-list li:last-child { border-bottom: 0; }
.d-list .q { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.d-list .q::first-letter { text-transform: uppercase; }

.d-bar { height: 6px; border-radius: var(--r-xs); background: var(--surface-3); overflow: hidden; margin-top: 6px; }
.d-bar span { display: block; height: 100%; background: var(--accent); border-radius: inherit; }

.d-locked { position: relative; text-align: center; padding: 44px 24px; border-radius: var(--r-lg); border: 1px dashed var(--border-strong); background: var(--accent-soft); }
.d-locked .empty-icon { width: 60px; height: 60px; margin: 0 auto 14px; border-radius: var(--r); display: grid; place-items: center; background: var(--surface); color: var(--brand); font-size: 1.5rem; box-shadow: none; }
.d-locked h3 { margin-bottom: 6px; }
.d-locked p { color: var(--text-2); max-width: 520px; margin: 0 auto 18px; }
.d-lock-tag { display: inline-flex; align-items: center; gap: 5px; font-size: .7rem; font-weight: 700; color: var(--warning); background: rgba(245, 158, 11, .12); border: 1px solid rgba(245, 158, 11, .28); border-radius: var(--r-xs); padding: 2px 8px; }


/* ---- DASHBOARD ----------------------------------------------------------------------------------------------------- */

.d-banner { position: relative; overflow: hidden; border-radius: var(--r-xl); padding: 26px 28px; margin-bottom: 22px; color: #fff;
            background: radial-gradient(500px 220px at 85% 0%, rgba(255, 255, 255, .22), transparent 60%), var(--accent); box-shadow: none; }
.d-banner h2 { color: #fff; font-size: 1.45rem; margin: 0 0 6px; }
.d-banner p { color: rgba(255, 255, 255, .88); margin: 0 0 16px; max-width: 640px; }
.d-banner .confetti { position: absolute; right: 26px; top: 50%; transform: translateY(-50%); font-size: 4.2rem; opacity: .9; filter: drop-shadow(0 10px 20px rgba(0, 0, 0, .25)); }
.d-banner .d-banner-close { position: absolute; top: 12px; right: 12px; width: 32px; height: 32px; border-radius: var(--r-sm); border: 0; background: rgba(255, 255, 255, .16); color: #fff; cursor: pointer; }
@media (max-width: 700px) { .d-banner .confetti { display: none; } }

.d-usage { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 20px; padding: 20px 22px; margin-bottom: 18px; }
.d-usage-top { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 10px; flex-wrap: wrap; }
.d-usage-top strong { font-family: var(--font-display); font-size: 1.15rem; }
@media (max-width: 700px) { .d-usage { grid-template-columns: minmax(0, 1fr); } }

.d-bots { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(320px, 100%), 1fr)); gap: 18px; }
.d-bot-card { padding: 20px; display: flex; flex-direction: column; gap: 16px; }
.d-bot-top { display: flex; align-items: center; gap: 14px; }
.d-bot-top h3 { font-size: 1.05rem; margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.d-bot-top a.d-domain { font-size: .84rem; color: var(--muted); }
.d-bot-top a.d-domain:hover { color: var(--text); }
.d-bot-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.d-live { display: inline-flex; align-items: center; gap: 7px; font-size: .78rem; font-weight: 600; color: var(--text-2); }
.d-bot-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.d-bot-stats div { padding: 10px 12px; border-radius: var(--r-sm); background: var(--surface-2); border: 1px solid var(--border); }
.d-bot-stats b { display: block; font-family: var(--font-display); font-size: 1.2rem; font-variant-numeric: tabular-nums; }
.d-bot-stats span { font-size: .74rem; color: var(--muted); }
.d-bot-links { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.d-bot-links a { display: flex; flex-direction: column; align-items: center; gap: 5px; padding: 9px 4px; border-radius: var(--r-sm); font-size: .74rem; font-weight: 600; color: var(--text-2);
                 border: 1px solid var(--border); background: transparent; transition: all .18s; }
.d-bot-links a i { font-size: 1rem; color: var(--brand); }
.d-bot-links a:hover { background: var(--surface-2); color: var(--text); border-color: var(--border-strong); }
.d-bot-note { font-size: .82rem; color: var(--warning); }
.d-bot-links + .d-bot-links { margin-top: -10px; }

/* /assistants: the plan's assistant allowance, above the cards */
.as-summary { display: flex; align-items: center; gap: 20px; padding: 18px 22px; flex-wrap: wrap; }
.as-sum-main { flex: 1 1 280px; min-width: 0; }
.as-sum-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }

.d-new-card { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; min-height: 280px; padding: 24px; text-align: center;
              border: 1.5px dashed var(--border-strong); border-radius: var(--r-lg); color: var(--muted); background: transparent; transition: all .25s var(--ease); }
.d-new-card:hover { border-color: var(--brand); color: var(--text); background: var(--accent-soft); }
.d-new-card .d-new-plus { width: 56px; height: 56px; border-radius: var(--r); display: grid; place-items: center; background: var(--accent); color: #fff; font-size: 1.4rem; box-shadow: none; }
.d-new-card.is-disabled { cursor: default; }
.d-new-card.is-disabled .d-new-plus { background: var(--surface-3); color: var(--faint); box-shadow: none; }

.d-hero-empty { padding: 48px 32px; text-align: center; overflow: hidden; }
.d-hero-empty h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); }
.d-hero-empty .lead { max-width: 560px; margin: 0 auto 26px; }
.d-urlform { display: flex; gap: 10px; max-width: 620px; margin: 0 auto; padding: 8px; border-radius: var(--r); background: var(--surface-2); border: 1px solid var(--border-strong); box-shadow: none; }
.d-urlform .input { border: 0; background: transparent !important; box-shadow: none !important; font-size: 1.05rem; flex: 1 1 auto; min-width: 0; }
/* The button keeps its full width - icon and label - and the address box gives way instead. */
.d-urlform .btn { flex: none; white-space: nowrap; }
.d-urlform { transition: box-shadow .4s var(--ease-fade), border-color .25s; }
.d-urlform:focus-within { border-color: color-mix(in srgb, var(--accent) 70%, transparent); box-shadow: var(--field-glow); }
.d-urlform .input-icon { display: grid; place-items: center; padding-left: 10px; color: var(--brand); }
@media (max-width: 600px) {
    /* the globe and the address share a row; the button takes the whole row under them */
    .d-urlform { flex-wrap: wrap; }
    .d-urlform .input { flex: 1 1 0; }
    .d-urlform .btn { flex: 1 1 100%; justify-content: center; }
    .d-hero-empty { padding: 32px 18px; }
}
.d-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-top: 30px; text-align: left; }
.d-steps div { padding: 16px; border-radius: var(--r-sm); background: var(--surface-2); border: 1px solid var(--border); font-size: .88rem; color: var(--text-2); }
.d-steps b { display: block; color: var(--text); font-family: var(--font-display); margin-bottom: 2px; }
.d-steps i { color: var(--brand); margin-bottom: 8px; font-size: 1.15rem; display: block; }
@media (max-width: 700px) { .d-steps { grid-template-columns: minmax(0, 1fr); } }

.d-job { padding: 14px 16px; border-radius: var(--r-sm); background: var(--accent-soft); border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent); }
.d-job-top { display: flex; justify-content: space-between; gap: 10px; font-size: .86rem; font-weight: 600; margin-bottom: 8px; }
.d-job-msg { font-size: .8rem; color: var(--muted); margin-top: 8px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }


/* ---- NEW ASSISTANT ------------------------------------------------------------------------------------------------- */

.d-new-wrap { max-width: 760px; margin: 20px auto 0; }
.d-new-wrap .d-hero-empty { text-align: left; }
.d-new-wrap .d-urlform { margin: 0; max-width: none; }


/* ---- ASSISTANT HEADER + TABS --------------------------------------------------------------------------------------- */

.bot-head { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; margin-bottom: 18px; }
.bot-title { min-width: 0; flex: 1 1 260px; }
.bot-title h1 { font-size: clamp(1.4rem, 2.4vw, 1.9rem); margin: 0; display: flex; align-items: center; gap: 10px; cursor: pointer; }
.bot-title h1 .fa-pen { font-size: .85rem; color: var(--faint); opacity: 0; transition: opacity .2s; }
.bot-title h1:hover .fa-pen { opacity: 1; }
.bot-title .d-bot-meta { margin-top: 6px; }
.bot-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.d-menu-wrap { position: relative; }
.d-menu { position: absolute; right: 0; top: calc(100% + 8px); z-index: 50; min-width: 240px; padding: 6px; border-radius: var(--r-sm); background: var(--surface); border: 1px solid var(--border-strong);
          box-shadow: var(--shadow-lg); opacity: 0; transform: translateY(-6px); pointer-events: none; transition: all .18s var(--ease); }
.d-menu-wrap.is-open .d-menu { opacity: 1; transform: none; pointer-events: auto; }
.d-menu button, .d-menu a { display: flex; align-items: center; gap: 11px; width: 100%; padding: 10px 12px; border: 0; background: none; color: var(--text-2); border-radius: var(--r-sm);
                            font: 500 .9rem var(--font-sans); cursor: pointer; text-align: left; }
.d-menu button:hover, .d-menu a:hover { background: var(--surface-2); color: var(--text); }
.d-menu i { width: 16px; text-align: center; color: var(--muted); }
.d-menu .is-danger, .d-menu .is-danger i { color: var(--danger); }
.d-menu hr { margin: 5px 0; }

.bot-tabs { position: sticky; top: var(--nav-h); z-index: 20; margin: 0 -36px 24px; padding: 0 36px; background: color-mix(in srgb, var(--bg) 86%, transparent);
            backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
@media (max-width: 980px) { .bot-tabs { margin: 0 -16px 20px; padding: 0 16px; } }
.bot-banner:empty { display: none; }
.bot-banner { margin-bottom: 18px; }

.d-form-card { padding: 24px; }
.d-form-card h3 { font-size: 1.02rem; margin-bottom: 4px; display: flex; align-items: center; gap: 10px; }
.d-form-card h3 i { color: var(--brand); }
.d-form-card > .d-sub { margin-bottom: 18px; }
.d-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 16px; }
.d-form-grid .full { grid-column: 1 / -1; }
@media (max-width: 700px) { .d-form-grid { grid-template-columns: minmax(0, 1fr); } }
.d-savebar { position: sticky; bottom: 16px; z-index: 15; display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 18px; padding: 12px 14px 12px 18px;
             border-radius: var(--r); background: var(--glass); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border: 1px solid var(--border-strong); box-shadow: var(--shadow); }
.d-savebar .d-dirty { font-size: .86rem; color: var(--muted); display: flex; align-items: center; gap: 8px; }
.d-savebar.is-dirty .d-dirty { color: var(--warning); }

.d-stack { display: flex; flex-direction: column; gap: 18px; }


/* ---- OVERVIEW ------------------------------------------------------------------------------------------------------ */

.d-check { list-style: none; margin: 0; padding: 0; }
.d-check li { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--border); font-size: .92rem; }
.d-check li:last-child { border-bottom: 0; }
.d-check .tick { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; flex: none; font-size: .8rem; background: var(--surface-3); color: var(--faint); }
.d-check li.is-done .tick { background: rgba(34, 197, 94, .16); color: var(--success); }
.d-check li .grow span { display: block; font-size: .8rem; color: var(--muted); }
.d-devices { display: flex; flex-direction: column; gap: 12px; }
.d-devices .row-between { font-size: .88rem; }


/* ---- KNOWLEDGE ----------------------------------------------------------------------------------------------------- */

.d-page-title { font-weight: 600; color: var(--text); max-width: 340px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: block; }
.d-page-url { font-size: .78rem; color: var(--faint); max-width: 340px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: block; }
.d-page-err { font-size: .76rem; color: var(--danger); margin-top: 3px; max-width: 340px; }
.table tr.is-muted td { opacity: .55; }
.d-items { display: flex; flex-direction: column; gap: 10px; }
.d-item { display: flex; gap: 14px; align-items: flex-start; padding: 14px 16px; border-radius: var(--r-sm); border: 1px solid var(--border); background: var(--surface-2); }
.d-item .grow b { display: block; color: var(--text); font-size: .93rem; margin-bottom: 3px; }
.d-item .grow p { margin: 0; font-size: .86rem; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.d-item .d-kind { width: 32px; height: 32px; border-radius: var(--r-sm); display: grid; place-items: center; background: var(--accent-soft); color: var(--brand); flex: none; }
.d-profile-text { font-family: var(--font-mono); font-size: .86rem; min-height: 280px; line-height: 1.6; }


/* ---- APPEARANCE ---------------------------------------------------------------------------------------------------- */

.d-split { display: grid; grid-template-columns: minmax(0, 1fr) 420px; gap: 22px; align-items: start; }
@media (max-width: 1250px) { .d-split { grid-template-columns: minmax(0, 1fr) 360px; } }
@media (max-width: 1050px) { .d-split { grid-template-columns: minmax(0, 1fr); } }
.d-preview { position: sticky; top: calc(var(--nav-h) + 70px); }
.d-preview-stage { position: relative; height: 640px; border-radius: var(--r-xl); overflow: hidden; border: 1px solid var(--border-strong); box-shadow: var(--shadow-lg);
                   background: linear-gradient(180deg, var(--surface-2), var(--surface)); }
.d-preview-stage.has-shot { background-size: cover; background-position: top center; }
.d-preview-stage.has-shot::before { content: ""; position: absolute; inset: 0; background: rgba(7, 6, 15, .28); }
.d-preview-chrome { position: relative; z-index: 2; height: 34px; display: flex; align-items: center; gap: 6px; padding: 0 14px; background: var(--surface-3); border-bottom: 1px solid var(--border); }
.d-preview-chrome span { width: 10px; height: 10px; border-radius: 50%; background: var(--faint); opacity: .6; }
.d-preview-chrome em { margin-left: 10px; font-style: normal; font-size: .72rem; color: var(--muted); overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.d-preview-mount { position: absolute; inset: 34px 0 0 0; z-index: 3; }
.d-preview-fallback { position: absolute; inset: 34px 0 0 0; display: grid; place-items: center; text-align: center; padding: 24px; color: var(--muted); font-size: .9rem; z-index: 2; }
@media (max-width: 1050px) { .d-preview { position: static; } .d-preview-stage { height: 560px; } }

.d-themes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 700px) { .d-themes { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.d-theme { position: relative; padding: 10px; border-radius: var(--r); border: 1.5px solid var(--border); background: var(--surface-2); cursor: pointer; text-align: left; color: var(--text);
           font: inherit; transition: border-color .4s var(--ease-fade), transform .2s var(--ease), box-shadow .2s; }
.d-theme:hover { transform: translateY(-2px); border-color: var(--border-strong); }
.d-theme.is-active { border-color: var(--brand); box-shadow: none; }
.d-theme.is-locked { cursor: not-allowed; }
.d-theme.is-locked .tm { filter: grayscale(.6) opacity(.55); }
.d-theme-name { display: flex; align-items: center; justify-content: space-between; gap: 6px; margin-top: 9px; font-weight: 700; font-size: .86rem; font-family: var(--font-display); }
.d-theme .d-lock-tag { position: absolute; top: 16px; right: 16px; z-index: 2; }

/* Mini widget previews, one look per theme. --c is the accent. */
.tm { --c: #6D5BFF; height: 104px; border-radius: var(--r-sm); overflow: hidden; display: flex; flex-direction: column; position: relative; }
.tm .tm-h { height: 26px; display: flex; align-items: center; gap: 6px; padding: 0 8px; }
.tm .tm-h i { width: 12px; height: 12px; border-radius: 50%; background: rgba(255, 255, 255, .9); display: block; }
.tm .tm-h b { width: 40px; height: 5px; border-radius: var(--r-xs); background: rgba(255, 255, 255, .85); display: block; }
.tm .tm-b { flex: 1; padding: 8px; display: flex; flex-direction: column; gap: 5px; }
.tm .tm-m { height: 9px; border-radius: var(--r-sm); width: 70%; }
.tm .tm-m.u { align-self: flex-end; width: 46%; }
.tm-aurora { background: #120F24; }
.tm-aurora .tm-h { background: linear-gradient(120deg, var(--c), #B44CFF, #FF5C8A); }
.tm-aurora .tm-m { background: rgba(255, 255, 255, .16); } .tm-aurora .tm-m.u { background: var(--c); }
.tm-minimal { background: #FFFFFF; border: 1px solid #E8E7F0; }
.tm-minimal .tm-h { background: #FFFFFF; border-bottom: 1px solid #EEEDF4; } .tm-minimal .tm-h i { background: var(--c); } .tm-minimal .tm-h b { background: #1C1A2E; }
.tm-minimal .tm-m { background: #F1F0F6; } .tm-minimal .tm-m.u { background: #1C1A2E; }
.tm-midnight { background: #05060A; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .06); }
.tm-midnight .tm-h { background: #0B0D14; box-shadow: 0 1px 0 var(--c); } .tm-midnight .tm-h i { background: var(--c); box-shadow: 0 0 10px var(--c); }
.tm-midnight .tm-m { background: #151925; } .tm-midnight .tm-m.u { background: transparent; box-shadow: inset 0 0 0 1.5px var(--c); }
.tm-bubble { background: #FFF6FB; }
.tm-bubble .tm-h { background: var(--c); border-radius: 0 0 var(--r-sm) var(--r-sm); height: 30px; }
.tm-bubble .tm-m { background: #FFFFFF; border-radius: var(--r-sm); height: 11px; box-shadow: 0 2px 6px rgba(0, 0, 0, .06); } .tm-bubble .tm-m.u { background: var(--c); }
.tm-executive { background: #F7F5EF; }
.tm-executive .tm-h { background: #0F1B2D; border-bottom: 2px solid #C9A45C; } .tm-executive .tm-h i { background: #C9A45C; }
.tm-executive .tm-m { background: #FFFFFF; border-radius: var(--r-xs); border: 1px solid #E6E1D3; } .tm-executive .tm-m.u { background: #0F1B2D; border: 0; }
.tm-sunset { background: linear-gradient(180deg, #FFF3E8, #FFE4DA); }
.tm-sunset .tm-h { background: linear-gradient(110deg, #FF7A59, #FF4D8D); }
.tm-sunset .tm-m { background: rgba(255, 255, 255, .85); } .tm-sunset .tm-m.u { background: linear-gradient(110deg, #FF7A59, #FF4D8D); }
.tm-forest { background: #F5F4EC; }
.tm-forest .tm-h { background: linear-gradient(140deg, #1D4A31, #2E6A46); } .tm-forest .tm-h i { background: var(--c); }
.tm-forest .tm-m { background: #FFFFFF; box-shadow: 0 0 0 1px #E2E4D6; } .tm-forest .tm-m.u { background: #2E6A46; box-shadow: none; }
.tm-graphite { background: #18181B; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .06); }
.tm-graphite .tm-h { background: #1D1D21; border-bottom: 1px solid #2A2A2F; } .tm-graphite .tm-h i { background: var(--c); }
.tm-graphite .tm-m { background: #26262B; } .tm-graphite .tm-m.u { background: #EDEDEF; }
.tm-latte { background: #F6F0E7; }
.tm-latte .tm-h { background: #F1E8DC; border-bottom: 1px solid #E6DACB; } .tm-latte .tm-h i { background: #6F4E37; box-shadow: 0 0 0 2px var(--c); } .tm-latte .tm-h b { background: #3A2E25; }
.tm-latte .tm-m { background: #FFFFFF; } .tm-latte .tm-m.u { background: #6F4E37; }
.tm-lagoon { background: linear-gradient(180deg, #F2FBFB, #EEF6FB); }
.tm-lagoon .tm-h { background: linear-gradient(125deg, #00A6A6, var(--c)); }
.tm-lagoon .tm-m { background: #FFFFFF; box-shadow: 0 2px 6px rgba(0, 110, 130, .12); } .tm-lagoon .tm-m.u { background: linear-gradient(125deg, #00A6A6, var(--c)); }

/* TEMPLATE SCHEMATICS: each template's layout in neutral greys, with the accent (--c). */
.tp { --c: var(--accent); --ink: #1C1A2E; --line: #E3E4EC; height: 104px; border-radius: var(--r-sm); overflow: hidden; position: relative; background: #EEF0F5; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .05); }
.tp i, .tp b, .tp em { display: block; font-style: normal; }
.tp-card { position: absolute; inset: 8px 12px 8px auto; width: 62%; background: #FFFFFF; border-radius: var(--r-sm); box-shadow: 0 6px 16px -8px rgba(20, 20, 40, .35); display: flex; flex-direction: column; gap: 5px; padding: 0 0 7px; overflow: hidden; }
.tp .tp-bar { height: 17px; flex: none; background: var(--c); display: flex; align-items: center; gap: 3px; padding: 0 6px; }
.tp-l { height: 8px; width: 62%; margin: 0 7px; border-radius: var(--r-xs); background: #ECEDF3; }
.tp-l.u { align-self: flex-end; width: 44%; background: var(--c); }
.tp-l.s { width: 40%; }
.tp-t { height: 4px; width: 78%; margin: 0 9px; border-radius: var(--r-xs); background: #D7D9E3; }
.tp-t.s { width: 46%; }
.tp-in { height: 10px; margin: auto 7px 0; border-radius: var(--r-sm); box-shadow: inset 0 0 0 1.5px var(--line); }
.tp-fab { position: absolute; right: 5px; bottom: 5px; width: 13px; height: 13px; border-radius: 50%; background: var(--c); }
.tp-classic .tp-card { inset: 6px 22px 22px auto; width: 56%; }
.tp-messenger .tp-bar { height: 22px; justify-content: center; background: #FFFFFF; border-bottom: 1px solid var(--line); }
.tp-messenger .tp-dot { width: 11px; height: 11px; border-radius: 50%; background: var(--c); }
.tp-messenger .tp-l { border-radius: var(--r-sm) var(--r-sm) var(--r-sm) var(--r-xs); } .tp-messenger .tp-l.u { border-radius: var(--r-sm) var(--r-sm) var(--r-xs) var(--r-sm); }
.tp-messenger .tp-in { border-radius: var(--r-xs); }
.tp-editorial .tp-card { border-radius: var(--r-xs); gap: 4px; }
.tp-editorial .tp-bar { background: #FFFFFF; border-bottom: 1px solid var(--line); }
.tp-editorial .tp-cap { font: 600 22px/1 Georgia, serif; color: var(--c); margin: 2px 0 -2px 9px; height: 18px; }
.tp-editorial .tp-in { border-radius: 0; box-shadow: inset 0 -1.5px 0 var(--ink); }
.tp-terminal .tp-card { background: #111318; border-radius: var(--r-sm); gap: 6px; }
.tp-terminal .tp-bar { background: #1B1E26; height: 13px; }
.tp-terminal .tp-bar i { width: 5px; height: 5px; border-radius: 50%; background: #FF5F57; } .tp-terminal .tp-bar i + i { background: #FEBC2E; } .tp-terminal .tp-bar i + i + i { background: #28C840; }
.tp-terminal .tp-t { background: #3A3F4C; margin-left: 9px; } .tp-terminal .tp-t.u { background: var(--c); width: 50%; }
.tp-drawer .tp-page { position: absolute; inset: 10px 44% 10px 10px; border-radius: var(--r-xs); background: repeating-linear-gradient(180deg, #DADDE6 0 4px, transparent 4px 10px); opacity: .7; }
.tp-drawer .tp-card { inset: 0 0 0 auto; width: 42%; border-radius: 0; }
.tp-spotlight { background: #C9CCD6; }
.tp-spotlight .tp-card { inset: 12px 14% auto 14%; width: auto; height: 76px; border-radius: var(--r-sm); padding-top: 6px; }
.tp-spotlight .tp-in { margin: 0 7px 3px; height: 13px; box-shadow: inset 0 0 0 1.5px var(--c); }
.tp-thread .tp-bar { background: #FFFFFF; border-bottom: 1px solid var(--line); }
.tp-thread .tp-row { height: 12px; margin: 0 7px; position: relative; padding-left: 15px; }
.tp-thread .tp-row::before { content: ""; position: absolute; left: 0; top: 0; width: 11px; height: 11px; border-radius: var(--r-xs); background: var(--c); }
.tp-thread .tp-row.u::before { background: #D7D9E3; }
.tp-thread .tp-row::after { content: ""; display: block; height: 4px; width: 80%; margin-top: 4px; border-radius: var(--r-xs); background: #D7D9E3; }
.tp-bold .tp-card { border-radius: var(--r-xs); box-shadow: inset 0 0 0 2px var(--ink), 4px 4px 0 var(--ink); }
.tp-bold .tp-bar { border-bottom: 2px solid var(--ink); }
.tp-bold .tp-l { border-radius: var(--r-xs); box-shadow: inset 0 0 0 1.5px var(--ink); background: #FFFFFF; } .tp-bold .tp-l.u { background: var(--c); }
.tp-playful .tp-card { border-radius: var(--r-sm); }
.tp-playful .tp-bar { height: 22px; position: relative; overflow: visible; margin-bottom: 4px; }
.tp-playful .tp-bar::after { content: ""; position: absolute; left: 0; right: 0; top: 100%; height: 5px; background: radial-gradient(circle 4px at 50% 0, var(--c) 98%, transparent) 0 0 / 9px 5px repeat-x; }
.tp-playful .tp-dot { width: 13px; height: 13px; border-radius: 50%; background: #FFFFFF; }
.tp-playful .tp-l { height: 10px; border-radius: var(--r-xs); }
.tp-concierge .tp-bar { height: 44px; flex-direction: column; align-items: flex-start; justify-content: center; gap: 4px; }
.tp-concierge .tp-bar .tp-t { background: rgba(255, 255, 255, .85); margin: 0; height: 5px; width: 64%; } .tp-concierge .tp-bar .tp-t.s { width: 38%; }
.tp-concierge .tp-sheet { height: 15px; margin: -14px 7px 0; border-radius: var(--r-xs); background: #FFFFFF; box-shadow: 0 3px 9px -3px rgba(20, 20, 40, .3); position: relative; }
.tp-concierge .tp-sheet + .tp-sheet { margin-top: 3px; }
.d-theme.is-locked .tp { filter: grayscale(.6) opacity(.55); }
.d-design .d-ds-range { display: flex; align-items: center; gap: 10px; }
.d-design .d-ds-range b { min-width: 38px; text-align: right; font-family: var(--font-mono); font-size: .82rem; color: var(--muted); }
.d-design .d-ds-switch .switch { margin-top: 8px; }

.d-swatches { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.d-swatch { width: 30px; height: 30px; border-radius: var(--r-sm); border: 2px solid transparent; cursor: pointer; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .2); transition: transform .15s; }
.d-swatch:hover { transform: scale(1.1); }
.d-swatch.is-active { border-color: var(--text); }
.d-color-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.d-color-row .input { max-width: 130px; font-family: var(--font-mono); }

.d-starters { display: flex; flex-direction: column; gap: 8px; }
.d-starter { display: flex; gap: 6px; align-items: center; }
.d-starter .input { min-height: 40px; }
.d-starter .btn { flex: none; }
/* The avatar icon picker (window.OAIconPicker, also used by the team assistant's settings). */
.d-av-pick { display: flex; align-items: center; gap: 14px; min-height: 60px; }
.icp-search { position: relative; margin-bottom: 10px; }
.icp-search i { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--faint); pointer-events: none; }
.icp-search .input { padding-left: 40px; }
.icp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(42px, 1fr)); gap: 6px; max-height: 214px; overflow-y: auto; padding: 4px; margin: -4px;
            scrollbar-width: thin; }
.icp-ic { aspect-ratio: 1; min-width: 0; border-radius: var(--r-sm); border: 1px solid var(--border); background: var(--surface-2); color: var(--text-2); cursor: pointer;
          display: grid; place-items: center; font-size: 1.05rem; transition: transform .18s var(--ease), border-color .18s, background .18s, color .18s, box-shadow .18s; }
.icp-ic:hover { border-color: var(--border-strong); color: var(--text); transform: translateY(-1px); }
.icp-ic:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.icp-ic.is-active { background: var(--accent); color: #fff; border-color: transparent; box-shadow: 0 8px 20px -10px color-mix(in srgb, var(--accent) 80%, transparent); transform: scale(1.06); }
.icp-empty { padding: 10px 2px; }

/* Launcher position: a little screen with the eight places the button can sit (js/dashboard.js OAPositionPicker). */
.psp { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.psp-screen { width: 248px; border-radius: var(--r-sm); border: 1px solid var(--border); background: var(--surface-2); overflow: hidden; box-shadow: 0 14px 34px -22px rgba(0, 0, 0, .7); }
.psp-bar { height: 20px; display: flex; gap: 5px; align-items: center; padding: 0 9px; border-bottom: 1px solid var(--border); }
.psp-bar i { width: 7px; height: 7px; border-radius: 50%; background: var(--border-strong); }
.psp-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-template-rows: repeat(3, 46px); gap: 6px; padding: 8px; }
.psp-page { display: flex; flex-direction: column; justify-content: center; gap: 5px; padding: 0 6px; }
.psp-page span { height: 5px; border-radius: var(--r-xs); background: var(--border); }
.psp-page span.short { width: 60%; }
.psp-cell { display: grid; padding: 5px; border: 1px dashed var(--border); border-radius: var(--r-sm); background: transparent; cursor: pointer; transition: border-color .4s var(--ease-fade), background .2s; }
.psp-cell[data-pos^="top"] { align-items: start; } .psp-cell[data-pos^="middle"] { align-items: center; } .psp-cell[data-pos^="bottom"] { align-items: end; }
.psp-cell[data-pos$="left"] { justify-items: start; } .psp-cell[data-pos$="center"] { justify-items: center; } .psp-cell[data-pos$="right"] { justify-items: end; }
.psp-cell:hover { border-color: var(--border-strong); }
.psp-cell:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.psp-dot { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: var(--border); color: transparent; font-size: 10px; transition: all .3s cubic-bezier(.2, 1.4, .4, 1); }
.psp-cell:hover .psp-dot { background: var(--border-strong); }
.psp-cell.is-active { border-style: solid; border-color: color-mix(in srgb, var(--accent) 60%, transparent); background: color-mix(in srgb, var(--accent) 8%, transparent); }
.psp-cell.is-active .psp-dot { background: var(--accent); color: #fff; transform: scale(1.18); box-shadow: 0 6px 16px -6px color-mix(in srgb, var(--accent) 90%, transparent); }
.psp-now { font-weight: 600; color: var(--text); }
.psp-now i { color: var(--brand); margin-right: 4px; }

/* Launcher icon: any Font Awesome icon (OAIconBrowser). Reuses the .icp search and grid. */
.icb-now { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.icb-fab { width: 52px; height: 52px; border-radius: var(--r); flex: none; display: grid; place-items: center; color: #fff; font-size: 22px; box-shadow: 0 12px 26px -12px rgba(0, 0, 0, .7); }
.icb-now-t { flex: 1; min-width: 160px; display: flex; flex-direction: column; }
.icb-now-t b { text-transform: capitalize; color: var(--text); }
.icb-label { margin: 0 0 8px; }
.icb-grid { max-height: 262px; }
.icb-more { margin-top: 8px; }
/* ...or a person's photo (the "People" tab, filtered by gender). */
.icb-fab { overflow: hidden; }
.icb-fab img { width: 100%; height: 100%; object-fit: cover; display: block; }
.icb-tabs, .icb-gender { margin-bottom: 12px; }
.icb-gender { margin-bottom: 10px; }
.icb-photos { grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); gap: 8px; max-height: 300px; }
.icb-ph { padding: 0; overflow: hidden; background: var(--surface-3); }
.icb-ph img { width: 100%; height: 100%; object-fit: cover; display: block; }
.icb-ph.is-active { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--brand), 0 8px 20px -10px color-mix(in srgb, var(--accent) 80%, transparent); }
.icb-plabel:empty { display: none; }
.icb-plabel { margin-top: 8px; }

/* Under each answer: shown, or folded into pills (OAExtrasPicker). */
.xtp { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; }
.xtp-opt { display: flex; flex-direction: column; gap: 4px; padding: 14px; text-align: left; font: inherit; color: var(--text); cursor: pointer;
           border-radius: var(--r-sm); border: 1px solid var(--border); background: var(--surface-2); transition: border-color .4s var(--ease-fade), box-shadow .4s var(--ease-fade), transform .2s; }
.xtp-opt:hover { border-color: var(--border-strong); transform: translateY(-1px); }
.xtp-opt.is-active { border-color: color-mix(in srgb, var(--accent) 70%, transparent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 16%, transparent); }
.xtp-opt b { font-family: var(--font-display); }
.xtp-demo { display: flex; flex-direction: column; gap: 7px; min-height: 116px; margin-bottom: 8px; padding: 12px; border-radius: var(--r-sm); background: var(--surface); border: 1px solid var(--border); }
.xtp-bub { width: 86%; height: 30px; border-radius: var(--r-sm) var(--r-sm) var(--r-sm) var(--r-xs); background: var(--surface-2); border: 1px solid var(--border); }
.xtp-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; color: var(--faint); font-size: 11px; }
.xtp-chips { display: flex; flex-wrap: wrap; gap: 5px; }
.xtp-chips em, .xtp-pill { font-style: normal; font-size: 10.5px; padding: 3px 8px; border-radius: var(--r-xs); border: 1px solid var(--border); color: var(--muted); background: var(--surface-2); }
.xtp-pill { font-weight: 600; } .xtp-pill i { font-size: 8px; }
.xtp-opt.is-active .xtp-pill { border-color: color-mix(in srgb, var(--accent) 50%, transparent); color: var(--brand); }
@media (max-width: 640px) { .xtp { grid-template-columns: minmax(0, 1fr); } }
/* the on / off switches under it, and the presentation choice resting while both are off */
.xtp.is-off { opacity: .45; pointer-events: none; }
.xtp-switches { display: grid; gap: 12px; margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--border); }
.xtp-sw { align-items: flex-start; }
.xtp-sw em { display: flex; flex-direction: column; gap: 2px; font-style: normal; }
.xtp-sw b { color: var(--text); font-weight: 600; }
.xtp-sw small { color: var(--muted); font-size: .82rem; }
.xtp-none { margin: 0; }
.d-av i { font-size: .95em; }
.d-wave { color: var(--warning); display: inline-block; transform-origin: 70% 70%; animation: d-wave 2.4s ease-in-out 1s 2; }
@keyframes d-wave { 0%, 60%, 100% { transform: rotate(0); } 10%, 30% { transform: rotate(14deg); } 20% { transform: rotate(-8deg); } 40% { transform: rotate(-4deg); } 50% { transform: rotate(10deg); } }
.d-plat-ic { font-size: 18px; width: 18px; text-align: center; }
.d-fb.is-up { color: var(--success); } .d-fb.is-down { color: var(--danger); }


/* ---- BEHAVIOUR ----------------------------------------------------------------------------------------------------- */

.d-opts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.d-opts.is-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 900px) { .d-opts, .d-opts.is-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 480px) { .d-opts, .d-opts.is-3 { grid-template-columns: minmax(0, 1fr); } }
.d-opt { padding: 14px; border-radius: var(--r-sm); border: 1.5px solid var(--border); background: var(--surface-2); cursor: pointer; text-align: left; color: var(--text); font: inherit; transition: all .2s; }
.d-opt:hover { border-color: var(--border-strong); }
.d-opt.is-active { border-color: var(--brand); background: var(--accent-soft); box-shadow: none; }
.d-opt[disabled] { opacity: .5; cursor: not-allowed; }
.d-opt i { font-size: 1.15rem; color: var(--brand); }
.d-opt b { display: block; margin-top: 8px; font-size: .92rem; font-family: var(--font-display); }
.d-opt span { display: block; font-size: .78rem; color: var(--muted); margin-top: 3px; line-height: 1.45; }

/* A special option (lead capture "Smart", the sales agent): its own violet-to-pink colours, apart from the brand blue. */
.d-opt.is-special { --sp-1: #A78BFA; --sp-2: #F472B6; --sp-ink: #1A0B2E; position: relative;
                    border-color: color-mix(in srgb, var(--sp-1) 45%, var(--border));
                    background: linear-gradient(135deg, color-mix(in srgb, var(--sp-1) 12%, transparent), color-mix(in srgb, var(--sp-2) 10%, transparent)), var(--surface-2); }
[data-theme="light"] .d-opt.is-special { --sp-1: #7C3AED; --sp-2: #DB2777; --sp-ink: #fff; }
.d-opt.is-special:hover { border-color: var(--sp-1); }
.d-opt.is-special.is-active { border-color: var(--sp-1); box-shadow: 0 0 0 1px color-mix(in srgb, var(--sp-1) 45%, transparent), 0 10px 36px -10px color-mix(in srgb, var(--sp-2) 60%, transparent);
                              background: linear-gradient(135deg, color-mix(in srgb, var(--sp-1) 22%, transparent), color-mix(in srgb, var(--sp-2) 18%, transparent)), var(--surface-2); }
.d-opt.is-special i { color: var(--sp-1); }
.d-opt-tag { position: absolute; top: 10px; right: 10px; padding: 3px 8px; border-radius: 999px; background: linear-gradient(135deg, var(--sp-1), var(--sp-2)); color: var(--sp-ink);
             font: 700 .64rem/1 var(--font-display); font-style: normal; letter-spacing: .06em; text-transform: uppercase; }
.d-examples { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.d-examples .chip { font-size: .78rem; padding: 5px 11px; }


/* ---- INSTALL ------------------------------------------------------------------------------------------------------- */

.d-platforms { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.d-platform { display: inline-flex; align-items: center; gap: 9px; padding: 9px 14px; border-radius: var(--r-sm); border: 1px solid var(--border); background: var(--surface-2); color: var(--text-2);
              font: 600 .86rem var(--font-display); cursor: pointer; transition: all .2s; }

.d-platform.is-active { border-color: var(--brand); color: var(--text); background: var(--accent-soft); }
.d-steps-list { counter-reset: s; list-style: none; padding: 0; margin: 0; }
.d-steps-list li { counter-increment: s; position: relative; padding: 4px 0 16px 46px; color: var(--text-2); font-size: .93rem; }
.d-steps-list li::before { content: counter(s); position: absolute; left: 0; top: 0; width: 30px; height: 30px; border-radius: var(--r-sm); display: grid; place-items: center;
                           background: var(--accent); color: #fff; font: 800 .85rem var(--font-display); }
.d-steps-list li b { color: var(--text); }
/* JustAsk on the Install tab (js/dashboard.js tabInstall, previewJustAsk) */
.d-ip-card h3 .badge { margin-left: 6px; vertical-align: 2px; }
.d-ip-notes { list-style: none; padding: 0; margin: 14px 0 0; display: grid; gap: 10px; }
.d-ip-notes li { display: flex; gap: 12px; align-items: flex-start; color: var(--text-2); font-size: .9rem; line-height: 1.5; }
.d-ip-notes i { width: 18px; margin-top: 3px; text-align: center; color: var(--brand); flex: none; }
.d-ip-preview { min-height: 420px; max-height: 68vh; overflow: auto; padding: 18px; border-radius: var(--r); border: 1px dashed var(--border-strong); background: var(--surface-2); }
.d-install-status { display: flex; align-items: center; gap: 14px; padding: 18px; border-radius: var(--r); border: 1px solid var(--border); background: var(--surface-2); }
.d-install-status .big { width: 46px; height: 46px; border-radius: var(--r-sm); display: grid; place-items: center; font-size: 1.2rem; flex: none; background: var(--surface-3); color: var(--faint); }
.d-install-status.is-ok .big { background: rgba(34, 197, 94, .15); color: var(--success); }
.d-install-status.is-bad .big { background: rgba(245, 158, 11, .14); color: var(--warning); }


/* ---- CONVERSATIONS ------------------------------------------------------------------------------------------------- */

.conv-layout { display: grid; grid-template-columns: 380px minmax(0, 1fr); gap: 18px; align-items: start; }
@media (max-width: 1050px) { .conv-layout { grid-template-columns: minmax(0, 1fr); } }
.conv-tools { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.conv-tools .input { max-width: 280px; min-height: 38px; }
.conv-list { max-height: 70vh; overflow-y: auto; }
.conv-item { display: block; width: 100%; text-align: left; padding: 14px 16px; border: 0; border-bottom: 1px solid var(--border); background: none; color: inherit; cursor: pointer; font: inherit; transition: background .15s; }
.conv-item:hover { background: var(--surface-2); }
.conv-item.is-active { background: var(--accent-soft); box-shadow: inset 3px 0 0 var(--brand); }
.conv-item .row-between { font-size: .76rem; color: var(--faint); }
.conv-item p { margin: 5px 0 6px; font-size: .9rem; color: var(--text); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.conv-item .row { gap: 6px; flex-wrap: wrap; }
.conv-pager { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 16px; font-size: .84rem; color: var(--muted); }
.transcript { position: sticky; top: calc(var(--nav-h) + 70px); }
.transcript-body { padding: 20px; max-height: 66vh; overflow-y: auto; display: flex; flex-direction: column; gap: 12px; }
.d-msg { display: flex; flex-direction: column; max-width: 82%; }
.d-msg.is-user { align-self: flex-end; align-items: flex-end; }
.d-msg .bub { padding: 11px 15px; border-radius: var(--r); font-size: .92rem; line-height: 1.55; background: var(--surface-2); border: 1px solid var(--border); color: var(--text); word-wrap: break-word; }
.d-msg.is-user .bub { background: var(--accent); color: #fff; border-color: transparent; border-bottom-right-radius: var(--r-xs); }
.d-msg.is-user .bub a { color: #fff; }
.d-msg.is-bot .bub { border-bottom-left-radius: var(--r-xs); }
.d-msg .meta { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: .72rem; color: var(--faint); margin-top: 5px; }
.d-msg .meta .badge { font-size: .66rem; padding: 1px 7px; }
.d-src { display: inline-flex; align-items: center; gap: 5px; font-size: .72rem; padding: 3px 9px; border-radius: var(--r-xs); background: var(--surface-3); color: var(--text-2); border: 1px solid var(--border); max-width: 240px; }
.d-src span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.d-lead-card { padding: 14px 16px; border-radius: var(--r-sm); background: rgba(34, 197, 94, .08); border: 1px solid rgba(34, 197, 94, .25); font-size: .88rem; }


/* ---- GAPS ---------------------------------------------------------------------------------------------------------- */

.d-gap { padding: 18px 20px; }
.d-gap-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.d-gap-q { font-weight: 700; color: var(--text); font-size: 1rem; }
.d-gap-q::first-letter { text-transform: uppercase; }
.d-gap-count { flex: none; text-align: center; min-width: 64px; padding: 8px 10px; border-radius: var(--r-sm); background: rgba(245, 158, 11, .1); border: 1px solid rgba(245, 158, 11, .25); }
.d-gap-count b { display: block; font-family: var(--font-display); font-size: 1.3rem; color: var(--warning); line-height: 1; }
.d-gap-count span { font-size: .68rem; color: var(--muted); }
.d-gap-reply { margin-top: 10px; padding: 10px 14px; border-left: 3px solid var(--border-strong); font-size: .86rem; color: var(--muted); }
.d-gap-editor { margin-top: 14px; }


/* ---- PLAYGROUND ---------------------------------------------------------------------------------------------------- */

.pg { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 18px; align-items: start; }
@media (max-width: 1150px) { .pg { grid-template-columns: minmax(0, 1fr); } }
.pg-chat { display: flex; flex-direction: column; height: 70vh; min-height: 520px; overflow: hidden; }
.pg-head { display: flex; align-items: center; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--border); }
.pg-head b { display: block; font-family: var(--font-display); }
.pg-head span { font-size: .78rem; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.pg-head .d-av { display: grid; font-size: .95rem; color: #fff; gap: 0; }
.pg-msgs { flex: 1; overflow-y: auto; padding: 22px 20px; display: flex; flex-direction: column; gap: 14px; scroll-behavior: smooth; }
.pg-msgs .d-msg { max-width: 86%; }
.pg-msgs .d-msg .bub { font-size: .95rem; }
.pg-cursor { display: inline-block; width: 7px; height: 1.05em; margin-left: 2px; vertical-align: -2px; border-radius: var(--r-xs); background: var(--brand); animation: pulse 1s infinite; }
.pg-typing { display: inline-flex; gap: 4px; padding: 4px 2px; }
.pg-typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); animation: pg-dot 1.2s infinite; }
.pg-typing i:nth-child(2) { animation-delay: .15s; } .pg-typing i:nth-child(3) { animation-delay: .3s; }
@keyframes pg-dot { 0%, 80%, 100% { transform: translateY(0); opacity: .4; } 40% { transform: translateY(-5px); opacity: 1; } }
.pg-suggest { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.pg-suggest .chip { font-size: .8rem; padding: 6px 12px; }
.pg-input { display: flex; gap: 10px; padding: 14px; border-top: 1px solid var(--border); }
.pg-input .input { min-height: 46px; }
.pg-welcome { margin: auto; text-align: center; max-width: 420px; color: var(--muted); }
.pg-welcome .d-av { margin: 0 auto 12px; }
.pg-welcome h3 { color: var(--text); margin-bottom: 6px; }
.pg-hood { position: sticky; top: calc(var(--nav-h) + 70px); }
.pg-hood-body { padding: 16px 18px; max-height: 64vh; overflow-y: auto; }
.pg-stat { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-bottom: 16px; }
.pg-stat div { padding: 10px; border-radius: var(--r-sm); background: var(--surface-2); border: 1px solid var(--border); text-align: center; }
.pg-stat b { display: block; font-family: var(--font-display); font-variant-numeric: tabular-nums; }
.pg-stat span { font-size: .7rem; color: var(--muted); }
.pg-hit { padding: 12px 0; border-bottom: 1px solid var(--border); }
.pg-hit:last-child { border-bottom: 0; }
.pg-hit .row-between { font-size: .8rem; }
.pg-hit b { font-size: .84rem; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pg-hit p { font-size: .78rem; color: var(--muted); margin: 6px 0 0; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.pg-score { height: 5px; border-radius: var(--r-xs); background: var(--surface-3); margin-top: 6px; overflow: hidden; }
.pg-score span { display: block; height: 100%; background: var(--accent); border-radius: inherit; }


/* ---- ADMIN --------------------------------------------------------------------------------------------------------- */

.d-admin-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
@media (max-width: 1000px) { .d-admin-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.d-admin-kpis .kpi.is-hero { background: var(--accent); color: #fff; border-color: transparent; box-shadow: none; }
.d-admin-kpis .kpi.is-hero .kpi-label, .d-admin-kpis .kpi.is-hero .kpi-sub { color: rgba(255, 255, 255, .85); }

/* ---- AI usage & costs (admin): the three billed series, stepped for each theme and validated as a set (CVD-safe
   all-pairs; light aqua sits under 3:1 on white, so the chart always offers its table view) ---------------------------- */
.ai-usage { --ai-s1: #3987E5; --ai-s2: #D95926; --ai-s3: #199E70; }
[data-theme="light"] .ai-usage { --ai-s1: #2A78D6; --ai-s2: #EB6834; --ai-s3: #1BAF7A; }
.ai-usage .d-admin-kpis .kpi-value { font-size: 1.6rem; font-variant-numeric: tabular-nums; }
.ai-chart-card { padding-top: 6px; }
.ai-chart-card .d-chart-legend { flex-wrap: wrap; row-gap: 6px; }
.ai-chart-wrap { position: relative; height: 280px; }
.ai-day-table { max-height: 340px; overflow-y: auto; }
.ai-usage [data-ai-table][aria-pressed="true"] { color: var(--brand); border-color: var(--brand); }
.ai-h { font-size: .95rem; margin: 0 0 10px; }
.ai-h.mt-3 { margin-top: 32px; }
.ai-key { display: inline-block; width: 10px; height: 10px; border-radius: var(--r-xs); margin-right: 8px; vertical-align: -1px; }
.ai-total td { font-weight: 700; color: var(--text); border-top: 1px solid var(--border-strong); }
.ai-answer { align-self: start; }
.ai-answer .kpi-value { font-size: 1.8rem; margin: 6px 0; font-variant-numeric: tabular-nums; }
.ai-usage .table td.num, .ai-usage .table th.num { text-align: right; font-variant-numeric: tabular-nums; }
.d-planbars { display: flex; flex-direction: column; gap: 14px; }
.d-planbars .row-between { font-size: .9rem; margin-bottom: 4px; }


/* ---- THE AI-MATCHED BRAND THEME ------------------------------------------------------------------------------------
   The first theme card when the build matched a palette to the customer's website. Its mini preview is painted from
   the palette (--b-* set inline by dashboard.js), and selecting it opens the palette editor below the cards. */

.d-theme-brand { background: linear-gradient(var(--surface-2), var(--surface-2)) padding-box, var(--accent) border-box; border-color: transparent; }
.d-theme-brand.is-active { box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent) 35%, transparent); }
.d-ai-tag { position: absolute; top: 16px; right: 16px; z-index: 2; display: inline-flex; align-items: center; gap: 5px; padding: 3px 8px; border-radius: var(--r-xs);
            font-size: .68rem; font-weight: 700; letter-spacing: .02em; color: #fff; background: var(--accent); box-shadow: 0 4px 14px -6px color-mix(in srgb, var(--accent) 80%, transparent); }
.tm-brand { background: var(--b-bg); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .06); }
.tm-brand .tm-h { background: var(--b-head); }
.tm-brand .tm-h i { background: var(--b-head-text); opacity: .9; }
.tm-brand .tm-h b { background: var(--b-head-text); opacity: .8; }
.tm-brand .tm-m { background: color-mix(in srgb, var(--b-text) 10%, var(--b-bg)); }
.tm-brand .tm-m.u { background: linear-gradient(110deg, var(--b-accent), var(--b-accent2)); }
.d-brand-dots { display: flex; gap: 4px; margin-top: 7px; }
.d-brand-dots i { width: 14px; height: 14px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .15), 0 0 0 1.5px var(--surface-2); }

.d-brand-panel { margin-top: 16px; padding: 16px; border-radius: var(--r-sm); border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent); background: var(--accent-soft); animation: page-in .35s var(--ease) both; }
.d-base-select { width: auto; min-height: 36px; padding-top: 6px; padding-bottom: 6px; font-size: .88rem; }
.d-palette { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px 14px; }
.d-pal-field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.d-pal-field .label { margin: 0; }
.d-pal-input { display: flex; gap: 8px; }
.d-pal-input .input-color { width: 44px; min-width: 44px; height: 40px; }
.d-pal-input .input { min-height: 40px; font-family: var(--font-mono); font-size: .85rem; text-transform: uppercase; }
@media (max-width: 900px) { .d-palette { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 480px) { .d-palette { grid-template-columns: minmax(0, 1fr); } }


/* ---- TEAM: quick links and the member view ------------------------------------------------------------------------- */

.d-quick { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 18px; }
.d-quick.is-member { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.d-quick-card { position: relative; display: flex; align-items: flex-start; gap: 14px; padding: 18px 20px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--border);
                color: var(--text); transition: transform .25s var(--ease), border-color .4s var(--ease-fade), box-shadow .25s; overflow: hidden; }
.d-quick-card:hover { color: var(--text); transform: translateY(-3px); border-color: var(--border-strong); box-shadow: var(--shadow); }
.d-quick-card .qc-ico { width: 44px; height: 44px; flex: none; border-radius: var(--r-sm); display: grid; place-items: center; font-size: 1.15rem; color: #fff; background: var(--accent); box-shadow: none; }
.d-quick-card b { display: block; font-family: var(--font-display); font-size: 1rem; margin-bottom: 3px; }
.d-quick-card span { font-size: .85rem; color: var(--muted); line-height: 1.45; }
.d-quick-card .qc-go { position: absolute; right: 16px; top: 18px; color: var(--faint); transition: transform .25s var(--ease), color .25s; }
.d-quick-card:hover .qc-go { transform: translateX(3px); color: var(--brand); }
.d-quick.is-member .d-quick-card { padding: 26px 24px; }
.d-quick.is-member .qc-ico { width: 54px; height: 54px; font-size: 1.4rem; border-radius: var(--r); }
.d-quick.is-member .d-quick-card b { font-size: 1.15rem; }
@media (max-width: 900px) { .d-quick, .d-quick.is-member { grid-template-columns: minmax(0, 1fr); } }

.d-member-note { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-radius: var(--r-sm); background: var(--surface-2); border: 1px solid var(--border); color: var(--text-2); font-size: .9rem; }
.d-member-note i { color: var(--brand); }
.d-bot-card.is-readonly .d-bot-links { display: none; }
.d-bot-readonly { font-size: .8rem; color: var(--faint); display: flex; align-items: center; gap: 6px; margin-top: 12px; }

/* The member/admin split is known before the first paint (html.team-admin / html.team-member), so admin-only controls
   never flash on a member's screen. */
.team-member .team-admin-only { display: none !important; }

/* Playground letters fade in with core's .fs-ch; the bubble keeps its height steady while text arrives. */
.pg-text.fs-text { min-height: 1.6em; }

.show-team-member { display: none !important; }
.team-member .show-team-member { display: flex !important; }
.team-member .d-quick-sk { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.pg-meta-in { animation: page-in .45s var(--ease) both; }
.d-quick { margin-bottom: 18px; }
.d-theme-brand .d-theme-name { flex-direction: column; align-items: flex-start; gap: 1px; }
.d-theme-brand .tm { margin-top: 0; }
@media (max-width: 520px) { .d-savebar .d-dirty { font-size: .78rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 38vw; } }
.d-banner .confetti i { color: var(--accent-text); }


/* ---- LOOK & FEEL (window.OALookPicker): the shared avatar/button shape and the glass intensity ------------------------- */
.lkp { --lkp-accent: var(--brand); }
.lkp-shapes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-bottom: 20px; }
.lkp-shape { display: flex; flex-direction: column; gap: 3px; padding: 12px; text-align: left; font: inherit; color: var(--text); cursor: pointer;
             border-radius: var(--r-sm); border: 1px solid var(--border); background: var(--surface-2); transition: border-color .4s var(--ease-fade), box-shadow .4s var(--ease-fade), transform .25s var(--ease); }
.lkp-shape:hover { border-color: var(--border-strong); transform: translateY(-1px); }
.lkp-shape.is-active { border-color: color-mix(in srgb, var(--accent) 70%, transparent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 16%, transparent); }
.lkp-shape b { font-family: var(--font-display); font-size: .92rem; }
.lkp-demo { display: flex; align-items: center; gap: 8px; height: 46px; margin-bottom: 6px; padding: 0 8px; border-radius: var(--r-sm); background: var(--surface); border: 1px solid var(--border); }
.lkp-av, .lkp-fab { display: grid; place-items: center; color: #fff; font-style: normal; flex: none;
                    background: linear-gradient(135deg, var(--lkp-accent), color-mix(in srgb, var(--lkp-accent) 60%, var(--accent))); }
.lkp-av { width: 26px; height: 26px; font-size: .7rem; }
.lkp-fab { width: 32px; height: 32px; margin-left: auto; font-size: .8rem; box-shadow: 0 6px 14px -6px var(--lkp-accent); }
.lkp-line { flex: 1; height: 8px; border-radius: var(--r-xs); background: var(--border-strong); opacity: .7; max-width: 48px; }
.lkp-rounded .lkp-av, .lkp-rounded .lkp-fab { border-radius: var(--r); }
.lkp-square .lkp-av { border-radius: var(--r-xs); } .lkp-square .lkp-fab { border-radius: var(--r-xs); }
.lkp-circle .lkp-av, .lkp-circle .lkp-fab { border-radius: 50%; }
.lkp-hex .lkp-av, .lkp-hex .lkp-fab { border-radius: 0; clip-path: polygon(25% 3%, 75% 3%, 100% 50%, 75% 97%, 25% 97%, 0 50%); }

.lkp-glass-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.lkp-glass { display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 18px; align-items: center; }
.lkp-stage { --gp: 100%; --gb: 8px; --gbub: 100%; position: relative; height: 150px; border-radius: var(--r); overflow: hidden; isolation: isolate;
             background: linear-gradient(135deg, #F0F9FF, #E0F2FE); border: 1px solid var(--border); }
.lkp-blob { position: absolute; border-radius: 50%; filter: blur(2px); }
.lkp-blob.b1 { width: 90px; height: 90px; left: -14px; top: -10px; background: linear-gradient(135deg, var(--accent), var(--accent)); }
.lkp-blob.b2 { width: 70px; height: 70px; right: 6px; bottom: -14px; background: linear-gradient(135deg, #F472B6, #FB923C); }
.lkp-blob.b3 { width: 46px; height: 46px; right: 52px; top: 14px; background: #6366F1; }
.lkp-panel { position: absolute; inset: 14px 16px; border-radius: var(--r-sm); padding: 0 10px 10px; display: flex; flex-direction: column; gap: 6px; overflow: hidden;
             background: #fff; border: 1px solid rgba(15, 23, 42, .08); box-shadow: 0 12px 30px -14px rgba(15, 23, 42, .35); transition: background .4s var(--ease-fade), backdrop-filter .3s; }
.lkp-ph { height: 22px; margin: 0 -10px 2px; background: linear-gradient(135deg, var(--accent), var(--accent) 50%, var(--accent)); }
.lkp-bub { align-self: flex-start; max-width: 85%; padding: 5px 9px; border-radius: var(--r-sm) var(--r-sm) var(--r-sm) var(--r-xs); font-size: .7rem; line-height: 1.3; color: #0F172A; background: #F1F5F9; }
.lkp-bub.is-user { align-self: flex-end; border-radius: var(--r-sm) var(--r-sm) var(--r-xs) var(--r-sm); color: #fff; background: linear-gradient(135deg, var(--lkp-accent), var(--accent)); }
@supports (background: color-mix(in srgb, red 50%, blue)) {
    .lkp-stage.is-glass .lkp-panel { background: linear-gradient(155deg, rgba(255, 255, 255, .35), rgba(255, 255, 255, 0) 40%), color-mix(in srgb, #fff var(--gp), transparent);
                                     -webkit-backdrop-filter: blur(var(--gb)) saturate(1.8); backdrop-filter: blur(var(--gb)) saturate(1.8);
                                     border-color: rgba(255, 255, 255, .6); box-shadow: 0 12px 30px -14px rgba(15, 23, 42, .35), inset 0 1px 0 rgba(255, 255, 255, .8); }
    .lkp-stage.is-glass .lkp-bub:not(.is-user) { background: linear-gradient(rgba(241, 245, 249, .9), rgba(241, 245, 249, .9)), color-mix(in srgb, #fff var(--gbub), transparent); }
}
.lkp-range { width: 100%; height: 6px; margin: 8px 0 4px; -webkit-appearance: none; appearance: none; border-radius: var(--r-xs); cursor: pointer;
             background: linear-gradient(90deg, var(--accent) var(--p, 0%), var(--surface-3) var(--p, 0%)); }
/* the handle: a white round knob ringed in the accent */
.lkp-range::-webkit-slider-thumb { -webkit-appearance: none; width: 22px; height: 22px; border-radius: 50%; border: 0; background: #fff; box-shadow: 0 0 0 2px var(--accent), 0 2px 6px rgba(0, 0, 0, .2); }
.lkp-range::-moz-range-thumb { width: 22px; height: 22px; border-radius: 50%; border: 0; background: #fff; box-shadow: 0 0 0 2px var(--accent), 0 2px 6px rgba(0, 0, 0, .2); }
.lkp-ticks { display: flex; justify-content: space-between; margin-bottom: 8px; }
.lkp-ticks button { background: none; border: 0; padding: 4px 2px; font: 600 .78rem var(--font-display); color: var(--muted); cursor: pointer; }
.lkp-ticks button:hover { color: var(--brand); }
@media (max-width: 760px) { .lkp-shapes { grid-template-columns: minmax(0, 1fr); } .lkp-glass { grid-template-columns: minmax(0, 1fr); } }

/* ---- INSIGHTS & ROI, LEAD INTELLIGENCE, SMART NUDGES (js/insights.js) ---------------------------------------------- */

/* The return */
.in-hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: 0; overflow: hidden; }
.in-hero-main { padding: 28px 30px; background: var(--accent-soft); border-right: 1px solid var(--border); display: flex; flex-direction: column; justify-content: center; }
.in-hero-value { font-family: var(--font-display); font-size: clamp(2.4rem, 5vw, 3.6rem); font-weight: 800; letter-spacing: -0.04em; line-height: 1; color: var(--text); font-variant-numeric: tabular-nums; }
.in-hero-label { margin-top: 8px; color: var(--text-2); font-weight: 600; }
.in-hero-roi { margin-top: 16px; display: inline-flex; align-items: center; gap: 8px; align-self: flex-start; padding: 7px 12px; border-radius: var(--r-sm); background: var(--surface); border: 1px solid var(--border); font-size: .88rem; color: var(--text-2); }
.in-hero-roi i { color: var(--success); }
.in-hero-roi b { color: var(--text); }
.in-hero-lines { padding: 14px 22px; display: flex; flex-direction: column; justify-content: center; }
.in-line { display: flex; align-items: center; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--border); }
.in-line:last-child { border-bottom: 0; }
.in-line b { display: block; color: var(--text); font-size: .95rem; }
.in-line .grow span { display: block; font-size: .8rem; color: var(--muted); margin-top: 2px; }
.in-line-ic { width: 36px; height: 36px; flex: 0 0 36px; border-radius: var(--r-sm); display: grid; place-items: center; background: var(--accent-soft); color: var(--brand); }
.in-line-v { font-family: var(--font-display); font-weight: 800; font-size: 1.25rem; color: var(--text); font-variant-numeric: tabular-nums; white-space: nowrap; }
.in-line.is-cta .grow span { color: var(--text-2); }
.in-two { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.in-hours { display: grid; grid-template-columns: repeat(24, minmax(0, 1fr)); gap: 3px; height: 120px; align-items: end; }
.in-hour { height: 100%; display: flex; align-items: flex-end; border-radius: var(--r-xs); }
.in-hour.is-off { background: var(--surface-2); }
.in-hour span { display: block; width: 100%; background: var(--accent); border-radius: var(--r-xs) var(--r-xs) 0 0; min-height: 2px; }
.in-hour.is-off span { background: var(--brand-3, var(--brand)); opacity: .75; }
.in-hours-axis { display: flex; justify-content: space-between; font-size: .72rem; color: var(--faint); margin-top: 6px; }
.in-assume summary { cursor: pointer; list-style: none; }
.in-assume summary::-webkit-details-marker { display: none; }
.in-assume summary::before { content: "\25B8"; display: inline-block; width: 16px; color: var(--muted); transition: transform .2s; }
.in-assume[open] summary::before { transform: rotate(90deg); }

/* The analyst */
.in-working { display: flex; gap: 16px; align-items: center; }
.in-working > i { font-size: 1.6rem; color: var(--brand); }
.in-report { padding: 24px 26px; background: linear-gradient(var(--surface), var(--surface)) padding-box, var(--accent) border-box; border: 1px solid transparent; }
.in-headline { font-size: 1.3rem; line-height: 1.35; margin: 14px 0 8px; }
.in-summary { color: var(--text-2); margin-bottom: 16px; max-width: 900px; }
.in-sent { display: flex; height: 10px; border-radius: var(--r-sm); overflow: hidden; background: var(--surface-3); }
.in-sent span { display: block; height: 100%; }
.in-sent .is-pos, .in-sent-key i.is-pos { background: var(--success); }
.in-sent .is-neu, .in-sent-key i.is-neu { background: var(--surface-3); }
.in-sent .is-neg, .in-sent-key i.is-neg { background: var(--danger); }
.in-sent-key { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 8px; font-size: .8rem; color: var(--muted); }
.in-sent-key i { display: inline-block; width: 10px; height: 10px; border-radius: var(--r-xs); margin-right: 4px; vertical-align: -1px; border: 1px solid var(--border); }
.in-section { font-size: 1.05rem; margin: 26px 0 12px; display: flex; align-items: center; gap: 8px; }
.in-section i, .in-h i { color: var(--brand); }
.in-h { font-size: 1rem; margin-bottom: 12px; display: flex; align-items: center; gap: 8px; }
.in-opps { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.in-opp { padding: 18px; display: flex; flex-direction: column; }
.in-opp p { color: var(--text-2); margin: 8px 0 12px; flex: 1; }
.in-action { display: flex; gap: 8px; padding: 10px 12px; border-radius: var(--r-sm); background: var(--accent-soft); font-size: .85rem; color: var(--text-2); }
.in-action i { color: var(--brand); margin-top: 3px; }
.in-theme { padding: 12px 0; border-bottom: 1px solid var(--border); }
.in-theme:last-child { border-bottom: 0; padding-bottom: 0; }
.in-theme:first-of-type { padding-top: 0; }
.in-theme p { color: var(--text-2); margin-top: 8px; }
.in-ex { display: flex; flex-wrap: wrap; gap: 6px; }
.in-ex span { font-size: .78rem; color: var(--muted); font-style: italic; background: var(--surface-2); border-radius: var(--r-sm); padding: 3px 8px; }
.in-row { display: flex; gap: 12px; align-items: flex-start; padding: 10px 0; border-bottom: 1px solid var(--border); }
.in-row:last-child { border-bottom: 0; padding-bottom: 0; }
.in-row b { display: block; color: var(--text); font-size: .92rem; }
.in-row .grow > span { display: block; font-size: .84rem; color: var(--text-2); margin-top: 2px; }
.in-row .in-fix { color: var(--success) !important; }
.in-faq.is-done b { color: var(--muted); }
@media (max-width: 1000px) { .in-hero, .in-two { grid-template-columns: minmax(0, 1fr); } .in-hero-main { border-right: 0; border-bottom: 1px solid var(--border); } }

/* Lead intelligence */
.lai-chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: var(--r-sm); font-size: .78rem; font-weight: 700; white-space: nowrap; border: 1px solid transparent; }
.lai-chip b { font-variant-numeric: tabular-nums; }
.lai-chip.is-pending { color: var(--muted); background: var(--surface-2); border-color: var(--border); font-weight: 600; }
.lai-hot { color: var(--danger); background: rgba(244, 63, 94, .12); border-color: rgba(244, 63, 94, .28); --lai: var(--danger); }
.lai-warm { color: var(--warning); background: rgba(245, 158, 11, .12); border-color: rgba(245, 158, 11, .28); --lai: var(--warning); }
.lai-cold { color: var(--info); background: rgba(56, 189, 248, .12); border-color: rgba(56, 189, 248, .28); --lai: var(--info); }
.bk-state { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.lai-box { border: 1px solid var(--border); border-radius: var(--r); padding: 16px 18px; background: var(--surface-2); }
.lai-box.is-locked, .lai-box.is-empty { display: flex; gap: 14px; align-items: center; }
.lai-box.is-locked > i { font-size: 1.4rem; color: var(--brand); }
.lai-empty-ic { width: 42px; height: 42px; flex: 0 0 42px; border-radius: var(--r-sm); display: grid; place-items: center; background: var(--accent-soft); color: var(--brand); font-size: 1.1rem; }
.lai-top { display: flex; gap: 16px; align-items: center; }
.lai-ring { --p: 0; width: 66px; height: 66px; flex: 0 0 66px; border-radius: 50%; display: grid; place-content: center; text-align: center; border: 0;
    background: radial-gradient(closest-side, var(--surface-2) 78%, transparent 80% 100%), conic-gradient(var(--lai) calc(var(--p) * 1%), var(--surface-3) 0); }
.lai-ring b { font-family: var(--font-display); font-size: 1.3rem; line-height: 1; color: var(--text); }
.lai-ring span { font-size: .62rem; color: var(--muted); }
.lai-intent { margin-top: 8px; font-weight: 600; color: var(--text); line-height: 1.4; }
.lai-next { display: flex; gap: 10px; margin-top: 14px; padding: 11px 13px; border-radius: var(--r-sm); background: var(--accent-soft); color: var(--text); font-size: .9rem; }
.lai-next > i { color: var(--brand); margin-top: 3px; }
.lai-next span { display: block; font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-bottom: 2px; }
.lai-signals { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.lai-signals .chip { padding: 4px 10px; font-size: .78rem; cursor: default; }
.lai-follow { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--border); }
.lai-seg button { padding: 5px 12px; font-size: .8rem; }
@media (max-width: 560px) { .lai-top { flex-wrap: wrap; } }

/* Smart nudges */
.nd-list { display: flex; flex-direction: column; gap: 8px; max-height: 520px; overflow: auto; padding-right: 4px; }
.nd-row { display: grid; grid-template-columns: minmax(150px, .7fr) minmax(0, 2fr) auto; gap: 12px; align-items: start; padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--r-sm); background: var(--surface-2); }
.nd-page { font-size: .82rem; color: var(--muted); padding-top: 8px; min-width: 0; }
.nd-page code { color: var(--text); word-break: break-all; }
.nd-page span { display: block; margin-top: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nd-page .badge { display: inline-flex; margin-top: 5px; }
.nd-fields { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.nd-bubble .input { border-radius: 14px 14px 14px var(--r-sm); font-weight: 600; }
.nd-q { display: flex; gap: 8px; align-items: center; }
.nd-q > i { color: var(--muted); }
.nd-q .input { font-size: .86rem; min-height: 36px; }
@media (max-width: 760px) { .nd-row { grid-template-columns: minmax(0, 1fr) auto; } .nd-page { grid-column: 1 / -1; padding-top: 0; } }
