/* ============================================================================
   Reelty account area — auth, forms, dashboards, CRM, plans, assistant
   ========================================================================== */

.field--area { height: auto; align-items: stretch; padding: 12px 14px; }
.field--area textarea { width: 100%; background: none; border: none; outline: none; color: var(--text); font-family: inherit; font-size: .95rem; resize: vertical; }
.container--narrow { max-width: 760px; }

.alert { padding: 13px 16px; border-radius: 12px; margin-bottom: 18px; font-size: .92rem; font-weight: 500; border: 1px solid transparent; }
.alert--error { background: rgba(255,92,108,.12); border-color: rgba(255,92,108,.35); color: #ff8a98; }
.alert--ok { background: rgba(67,230,160,.12); border-color: rgba(67,230,160,.35); color: #6fe9b6; }
.alert--info { background: rgba(109,94,252,.12); border-color: rgba(109,94,252,.35); color: #b3a8ff; }

.linkbtn { color: var(--muted); font-size: .86rem; text-decoration: underline; }
.linkbtn:hover { color: var(--text); }

/* ── Auth ─────────────────────────────────────────────────────────────────── */
.auth { position: relative; min-height: 86vh; display: grid; place-items: center; padding: 60px 20px; overflow: hidden; }
.auth__glow { position: absolute; width: 600px; height: 600px; border-radius: 50%; background: rgba(109,94,252,.3); filter: blur(120px); top: -160px; }
.auth__card { position: relative; width: 100%; max-width: 420px; padding: 34px; border-radius: var(--radius-lg); background: var(--glass); backdrop-filter: blur(20px); border: 1px solid var(--line-2); box-shadow: var(--shadow); }
.auth__brand { margin-bottom: 22px; }
.auth__title { font-size: 1.7rem; font-weight: 800; margin-bottom: 8px; }
.auth__sub { color: var(--muted); font-size: .95rem; margin-bottom: 22px; }
.auth__form { display: grid; gap: 6px; }
.auth__label { font-size: .82rem; font-weight: 600; color: var(--muted); margin-top: 12px; }
.auth__form .field, .bigform .field, .vform .field, .modal .field { height: 50px; }
.auth__form .field input { width: 100%; }
.phonerow { display: flex; gap: 10px; align-items: stretch; }
.phonerow__cc { flex: 0 1 132px; min-width: 0; padding: 0 10px; }
.phonerow__cc select { width: 100%; min-width: 0; text-overflow: ellipsis; }
.phonerow__num { flex: 1 1 auto; min-width: 0; }
@media (max-width: 360px) { .phonerow__cc { flex-basis: 104px; } }
.auth__submit { width: 100%; justify-content: center; margin-top: 20px; height: 50px; }
.auth__hint { color: var(--muted-2); font-size: .82rem; margin-top: 8px; }
.auth__hint strong { color: var(--brand-2); }
.auth__resend { text-align: center; margin-top: 14px; }
.auth__foot { text-align: center; color: var(--muted-2); font-size: .8rem; margin-top: 20px; }
.auth__foot a { color: var(--brand-2); }
.otp-input { letter-spacing: .5em; text-align: center; font-size: 1.3rem !important; font-weight: 700; }

.seg { display: flex; gap: 8px; margin-top: 6px; }
.seg__opt { flex: 1; }
.seg__opt input { position: absolute; opacity: 0; }
.seg__opt span { display: block; text-align: center; padding: 12px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line-2); color: var(--muted); font-weight: 600; cursor: pointer; transition: .2s; }
.seg__opt input:checked + span { background: var(--grad-soft); border-color: var(--brand-2); color: var(--brand-2); }

/* Username availability + derived suggestions (registration step) */
.usugg__status { margin-top: 6px; }
.usugg__status--ok { color: #3ddc84; }
.usugg__status--bad { color: #ff8a98; }
.usugg { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.usugg[hidden] { display: none; }
.usugg__chip { padding: 7px 12px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line-2); color: var(--text); font-size: .82rem; font-weight: 600; cursor: pointer; transition: .2s; }
.usugg__chip:hover { border-color: var(--brand-2); color: var(--brand-2); }

/* Full-width select that stays within its container even with long option labels
   (e.g. the "I am a…" user-type dropdown showing BUILDER/DEVELOPER). */
.field--block { overflow: hidden; }
.field--select.field--block select { flex: 1; width: 100%; min-width: 0; max-width: 100%; text-overflow: ellipsis; }

/* ── Generic form page ────────────────────────────────────────────────────── */
.formpage { padding: 50px 0 80px; }
.formpage__inner { max-width: 560px; }
.formpage__title { font-size: 1.9rem; font-weight: 800; margin-bottom: 24px; }
.bigform { display: grid; gap: 6px; }
.bigform__actions { display: flex; gap: 12px; margin-top: 22px; }

/* ── Dashboard shell ──────────────────────────────────────────────────────── */
.dash { padding: 46px 0 80px; }
.dash__head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 28px; }
.dash__title { font-size: clamp(1.8rem, 4vw, 2.6rem); font-weight: 800; }
.dash__sub { color: var(--muted); margin-top: 6px; max-width: 40em; }
.dash__credits { text-align: right; display: grid; gap: 2px; }
.dash__credits-n { font-family: var(--display); font-size: 1.8rem; font-weight: 800; color: var(--brand-2); }
.dash__credits-l { color: var(--muted-2); font-size: .8rem; }
.dash__credits .btn { margin-top: 6px; }

/* tabs */
.tabs { display: flex; gap: 6px; border-bottom: 1px solid var(--line); margin-bottom: 26px; overflow-x: auto; }
.tab { padding: 12px 16px; color: var(--muted); font-weight: 600; font-size: .92rem; border-bottom: 2px solid transparent; white-space: nowrap; }
.tab:hover { color: var(--text); }
.tab.is-active { color: var(--text); border-bottom-color: var(--brand-2); }
.tabpanel { display: none; }
.tabpanel.is-active { display: block; animation: fadeUp .4s var(--ease); }
@keyframes fadeUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* statcards */
.statcards { display: grid; grid-template-columns: repeat(7, 1fr); gap: 12px; margin-bottom: 26px; }
.statcard { padding: 18px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); }
.statcard__n { display: block; font-family: var(--display); font-size: 1.6rem; font-weight: 800; }
.statcard__l { color: var(--muted-2); font-size: .78rem; }
.statcard--hot { border-color: rgba(255,92,108,.35); }
.statcard--hot .statcard__n { color: #ff7a88; }
.statcard--warm { border-color: rgba(255,176,77,.3); }
.statcard--warm .statcard__n { color: #ffc266; }
.statcard--cold { border-color: rgba(99,179,255,.3); }
.statcard--cold .statcard__n { color: #8cc4ff; }
.statcard--wide { grid-column: span 2; }

/* ── CRM ──────────────────────────────────────────────────────────────────── */
.crm__grid { display: grid; grid-template-columns: 1fr 320px; gap: 22px; align-items: start; }
.crm__filters { display: flex; gap: 10px; margin-bottom: 16px; flex-wrap: wrap; }
.leadlist { display: grid; gap: 8px; }
.leadlist__empty { color: var(--muted); padding: 24px; text-align: center; }
.lead { display: grid; grid-template-columns: 44px 1.6fr 1.2fr auto auto; gap: 14px; align-items: center; padding: 12px 14px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); transition: .2s var(--ease); }
.lead:hover { border-color: var(--brand-2); transform: translateX(3px); }
.lead__avatar { width: 44px; height: 44px; border-radius: 50%; overflow: hidden; display: grid; place-items: center; background: var(--grad); color: #fff; font-weight: 700; }
.lead__avatar img { width: 100%; height: 100%; object-fit: cover; }
.lead__id { display: grid; gap: 2px; min-width: 0; }
.lead__id strong { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lead__id small { color: var(--muted-2); font-size: .78rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lead__prop { color: var(--muted); font-size: .85rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lead__chips { display: flex; gap: 6px; }
.lead__score { display: grid; gap: 3px; justify-items: end; }
.lead__scorebar { width: 70px; height: 6px; border-radius: 4px; background: var(--surface-2); overflow: hidden; }
.lead__scorebar span { display: block; height: 100%; background: var(--grad); }
.lead__score small { color: var(--muted-2); font-size: .72rem; }

.chip--hot { background: rgba(255,92,108,.16); border-color: rgba(255,92,108,.4); color: #ff8a98; }
.chip--warm { background: rgba(255,176,77,.16); border-color: rgba(255,176,77,.4); color: #ffc266; }
.chip--cold { background: rgba(99,179,255,.16); border-color: rgba(99,179,255,.4); color: #8cc4ff; }
.chip--stage { background: var(--surface-2); border-color: var(--line-2); color: var(--muted); }

.crm__side { display: grid; gap: 16px; }
.panel { padding: 20px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); }
.panel__title { font-size: 1rem; margin-bottom: 16px; }
.panel--link { display: block; color: var(--muted); font-weight: 600; transition: .2s; }
.panel--link:hover { color: var(--text); border-color: var(--brand-2); }
.panel__split { display: flex; gap: 18px; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }
.panel__n { display: block; font-family: var(--display); font-size: 1.2rem; font-weight: 800; }
.panel__l { color: var(--muted-2); font-size: .76rem; }

.bars { display: grid; gap: 10px; }
.bar { display: grid; grid-template-columns: 92px 1fr 30px; gap: 10px; align-items: center; font-size: .82rem; }
.bar__l { color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar__track { height: 8px; border-radius: 5px; background: var(--surface-2); overflow: hidden; }
.bar__track span { display: block; height: 100%; background: var(--grad); border-radius: 5px; transition: width .6s var(--ease); }
.bar__n { text-align: right; color: var(--muted); font-weight: 600; }

.autoform { display: grid; gap: 12px; }
.switch { display: flex; align-items: center; gap: 10px; font-size: .88rem; color: var(--muted); cursor: pointer; }
.switch input { width: 18px; height: 18px; accent-color: var(--brand); }

/* lead detail */
.leadhead { display: grid; grid-template-columns: 64px 1fr auto; gap: 16px; align-items: center; padding: 22px; border-radius: 20px; background: var(--surface); border: 1px solid var(--line); margin-bottom: 22px; }
.leadhead__avatar { width: 64px; height: 64px; border-radius: 50%; overflow: hidden; display: grid; place-items: center; background: var(--grad); color: #fff; font-weight: 800; font-size: 1.2rem; }
.leadhead__avatar img { width: 100%; height: 100%; object-fit: cover; }
.leadhead__id h1 { font-size: 1.5rem; display: flex; align-items: center; gap: 10px; }
.leadhead__id p { color: var(--muted); font-size: .9rem; margin-top: 4px; }
.leadhead__meta { color: var(--muted-2); font-size: .82rem; }
.leadhead__contact { text-align: right; display: grid; gap: 6px; justify-items: end; }
.leadhead__masked { color: var(--muted-2); font-size: .8rem; }
.contactbox { padding: 10px 16px; border-radius: 12px; background: var(--grad-soft); border: 1px solid var(--brand-2); text-align: center; }
.contactbox small { display: block; color: var(--muted); font-size: .72rem; }
.contactbox strong { font-size: 1.05rem; letter-spacing: .02em; }
.leaddetail { display: grid; gap: 16px; }
.stageflow { display: flex; flex-wrap: wrap; gap: 8px; }
.stagepill { padding: 9px 14px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line-2); color: var(--muted); font-weight: 600; font-size: .85rem; transition: .2s; }
.stagepill:hover { color: var(--text); }
.stagepill.is-active { background: var(--grad); border-color: transparent; color: #fff; }
.formmsg { color: #6fe9b6; font-size: .82rem; margin-left: 10px; }
.statusrow { display: flex; gap: 8px; }
.timeline { display: grid; gap: 4px; }
.tl { display: grid; grid-template-columns: 18px 1fr; gap: 12px; padding: 8px 0; }
.tl__dot { width: 10px; height: 10px; border-radius: 50%; background: var(--brand-2); margin-top: 5px; box-shadow: 0 0 0 4px rgba(177,92,255,.15); position: relative; }
.tl:not(:last-child) .tl__dot::after { content: ""; position: absolute; left: 50%; top: 14px; width: 2px; height: calc(100% + 8px); background: var(--line); transform: translateX(-50%); }
.tl__body strong { display: block; font-size: .9rem; }
.tl__body small { color: var(--muted-2); font-size: .78rem; }

/* ── Visits ───────────────────────────────────────────────────────────────── */
.vlist { display: grid; gap: 12px; }
.vcard { display: grid; grid-template-columns: 1fr auto; gap: 16px; align-items: center; padding: 18px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); }
.vcard__top { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.vcard__mode { color: var(--muted-2); font-size: .8rem; }
.vcard__title { font-family: var(--display); font-weight: 700; font-size: 1.05rem; }
.vcard__title:hover { color: var(--brand-2); }
.vcard__loc { color: var(--muted); font-size: .85rem; margin-top: 2px; }
.vcard__meta { display: flex; flex-wrap: wrap; gap: 12px; color: var(--muted-2); font-size: .8rem; margin-top: 8px; }
.vcard__note { color: var(--muted); font-size: .85rem; margin-top: 8px; font-style: italic; }
.vcard__actions { display: flex; gap: 8px; flex-shrink: 0; flex-wrap: wrap; align-items: center; }
.vcard__hint { color: var(--muted-2); font-size: .8rem; align-self: center; }
.vcard__slot { font: inherit; padding: 6px 8px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: inherit; }
.vcard__manage { grid-column: 1 / -1; margin-top: 6px; border-top: 1px solid var(--line); padding-top: 10px; }
.vcard__manage > summary { cursor: pointer; color: var(--muted); font-size: .85rem; list-style: none; }
.vcard__manage > summary::-webkit-details-marker { display: none; }
.vcard__manage-body { display: flex; flex-direction: column; gap: 10px; margin-top: 10px; }
.vcard__flags { display: flex; flex-wrap: wrap; gap: 8px; }
.vcard__feedback { display: flex; flex-direction: column; gap: 8px; }
.vcard__feedback-label { display: flex; flex-direction: column; gap: 4px; font-size: .85rem; color: var(--muted); }
.vcard__feedback select, .vcard__feedback textarea { font: inherit; padding: 6px 8px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: inherit; }
.vcard__feedback textarea { min-height: 56px; resize: vertical; }
.vbadge { padding: 5px 12px; border-radius: 999px; font-size: .76rem; font-weight: 700; }
.vbadge--ok { background: rgba(67,230,160,.14); color: #6fe9b6; }
.vbadge--warn { background: rgba(255,176,77,.14); color: #ffc266; }
.vbadge--error { background: rgba(255,92,108,.14); color: #ff8a98; }
.vbadge--muted { background: var(--surface-2); color: var(--muted); }
.vbadge--info { background: rgba(109,94,252,.14); color: #b3a8ff; }

/* ── Profile ──────────────────────────────────────────────────────────────── */
.profile { padding-bottom: 70px; }
.profile__cover { height: 180px; background: linear-gradient(120deg, rgba(109,94,252,.4), rgba(255,92,168,.3)); position: relative; }
.profile__cover::after { content: ""; position: absolute; inset: 0; background: radial-gradient(600px 200px at 30% 0%, rgba(255,255,255,.12), transparent); }
.profile__head { display: grid; grid-template-columns: auto 1fr auto; gap: 22px; align-items: end; margin-top: -56px; margin-bottom: 30px; }
.profile__avatar { width: 116px; height: 116px; border-radius: 30px; overflow: hidden; display: grid; place-items: center; background: var(--grad); color: #fff; font-family: var(--display); font-size: 2.6rem; font-weight: 800; border: 4px solid var(--bg); box-shadow: var(--shadow); }
.profile__avatar img { width: 100%; height: 100%; object-fit: cover; }
.profile__name { font-size: 1.7rem; display: flex; align-items: center; gap: 10px; }
.verified { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--brand); color: #fff; font-size: .75rem; }
.profile__handle { color: var(--muted); margin-top: 4px; }
.profile__handle .dot { margin: 0 4px; }
.profile__bio { color: var(--muted); margin-top: 10px; max-width: 40em; }
.profile__stats { display: flex; gap: 22px; margin-top: 14px; color: var(--muted); font-size: .9rem; }
.profile__stats strong { color: var(--text); }
.profile__actions { display: flex; gap: 10px; }
.vpanel { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.vpanel__status h3 { margin-bottom: 12px; }
.vpanel__note { color: var(--muted); font-size: .85rem; margin-top: 10px; }
.avatarpick { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-top: 4px; }
.avatarpick__preview { width: 84px; height: 84px; border-radius: 22px; overflow: hidden; flex-shrink: 0; display: grid; place-items: center; background: var(--grad); border: 1px solid var(--line-2); }
.avatarpick__preview img { width: 100%; height: 100%; object-fit: cover; }
.avatarpick__actions { display: flex; gap: 8px; flex-wrap: wrap; }

.vform { display: grid; gap: 6px; padding: 20px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); }
.vform__intro { color: var(--muted); font-size: .88rem; margin-bottom: 8px; }
.vform .btn { margin-top: 14px; }

/* ── Plans ────────────────────────────────────────────────────────────────── */
.plans { position: relative; padding: 56px 0 90px; overflow: hidden; }
.plans__glow {
    position: absolute; top: -180px; left: 50%; transform: translateX(-50%);
    width: 720px; height: 480px; border-radius: 50%;
    background: radial-gradient(closest-side, rgba(109,94,252,.18), rgba(139,61,240,.10) 55%, transparent);
    pointer-events: none; filter: blur(10px);
    animation: plansGlow 9s ease-in-out infinite alternate;
}
@keyframes plansGlow {
    from { transform: translateX(-56%) scale(1); opacity: .8; }
    to { transform: translateX(-44%) scale(1.12); opacity: 1; }
}

/* Compact left-aligned header instead of the old tall centered hero. */
.bhead { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; flex-wrap: wrap; margin-bottom: 24px; }
.bhead__title { font-size: clamp(1.6rem, 3.5vw, 2.2rem); font-weight: 800; letter-spacing: -.02em; margin-top: 6px; }
.bhead__grad { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.bhead__sub { color: var(--muted); margin-top: 6px; max-width: 44em; font-size: .92rem; }
.bhead__side { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.bhead__chip {
    display: inline-flex; align-items: center; gap: 6px; padding: 6px 14px;
    border-radius: 999px; font-size: .8rem; font-weight: 600;
    background: var(--surface); border: 1px solid var(--line-2); color: var(--muted);
}
.bhead__chip strong { color: var(--text); }
.bhead__chip--guest { border-style: dashed; }

/* Console: sticky category rail on the left, one visible panel on the right,
   so every plan of the selected category fits in a single view. */
.bconsole { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 22px; align-items: start; }
.bnav { display: grid; gap: 6px; position: sticky; top: 90px; padding: 10px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); }
.bnav__item {
    display: flex; align-items: center; gap: 11px; width: 100%; padding: 10px 12px;
    border-radius: 12px; background: none; border: 1px solid transparent;
    color: var(--text); text-align: left; cursor: pointer; font: inherit;
    transition: background .2s, border-color .2s;
}
.bnav__item:hover { background: var(--soft); }
.bnav__item.is-active { background: var(--grad-soft); border-color: var(--brand-2); }
.bnav__ico { flex: none; width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px; background: var(--grad-soft); font-size: .95rem; }
.bnav__txt { flex: 1; min-width: 0; display: grid; }
.bnav__txt strong { font-size: .88rem; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bnav__txt small { color: var(--muted-2); font-size: .72rem; margin-top: 1px; }
.bnav__dot { flex: none; width: 9px; height: 9px; border-radius: 50%; background: #43e6a0; box-shadow: 0 0 0 3px rgba(67,230,160,.18); }

.bpanel__head { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.bpanel__ico { flex: none; width: 42px; height: 42px; display: grid; place-items: center; border-radius: 13px; background: var(--grad-soft); font-size: 1.15rem; }
.bpanel__titles { flex: 1; min-width: 0; }
.bpanel__head h2 { font-size: 1.25rem; }
.bpanel__blurb { color: var(--muted-2); font-size: .86rem; margin-top: 2px; }
.bpanel__units { color: var(--muted); font-size: .85rem; margin: -4px 0 14px; display: flex; gap: 16px; flex-wrap: wrap; }

@media (max-width: 860px) {
    .bconsole { grid-template-columns: 1fr; gap: 14px; }
    .bnav { position: static; display: flex; overflow-x: auto; padding: 8px; }
    .bnav__item { flex: 0 0 auto; width: auto; }
    .bnav__txt small { display: none; }
}
/* Compact wrap grid: fit as many cards per row as the space allows so all
   plans stay in one view; rows wrap only once the row is actually full. */
.plangrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 12px; }

.plan {
    display: flex; flex-direction: column; padding: 18px 16px 16px;
    border-radius: 16px; background: var(--surface); border: 1px solid var(--line);
    transition: transform .35s var(--ease), border-color .25s, box-shadow .35s var(--ease);
}
/* Staggered entrance replays each time a panel is shown: plans.js re-adds
   .is-shown on every tab switch; each card sets --i inline. */
.bpanel.is-shown .plan { animation: planIn .5s var(--ease) backwards; animation-delay: calc(var(--i, 0) * 60ms); }
@keyframes planIn { from { opacity: 0; transform: translateY(18px) scale(.98); } }
@media (prefers-reduced-motion: reduce) {
    .plans__glow, .bpanel.is-shown .plan { animation: none; }
}
.plan:hover { transform: translateY(-6px); border-color: var(--brand-2); box-shadow: 0 18px 48px rgba(109,94,252,.16); }
.plan__name { font-size: .98rem; font-weight: 700; margin-bottom: 8px; }
/* Ribbons are absolutely positioned top-right; on ribboned cards push the
   name down so the two never overlap at narrow card widths. */
.plan__ribbon + .plan__name { padding-top: 22px; }
.plan__price { display: flex; align-items: baseline; gap: 2px; margin-bottom: 10px; }
.plan__cur { font-size: .95rem; color: var(--muted); align-self: flex-start; margin-top: 3px; }
.plan__amt { font-family: var(--display); font-size: 1.8rem; font-weight: 800; line-height: 1; letter-spacing: -.02em; transition: color .25s; }
.plan:hover .plan__amt { color: var(--brand-2); }
.plan__feats { list-style: none; padding: 12px 0 0; margin: 0 0 14px; border-top: 1px dashed var(--line); display: grid; gap: 7px; }
.plan__feats li { color: var(--muted); font-size: .82rem; padding-left: 22px; position: relative; }
.plan__feats li::before {
    content: "\2713"; position: absolute; left: 0; top: 0;
    width: 16px; height: 16px; display: grid; place-items: center;
    border-radius: 50%; background: var(--grad-soft); color: var(--brand-2);
    font-size: .62rem; font-weight: 800;
}
.plan__btn { width: 100%; justify-content: center; margin-top: auto; }

.plans-signin {
    display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap;
    padding: 28px 30px; border-radius: 20px;
    background: var(--grad-soft); border: 1px solid var(--line-2);
}
.plans-signin h3 { font-size: 1.2rem; margin-bottom: 4px; }
.plans-signin p { color: var(--muted); font-size: .9rem; max-width: 42em; }
.history { display: grid; gap: 8px; }
.history__row { display: grid; grid-template-columns: 1fr auto auto; gap: 16px; align-items: center; padding: 14px 16px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); transition: border-color .2s var(--ease); }
.history__row:hover { border-color: var(--line-2); }
.history__row small { display: block; color: var(--muted-2); font-size: .78rem; }
.history__amt { font-family: var(--display); font-weight: 700; }

/* ── Plans & billing enhancements ─────────────────────────────────────────── */
.billing__head { align-items: flex-start; }
.billing__headside { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.billmode { display: inline-flex; align-items: center; gap: 7px; padding: 6px 13px; border-radius: 999px; font-size: .78rem; font-weight: 700; border: 1px solid var(--line-2); background: var(--surface); }
.billmode__dot { width: 8px; height: 8px; border-radius: 50%; }
.billmode--live { color: #6fe9b6; border-color: rgba(67,230,160,.35); background: rgba(67,230,160,.10); }
.billmode--live .billmode__dot { background: #43e6a0; box-shadow: 0 0 0 3px rgba(67,230,160,.18); }
.billmode--test { color: #b3a8ff; border-color: rgba(109,94,252,.35); background: rgba(109,94,252,.10); }
.billmode--test .billmode__dot { background: var(--brand); box-shadow: 0 0 0 3px rgba(109,94,252,.18); }
.billing__activecount { color: var(--muted-2); font-size: .82rem; }
.billing__activecount strong { color: var(--text); }

.bill-overview { display: grid; grid-template-columns: repeat(auto-fit, minmax(158px, 1fr)); gap: 12px; margin-bottom: 30px; }
.bill-stat { display: flex; align-items: center; gap: 12px; padding: 15px 16px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); text-decoration: none; color: inherit; transition: transform .25s var(--ease), border-color .2s; }
a.bill-stat:hover { transform: translateY(-3px); border-color: var(--brand-2); }
.bill-stat__ico { flex: none; width: 40px; height: 40px; display: grid; place-items: center; border-radius: 12px; background: var(--grad-soft); font-size: 1.15rem; }
.bill-stat__n { font-family: var(--display); font-size: 1.4rem; font-weight: 800; line-height: 1; }
.bill-stat__l { color: var(--muted-2); font-size: .74rem; margin-top: 4px; display: block; }
.bill-stat--rec { border-color: var(--brand-2); background: var(--grad-soft); }
.bill-stat--rec .bill-stat__ico { background: var(--grad); color: var(--on-accent); }
.bill-stat--rec .bill-stat__n { color: var(--brand-2); }

.plan { position: relative; overflow: hidden; }
.plan--active { border-color: rgba(67,230,160,.5); background: linear-gradient(160deg, rgba(67,230,160,.08), transparent 60%); }
.plan--active:hover { border-color: rgba(67,230,160,.7); box-shadow: 0 18px 48px rgba(67,230,160,.14); }
.plan--rec { border-color: var(--brand-2); box-shadow: var(--shadow-glow); background: var(--grad-soft); }
.plan--rec::after {
    content: ""; position: absolute; top: 0; left: -70%; width: 45%; height: 100%;
    background: linear-gradient(105deg, transparent, rgba(255,255,255,.16), transparent);
    transform: skewX(-18deg); animation: planShine 4.5s ease-in-out infinite;
    pointer-events: none;
}
@keyframes planShine {
    0%, 62% { left: -70%; }
    82%, 100% { left: 130%; }
}
.plan__ribbon { position: absolute; top: 14px; right: 14px; padding: 4px 10px; border-radius: 999px; font-size: .66rem; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; }
.plan__ribbon--active { background: rgba(67,230,160,.16); color: #6fe9b6; }
.plan__ribbon--rec { background: var(--grad); color: var(--on-accent); }
.plan__per { font-family: var(--font); font-size: .82rem; font-weight: 600; color: var(--muted-2); margin-left: 4px; }

.plan__usage { display: grid; gap: 12px; margin-bottom: 18px; }
.pbar__top { display: flex; justify-content: space-between; font-size: .76rem; color: var(--muted); margin-bottom: 5px; }
.pbar__track { height: 7px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.pbar__fill { display: block; height: 100%; border-radius: 999px; background: var(--grad); transform-origin: left; }
.bpanel.is-shown .pbar__fill { animation: pbarGrow .9s var(--ease) .25s backwards; }
@keyframes pbarGrow { from { transform: scaleX(0); } }
@media (prefers-reduced-motion: reduce) {
    .plan--rec::after, .bpanel.is-shown .pbar__fill { animation: none; }
}

@media (max-width: 640px) {
    .billing__head { flex-direction: column; }
    .billing__headside { align-items: flex-start; }
}

/* ── Alerts ───────────────────────────────────────────────────────────────── */
.alertlist { display: grid; gap: 10px; }
.alertcard { display: grid; grid-template-columns: 12px 1fr auto; gap: 14px; align-items: start; padding: 16px 18px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); }
.alertcard__dot { width: 10px; height: 10px; border-radius: 50%; margin-top: 6px; }
.alertcard--error .alertcard__dot { background: #ff7a88; box-shadow: 0 0 0 4px rgba(255,92,108,.16); }
.alertcard--warn .alertcard__dot { background: #ffc266; box-shadow: 0 0 0 4px rgba(255,176,77,.16); }
.alertcard--info .alertcard__dot { background: var(--brand-2); box-shadow: 0 0 0 4px rgba(177,92,255,.16); }
.alertcard__body strong { display: block; }
.alertcard__body p { color: var(--muted); font-size: .9rem; margin: 4px 0; }
.alertcard__body small { color: var(--muted-2); font-size: .78rem; }
.alertcard__x { font-size: 1.4rem; color: var(--muted-2); line-height: 1; }
.alertcard__x:hover { color: var(--text); }

/* ── Assistant ────────────────────────────────────────────────────────────── */
.assistant { position: relative; padding: 60px 0 90px; overflow: hidden; }
.assistant__glow { position: absolute; top: -120px; left: 50%; transform: translateX(-50%); width: 700px; height: 500px; border-radius: 50%; background: rgba(109,94,252,.28); filter: blur(120px); }
.assistant__inner { position: relative; }
.assistant__head { text-align: center; max-width: 700px; margin: 0 auto 30px; }
.assistant__title { font-size: clamp(2rem, 4.5vw, 3.2rem); font-weight: 800; margin: 16px 0; }
.assistant__sub { color: var(--muted); font-size: 1.05rem; }
.assistant__bar { display: flex; gap: 10px; max-width: 680px; margin: 0 auto 16px; }
.assistant__field { flex: 1; display: flex; align-items: center; gap: 10px; padding: 0 18px; height: 56px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line-2); color: var(--muted); transition: .2s; }
.assistant__field:focus-within { border-color: var(--brand-2); box-shadow: 0 0 0 4px rgba(177,92,255,.16); }
.assistant__field input { flex: 1; background: none; border: none; outline: none; color: var(--text); font-size: 1rem; }
.assistant__bar .btn { height: 56px; }
.assistant__suggest { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; max-width: 680px; margin: 0 auto 30px; }
.assistant__reply { max-width: 760px; margin: 0 auto 26px; padding: 20px 24px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line-2); }
.assistant__reply p { font-size: 1.02rem; }
.assistant__reply small { display: block; color: var(--muted); margin-top: 8px; font-size: .85rem; }
.assistant__reply--error { border-color: rgba(255,92,108,.4); color: #ff8a98; }
.assistant__loading { display: flex; align-items: center; justify-content: center; gap: 12px; color: var(--muted); padding: 30px; }

/* ── Modal ────────────────────────────────────────────────────────────────── */
.modal { position: fixed; inset: 0; z-index: 300; display: grid; place-items: center; padding: 20px; }
.modal[hidden] { display: none; }
.modal__backdrop { position: absolute; inset: 0; background: rgba(18,18,40,.42); backdrop-filter: blur(6px); }
.modal__card { position: relative; width: 100%; max-width: 440px; padding: 30px; border-radius: var(--radius-lg); background: var(--surface); border: 1px solid var(--line-2); box-shadow: var(--shadow); max-height: 90vh; overflow-y: auto; }
.modal__x { position: absolute; top: 16px; right: 18px; font-size: 1.6rem; color: var(--muted); line-height: 1; }
.modal__x:hover { color: var(--text); }
.modal__title { font-size: 1.4rem; font-weight: 800; }
.modal__sub { color: var(--muted); font-size: .9rem; margin: 6px 0 18px; }
.modal__card .field { margin-bottom: 4px; }
.modal__submit { width: 100%; justify-content: center; margin-top: 18px; }
.modal__msg { padding: 10px 14px; border-radius: 10px; font-size: .88rem; margin-top: 14px; }
.modal__msg--ok { background: rgba(67,230,160,.14); color: #6fe9b6; }
.modal__msg--error { background: rgba(255,92,108,.14); color: #ff8a98; }

/* ── User menu ────────────────────────────────────────────────────────────── */
.nav__icon { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; color: var(--muted); transition: .2s; }
.nav__icon:hover { color: var(--text); background: var(--soft); }
.usermenu { position: relative; }
.usermenu__btn { display: flex; align-items: center; gap: 9px; padding: 5px 12px 5px 5px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line-2); color: var(--text); font-weight: 600; transition: .2s; box-shadow: 0 2px 10px -6px rgba(40,28,90,.3); }
.usermenu__btn:hover { background: var(--soft); }
.usermenu__avatar { width: 30px; height: 30px; border-radius: 50%; overflow: hidden; display: grid; place-items: center; background: var(--grad); font-size: .78rem; font-weight: 700; }
.usermenu__avatar img { width: 100%; height: 100%; object-fit: cover; }
.usermenu__name { font-size: .9rem; max-width: 110px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.usermenu__drop { position: absolute; right: 0; top: calc(100% + 10px); width: 200px; padding: 8px; border-radius: 14px; background: var(--surface); backdrop-filter: blur(16px); border: 1px solid var(--line-2); box-shadow: var(--shadow); opacity: 0; visibility: hidden; transform: translateY(-8px); transition: .2s var(--ease); }
.usermenu.is-open .usermenu__drop { opacity: 1; visibility: visible; transform: none; }
.usermenu__drop a { display: block; padding: 10px 12px; border-radius: 9px; color: var(--muted); font-size: .9rem; font-weight: 600; }
.usermenu__drop a:hover { background: var(--soft); color: var(--text); }
.usermenu__sep { height: 1px; background: var(--line); margin: 6px 4px; }
.nav__mobile-sep { height: 1px; background: var(--line); margin: 8px 0; }

@media (max-width: 980px) {
    .statcards { grid-template-columns: repeat(3, 1fr); }
    .statcard--wide { grid-column: span 3; }
    .crm__grid { grid-template-columns: 1fr; }
    .vpanel { grid-template-columns: 1fr; }
    .profile__head { grid-template-columns: 1fr; }
    .profile__actions { justify-content: flex-start; }
    .lead { grid-template-columns: 40px 1fr auto; }
    .lead__prop { display: none; }
}
@media (max-width: 560px) {
    .statcards { grid-template-columns: 1fr 1fr; }
    .statcard--wide { grid-column: span 2; }
    .leadhead { grid-template-columns: 1fr; text-align: center; justify-items: center; }
    .leadhead__contact { text-align: center; justify-items: center; }
    .vcard { grid-template-columns: 1fr; }
    .auth__card { padding: 26px 20px; }
}
