/* ══════════════════════════════════════
   HOME PAGE — pages/home.css
   Block: Greeting, health hero, agent cards, stats
   ══════════════════════════════════════ */

/* ── Greeting ── */
.greeting       { margin-bottom: 28px; }

.greeting-title {
    font-family: 'Unbounded', sans-serif;
    font-size: 24px;
    font-weight: 700;
    line-height: 1.2;
}

.greeting-title span { color: #1a7a40; }
.greeting-sub        { font-size: 14px; color: var(--ink3); margin-top: 6px; }

/* ── Health score hero ── */
.health-hero {
    background: var(--brand-gradient-alt);
    border-radius: 20px;
    padding: 28px 32px;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 24px;
    align-items: center;
    margin-bottom: 20px;
    position: relative;
    overflow: hidden;
}

.health-hero::before {
    content: '';
    position: absolute;
    top: -40px; right: 80px;
    width: 200px; height: 200px;
    background: radial-gradient(circle, rgba(0,192,84,.45) 0%, transparent 70%);
    pointer-events: none;
}

.health-hero::after {
    content: '';
    position: absolute;
    bottom: -20px; right: 200px;
    width: 120px; height: 120px;
    background: radial-gradient(circle, rgba(97,143,59,.35) 0%, transparent 70%);
    pointer-events: none;
}

.health-label {
    font-size: 12px;
    color: rgba(255,255,255,.5);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px;
}

.health-title {
    font-family: 'Unbounded', sans-serif;
    font-size: 20px;
    font-weight: 700;
    color: #fff;
    line-height: 1.3;
}

.health-desc {
    font-size: 13px;
    color: rgba(255,255,255,.6);
    margin-top: 8px;
    line-height: 1.6;
    max-width: 480px;
}

.health-actions { display: flex; gap: 10px; margin-top: 18px; }

.health-btn-primary {
    padding: 10px 22px;
    border-radius: 10px;
    border: none;
    background: #fff;
    color: var(--ink);
    font-family: 'Onest', sans-serif;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: all .15s;
}

.health-btn-primary:hover { background: #f0efff; color: #1a7a40; }

.health-btn-ghost {
    padding: 10px 20px;
    border-radius: 10px;
    background: transparent;
    border: 1.5px solid rgba(255,255,255,.2);
    color: rgba(255,255,255,.8);
    font-family: 'Onest', sans-serif;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all .15s;
}

.health-btn-ghost:hover { border-color: rgba(255,255,255,.5); color: #fff; }

/* ── Score ring ── */
.score-ring-wrap { text-align: center; position: relative; z-index: 1; }

.score-ring-num {
    font-family: 'Unbounded', sans-serif;
    font-size: 52px;
    font-weight: 800;
    color: #fff;
    line-height: 1;
}

.score-ring-label  { font-size: 12px; color: rgba(255,255,255,.5); margin-top: 4px; }
.score-ring-change { font-size: 12px; color: #4ade80; margin-top: 4px; font-weight: 600; }

/* ── Agent cards grid ── */
.agents-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
    margin-bottom: 24px;
}

.agent-card {
    background: var(--white);
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    cursor: pointer;
    transition: all .2s;
    box-shadow: var(--shadow);
    position: relative;
    overflow: hidden;
}

.agent-card::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    border-radius: var(--radius) var(--radius) 0 0;
    opacity: 0;
    transition: opacity .2s;
}

.agent-card.seo::after       { background: var(--brand-gradient); }
.agent-card.marketing::after { background: var(--teal); }
.agent-card.buyer::after     { background: var(--yellow); }
.agent-card.manager::after   { background: var(--pink); }

.agent-card:hover         { border-color: var(--ink4); box-shadow: var(--shadow-md); transform: translateY(-2px); }
.agent-card:hover::after  { opacity: 1; }

.ac-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 14px;
}

.ac-icon { font-size: 24px; }

.ac-score-pill {
    font-family: 'Unbounded', sans-serif;
    font-size: 13px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 20px;
}

.ac-score-pill.ok   { background: var(--green-light);  color: var(--green); }
.ac-score-pill.warn { background: var(--orange-light); color: var(--orange); }
.ac-score-pill.bad  { background: var(--red-light);    color: var(--red); }
.ac-score-pill.info { background: var(--accent-light); color: #1a7a40; }

.ac-name   { font-family: 'Unbounded', sans-serif; font-size: 13px; font-weight: 700; margin-bottom: 4px; }
.ac-status { font-size: 12px; color: var(--ink3); line-height: 1.4; }

.ac-bar-wrap { margin-top: 14px; }
.ac-bar-bg   { height: 5px; background: var(--bg); border-radius: 5px; overflow: hidden; }
.ac-bar-fill { height: 100%; border-radius: 5px; transition: width .8s ease; }

.ac-bar-fill.seo       { background: var(--brand-gradient); }
.ac-bar-fill.marketing { background: var(--teal); }
.ac-bar-fill.buyer     { background: var(--yellow); }
.ac-bar-fill.manager   { background: var(--pink); }

/* ── Stats row (mini) ── */
.stats-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.stat-mini {
    text-align: center;
    padding: 14px 8px;
    background: var(--bg);
    border-radius: var(--radius-sm);
}

.stat-mini-val   { font-family: 'Unbounded', sans-serif; font-size: 20px; font-weight: 700; }
.stat-mini-label { font-size: 11px; color: var(--ink3); margin-top: 4px; }

/* ══════════════════════════════════════
   Modern overview — test account
   ══════════════════════════════════════ */

.home-modern {
    padding: 0;
    background: transparent;
}

.hm-shell {
    --hm-green: #A8E76A;
    --hm-ink: #111217;
    --hm-muted: #8d919d;
    --hm-line: rgba(17, 18, 23, .075);
    min-height: 100vh;
    padding: 22px 28px 34px;
    color: var(--hm-ink);
}

.hm-topbar,
.hm-title-row,
.hm-card-head,
.hm-top-right,
.hm-top-actions,
.hm-account-actions,
.hm-focus-now,
.hm-team-strip,
.hm-team-avatars,
.hm-chart-switch,
.hm-avatars {
    display: flex;
    align-items: center;
}

.hm-topbar,
.hm-title-row,
.hm-card-head {
    justify-content: space-between;
}

.hm-team-strip,
.hm-focus-now,
.hm-invite-btn,
.hm-round-btn,
.hm-profile-btn,
.hm-primary-link,
.hm-chart-switch button,
.hm-focus-card button {
    border: 0;
    font-family: inherit;
    cursor: pointer;
}

.hm-avatars i {
    display: grid;
    place-items: center;
    border-radius: 50%;
    font-weight: 900;
    overflow: hidden;
    padding: 0;
}

.hm-team-card small {
    display: block;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}


.hm-top-right {
    gap: 10px;
}

.hm-top-actions,
.hm-account-actions {
    gap: 8px;
}

.hm-account-actions {
    margin-left: 8px;
}

.hm-focus-now {
    width: min(540px, 100%);
    height: 44px;
    padding: 0 8px 0 9px;
    border-radius: 999px;
    background:
        linear-gradient(90deg, rgba(218,248,235,.78) 0%, rgba(188,238,184,.76) calc(var(--freshness) * .58), rgba(150,218,82,.88) var(--freshness), #fff var(--freshness), #fff 100%),
        #fff;
    color: var(--hm-ink);
    display: flex;
    align-items: center;
    gap: 9px;
    overflow: hidden;
    position: relative;
    text-align: left;
    box-shadow: 0 10px 28px rgba(17,18,23,.065), inset 0 0 0 1px rgba(17,18,23,.045);
    transition: transform .18s ease, box-shadow .18s ease;
}

.hm-focus-now::before {
    display: none;
}

.hm-focus-now:hover {
    transform: translateY(-1px);
    box-shadow: 0 14px 34px rgba(17,18,23,.09), 0 0 0 4px rgba(168,231,106,.11);
}

.hm-ai-core {
    width: 31px;
    height: 31px;
    border-radius: 50%;
    background: #111217;
    color: #fff;
    display: grid;
    place-items: center;
    flex-shrink: 0;
    position: relative;
    box-shadow: 0 10px 22px rgba(17,18,23,.14);
}

.hm-ai-core::after {
    content: "";
    position: absolute;
    right: -2px;
    bottom: -2px;
    width: 8px;
    height: 8px;
    border: 2px solid #fff;
    border-radius: 50%;
    background: var(--hm-green);
    box-shadow: 0 0 0 0 rgba(168,231,106,.55);
    animation: hmAiPulse 1.8s ease-out infinite;
}

.hm-ai-avatar {
    color: #fff;
    font-size: 9px;
    font-weight: 950;
    letter-spacing: .02em;
}

.hm-focus-copy {
    width: 72px;
    min-width: 0;
    position: relative;
    z-index: 2;
}

.hm-focus-copy span {
    display: block;
    margin-top: 1px;
    color: rgba(17,18,23,.48);
    font-size: 8.5px;
    font-weight: 950;
    line-height: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-transform: none;
}

.hm-focus-copy strong {
    display: block;
    color: #173111;
    font-size: 13px;
    font-weight: 950;
    line-height: 1;
}

.hm-focus-meta {
    min-width: 0;
    flex: 1;
    position: relative;
    z-index: 2;
}

.hm-focus-meta b,
.hm-focus-meta small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.hm-focus-meta b {
    color: #111217;
    font-size: 11px;
    font-weight: 950;
    line-height: 1.1;
}

.hm-focus-meta small {
    margin-top: 2px;
    color: rgba(17,18,23,.52);
    font-size: 9.5px;
    font-weight: 850;
    line-height: 1;
}

.hm-focus-action {
    min-width: 72px;
    height: 30px;
    padding: 0 11px;
    border-radius: 999px;
    background: #111217;
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 11px;
    font-weight: 950;
    white-space: nowrap;
    position: relative;
    z-index: 2;
    transition: background .18s ease, transform .18s ease;
}

.hm-focus-now:hover .hm-focus-action {
    background: #173111;
    transform: translateX(1px);
}

@keyframes hmAiPulse {
    0% { box-shadow: 0 0 0 0 rgba(168,231,106,.55); }
    70% { box-shadow: 0 0 0 8px rgba(168,231,106,0); }
    100% { box-shadow: 0 0 0 0 rgba(168,231,106,0); }
}

.hm-team-strip {
    min-width: 0;
    height: 44px;
    padding: 0;
    border-radius: 0;
    background: transparent;
    color: var(--hm-ink);
    position: relative;
}

.hm-team-strip:hover .hm-team-avatars i {
    border-color: rgba(168, 231, 106, .72);
    box-shadow: 0 0 0 5px rgba(168, 231, 106, .13), 0 10px 24px rgba(168, 231, 106, .2);
}

.hm-team-avatars {
    padding-left: 10px;
}

.hm-team-avatars i,
.hm-team-avatars b {
    width: 40px;
    height: 40px;
    margin-left: -12px;
    border: 3px solid #eeeeec;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: #fff;
    color: #243026;
    font-size: 13px;
    font-style: normal;
    font-weight: 900;
    box-shadow: 0 1px 0 rgba(17,18,23,.04);
    position: relative;
}

.hm-team-avatars i {
    z-index: 2;
    overflow: hidden;
    padding: 0;
}
.hm-team-avatars i img {
    width: 100%; height: 100%; object-fit: cover; border-radius: 0; display: block; flex-shrink: 0;
}

.hm-team-avatars b {
    z-index: 1;
}

.hm-team-avatars i::after {
    content: "";
    position: absolute;
    right: 1px;
    bottom: 1px;
    width: 10px;
    height: 10px;
    border: 2px solid #eeeeec;
    border-radius: 50%;
    background: var(--hm-green);
    box-shadow: 0 0 0 4px rgba(168, 231, 106, .18), 0 0 14px rgba(168, 231, 106, .72);
}

.hm-team-avatars i.offline,
.hm-team-avatars i.hm-av-overflow { display: none; }
.hm-team-avatars i.offline::after { display: none; }

.hm-team-avatars i:nth-child(2) { background: #eaf5df; }
.hm-team-avatars i:nth-child(3) { background: #ddebf5; }

.hm-team-avatars i:first-child,
.hm-team-avatars b:first-child {
    margin-left: 0;
}

.hm-team-avatars b {
    background: var(--hm-ink);
    color: #fff;
    transition: transform .18s ease, box-shadow .18s ease;
}

.hm-team-avatars b:hover {
    transform: translateY(-2px) scale(1.04);
    box-shadow: 0 10px 24px rgba(17,18,23,.18);
}

.hm-team-avatar-tip {
    position: absolute;
    left: 50%;
    top: calc(100% + 12px);
    width: 218px;
    padding: 12px 14px;
    border-radius: 18px;
    background: rgba(17,18,23,.94);
    color: #fff;
    box-shadow: 0 16px 36px rgba(17,18,23,.18);
    opacity: 0;
    transform: translate(-50%, -8px) scale(.96);
    pointer-events: none;
    transition: opacity .18s ease, transform .18s ease;
    text-align: left;
    z-index: 40;
}

.hm-team-avatar-tip::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: 100%;
    width: 12px;
    height: 12px;
    background: rgba(17,18,23,.94);
    transform: translate(-50%, 6px) rotate(45deg);
}

.hm-team-avatar-tip strong,
.hm-team-avatar-tip small {
    display: block;
}

.hm-team-avatar-tip strong {
    color: #fff;
    font-size: 12px;
    font-weight: 900;
}

.hm-team-avatar-tip small {
    margin-top: 4px;
    color: rgba(255,255,255,.68);
    font-size: 11px;
    line-height: 1.35;
}

.hm-team-avatars i:hover .hm-team-avatar-tip {
    opacity: 1;
    transform: translate(-50%, 0) scale(1);
}

.hm-team-strip:hover > .hm-team-strip-tip {
    opacity: 1;
    transform: translate(-50%, 0) scale(1);
}

.hm-team-strip:hover .hm-team-avatars i:hover .hm-team-avatar-tip {
    opacity: 0;
    transform: translate(-50%, -8px) scale(.96);
}

.hm-invite-btn {
    height: 42px;
    padding: 0 18px;
    border-radius: 999px;
    background: rgba(255,255,255,.68);
    color: #555a64;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    font-weight: 900;
    position: relative;
}

.hm-invite-btn:hover {
    background: #fff;
    color: var(--hm-ink);
}

.hm-round-btn {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(255,255,255,.72);
    color: #383b45;
    display: grid;
    place-items: center;
    position: relative;
}

.hm-round-btn--dark {
    background: var(--hm-ink);
    color: #fff;
}

.hm-notif-btn.active {
    background: #fff;
    color: #173111;
}

.hm-notif-badge {
    position: absolute;
    top: 3px;
    right: 3px;
    min-width: 15px;
    height: 15px;
    padding: 0 4px;
    border-radius: 999px;
    background: var(--hm-green);
    color: #173111;
    align-items: center;
    justify-content: center;
    font-size: 9px;
    font-weight: 900;
}

.hm-profile-btn {
    width: 42px;
    height: 42px;
    padding: 0;
    border-radius: 50%;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.hm-profile-btn > img,
.hm-profile-btn > .hm-profile-ava {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    flex-shrink: 0;
}

.hm-profile-btn > img {
    object-fit: cover;
    display: block;
}

.hm-profile-btn > .hm-profile-ava {
    background: var(--hm-green);
    color: #173111;
    display: grid;
    place-items: center;
    font-size: 14px;
    font-weight: 900;
}

.hm-action-tip {
    position: absolute;
    left: 50%;
    top: calc(100% + 12px);
    width: 210px;
    padding: 12px 14px;
    border-radius: 18px;
    background: rgba(17,18,23,.94);
    color: #fff;
    box-shadow: 0 16px 36px rgba(17,18,23,.18);
    opacity: 0;
    transform: translate(-50%, -8px) scale(.96);
    pointer-events: none;
    transition: opacity .18s ease, transform .18s ease;
    text-align: left;
    z-index: 60;
}

.hm-action-tip::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: 100%;
    width: 12px;
    height: 12px;
    background: rgba(17,18,23,.94);
    transform: translate(-50%, 6px) rotate(45deg);
}

.hm-action-tip strong,
.hm-action-tip small {
    display: block;
}

.hm-action-tip strong {
    color: #fff;
    font-size: 12px;
    font-weight: 900;
}

.hm-action-tip small {
    margin-top: 4px;
    color: rgba(255,255,255,.68);
    font-size: 11px;
    line-height: 1.35;
}

.hm-invite-btn:hover .hm-action-tip,
.hm-round-btn:hover .hm-action-tip,
.hm-profile-btn:hover .hm-action-tip,
.hm-team-avatars b:hover .hm-action-tip {
    opacity: 1;
    transform: translate(-50%, 0) scale(1);
}

.hm-account-actions .hm-action-tip {
    left: auto;
    right: 0;
    transform: translate(0, -8px) scale(.96);
}

.hm-account-actions .hm-action-tip::after {
    left: auto;
    right: 20px;
    transform: translate(0, 6px) rotate(45deg);
}

.hm-account-actions .hm-round-btn:hover .hm-action-tip,
.hm-account-actions .hm-profile-btn:hover .hm-action-tip {
    transform: translate(0, 0) scale(1);
}

.hm-title-row {
    margin-top: 40px;
    gap: 24px;
}

.hm-title-row h1 {
    margin: 0;
    font-family: 'Unbounded', sans-serif;
    font-size: clamp(34px, 4vw, 52px);
    line-height: .95;
    letter-spacing: 0;
}

.hm-title-row p {
    margin: 8px 0 0;
    color: var(--hm-muted);
    font-size: 15px;
}

.hm-primary-link {
    height: 38px;
    padding: 0 16px;
    border-radius: 999px;
    background: var(--hm-ink);
    color: #fff;
    font-size: 12px;
    font-weight: 800;
}

.hm-grid {
    margin-top: 28px;
    display: grid;
    grid-template-columns: minmax(420px, 1.34fr) minmax(220px, .72fr) minmax(250px, .78fr);
    grid-auto-rows: minmax(128px, auto);
    gap: 14px;
}

.hm-card {
    position: relative;
    border: 1px solid rgba(255,255,255,.72);
    border-radius: 20px;
    background: rgba(255,255,255,.68);
    box-shadow: 0 1px 0 rgba(17,18,23,.035);
    overflow: hidden;
}

/* Сайта нет — карточки остаются кликабельными (ведут на страницы разделов,
   у которых уже есть свой экран "добавьте сайт"), просто визуально приглушены */
.hm-grid--locked .hm-card {
    filter: grayscale(1);
    opacity: .58;
    transition: opacity .15s;
}
.hm-grid--locked .hm-card:hover {
    opacity: .8;
}

.hm-lock-badge {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 26px;
    height: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(17,18,23,.08);
    color: #55585f;
    z-index: 1;
}

.hm-card:hover {
    border-color: rgba(17,18,23,.08);
}

.hm-audit-card,
.hm-crm-card,
.hm-team-card,
.hm-task-card,
.hm-positions-card,
.hm-focus-card,
.hm-kpi-card {
    padding: 18px;
}

.hm-audit-card {
    grid-row: span 2;
}

.hm-card h2,
.hm-card h3 {
    margin: 5px 0 0;
    font-family: 'Unbounded', sans-serif;
    letter-spacing: 0;
}

.hm-card h2 {
    max-width: 520px;
    font-size: 24px;
    line-height: 1.18;
}

.hm-card h3 {
    font-size: 18px;
    line-height: 1.2;
}

.hm-kicker,
.hm-kpi-card > span,
.hm-team-card > span,
.hm-focus-card > span {
    color: var(--hm-muted);
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.hm-chart-switch {
    gap: 4px;
    padding: 3px;
    border-radius: 999px;
    background: #f0f1ef;
}

.hm-chart-switch button {
    height: 28px;
    padding: 0 10px;
    border-radius: 999px;
    background: transparent;
    color: #71757f;
    font-size: 11px;
    font-weight: 900;
}

.hm-chart-switch button.active {
    background: var(--hm-ink);
    color: #fff;
}

.hm-audit-body {
    margin-top: 22px;
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 22px;
    align-items: center;
}

.hm-score-box strong {
    font-family: 'Unbounded', sans-serif;
    font-size: 58px;
    line-height: .9;
}

.hm-score-box span {
    color: var(--hm-muted);
    font-weight: 900;
}

.hm-score-box small {
    display: block;
    margin-top: 7px;
    color: #43712d;
    font-size: 12px;
    font-weight: 900;
}

.hm-audit-body p {
    margin: 0;
    max-width: 560px;
    color: #4b4f5a;
    font-size: 14px;
    line-height: 1.55;
}

.hm-bars {
    height: 154px;
    margin-top: 22px;
    padding: 18px 2px 0;
    border-top: 1px solid var(--hm-line);
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 10px;
    align-items: end;
}

.hm-bar {
    height: 100%;
    display: grid;
    grid-template-rows: 1fr 18px;
    align-items: end;
    justify-items: center;
    gap: 6px;
}

.hm-bar i {
    display: block;
    width: 100%;
    min-height: 10px;
    border-radius: 14px 14px 4px 4px;
    background: #e5e6e3;
}

.hm-bar i.audit {
    height: var(--audit);
    background: var(--hm-green);
}

.hm-bar i.marketing {
    display: none;
    height: var(--marketing);
    background: #dbe8f6;
}

.hm-bars[data-chart-mode="marketing"] .hm-bar i.audit { display: none; }
.hm-bars[data-chart-mode="marketing"] .hm-bar i.marketing { display: block; }

.hm-bar span {
    color: var(--hm-muted);
    font-size: 10px;
    font-weight: 800;
}

.hm-kpi-card {
    cursor: pointer;
}

.hm-kpi-card strong,
.hm-team-card strong {
    display: block;
    margin-top: 9px;
    font-family: 'Unbounded', sans-serif;
    font-size: 44px;
    line-height: .92;
}

.hm-kpi-card small,
.hm-team-card small {
    margin-top: 12px;
    color: var(--hm-muted);
    font-size: 12px;
}

.hm-kpi-card--tasks {
    background: #f7f9f4;
}

.hm-deadline {
    margin-top: 18px;
    padding-top: 12px;
    border-top: 1px solid var(--hm-line);
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 9px;
    align-items: center;
}

.hm-deadline b {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--hm-green);
    display: grid;
    place-items: center;
    font-size: 13px;
}

.hm-deadline p {
    margin: 0;
    color: #4b4f5a;
    font-size: 12px;
    font-weight: 800;
}

.hm-status-dot {
    width: 11px;
    height: 11px;
    border-radius: 50%;
    background: var(--hm-green);
}

.hm-status-dot.hot {
    background: var(--hm-ink);
}

.hm-crm-metrics {
    margin-top: 26px;
    padding-top: 15px;
    border-top: 1px solid var(--hm-line);
    display: grid;
    grid-template-columns: repeat(3, 1fr);
}

.hm-crm-metrics span {
    display: block;
    color: var(--hm-muted);
    font-size: 10px;
    font-weight: 900;
    text-transform: uppercase;
}

.hm-crm-metrics strong {
    display: block;
    margin-top: 6px;
    font-family: 'Unbounded', sans-serif;
    font-size: 20px;
}

.hm-avatars {
    margin-top: 18px;
}

.hm-avatars i {
    width: 28px;
    height: 28px;
    margin-left: -6px;
    border: 2px solid #fff;
    background: var(--hm-ink);
    color: #fff;
    font-size: 11px;
    font-style: normal;
    overflow: hidden;
    padding: 0;
}
.hm-avatars i img { width: 100%; height: 100%; object-fit: cover; border-radius: 0; display: block; flex-shrink: 0; }

.hm-avatars i:first-child {
    margin-left: 0;
    background: var(--hm-green);
    color: #173111;
}

.hm-task-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    cursor: pointer;
    position: relative;
}

.hm-task-card::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    pointer-events: none;
    opacity: .9;
}

.hm-task-card--audit {
    background: linear-gradient(135deg, rgba(168,231,106,.42), rgba(255,255,255,.86) 64%);
}

.hm-task-card--marketing {
    background: linear-gradient(135deg, rgba(223,238,248,.96), rgba(255,255,255,.9) 66%);
}

.hm-task-card--audit::before {
    box-shadow: inset 0 0 0 1px rgba(168,231,106,.35);
}

.hm-task-card--marketing::before {
    box-shadow: inset 0 0 0 1px rgba(91,142,176,.18);
}

.hm-task-card h3 {
    margin-top: 7px;
    font-size: 40px;
}

.hm-task-card p,
.hm-focus-card p {
    margin: 9px 0 0;
    color: #5d626d;
    font-size: 12px;
    line-height: 1.45;
}

.hm-task-orb {
    width: 70px;
    height: 70px;
    flex: 0 0 auto;
    border-radius: 50%;
    background: conic-gradient(var(--hm-green) var(--p), #e7e8e5 0);
    display: grid;
    place-items: center;
    position: relative;
    z-index: 1;
}

.hm-task-card--marketing .hm-task-orb {
    background: conic-gradient(#9fc8df var(--p), #e5edf2 0);
}

.hm-task-orb span {
    width: 54px;
    height: 54px;
    border-radius: 50%;
    background: #fff;
    display: grid;
    place-items: center;
    font-family: 'Unbounded', sans-serif;
    font-size: 15px;
    font-weight: 800;
}

.hm-section-title {
    margin-bottom: 14px;
    font-size: 13px;
    font-weight: 900;
}

.hm-positions-card {
    background: #f8f8f6;
    cursor: pointer;
}

.hm-pos-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 12px;
}

.hm-pos-head .hm-section-title {
    margin-bottom: 5px;
}

.hm-pos-head p {
    margin: 0;
    color: var(--hm-muted);
    font-size: 11px;
    font-weight: 850;
}

.hm-pos-head strong {
    color: #111217;
    font-family: 'Unbounded', sans-serif;
    font-size: 22px;
    line-height: 1;
}

.hm-pos-row {
    min-height: 34px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    border-top: 1px solid var(--hm-line);
}

.hm-pos-row span {
    min-width: 0;
    color: #4b4f5a;
    font-size: 12px;
    font-weight: 850;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.hm-pos-row i {
    min-width: 42px;
    height: 22px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-style: normal;
    font-weight: 950;
}

.hm-pos-row.top i {
    background: rgba(168,231,106,.45);
    color: #173111;
}

.hm-pos-row.mid i {
    background: rgba(245,198,83,.22);
    color: #775713;
}

.hm-pos-row.low i {
    background: rgba(17,18,23,.08);
    color: #4b4f5a;
}

.hm-pos-empty {
    min-height: 74px;
    border-top: 1px solid var(--hm-line);
    color: var(--hm-muted);
    display: flex;
    align-items: center;
    font-size: 12px;
    font-weight: 850;
    line-height: 1.35;
}

.hm-focus-card {
    background: var(--hm-green);
}

.hm-focus-card h3 {
    margin-top: 8px;
}

.hm-focus-card button {
    margin-top: 16px;
    height: 32px;
    padding: 0 14px;
    border-radius: 999px;
    background: var(--hm-ink);
    color: #fff;
    font-size: 12px;
    font-weight: 900;
}

@media (max-width: 1180px) {
    .hm-focus-now {
        min-width: min(620px, 100%);
        flex: 1;
    }

    .hm-grid {
        grid-template-columns: 1fr 1fr;
    }

    .hm-audit-card {
        grid-column: 1 / -1;
    }
}

@media (max-width: 760px) {
    .hm-shell {
        padding: 18px 16px 26px;
    }

    .hm-topbar,
    .hm-title-row,
    .hm-audit-body,
    .hm-crm-metrics {
        align-items: stretch;
        grid-template-columns: 1fr;
        flex-direction: column;
    }

    .hm-top-right {
        width: 100%;
        justify-content: space-between;
        flex-wrap: wrap;
        gap: 10px;
    }

    .hm-focus-now {
        width: 100%;
        min-width: 0;
        max-width: none;
        height: 44px;
        padding: 0 8px 0 9px;
        gap: 7px;
    }

    .hm-ai-core {
        width: 31px;
        height: 31px;
    }

    .hm-ai-avatar {
        font-size: 9px;
    }

    .hm-focus-copy {
        width: 62px;
    }

    .hm-focus-copy strong {
        font-size: 12px;
    }

    .hm-focus-copy span {
        font-size: 8px;
    }

    .hm-focus-meta b {
        font-size: 10px;
    }

    .hm-focus-meta small {
        font-size: 8.5px;
    }

    .hm-focus-action {
        min-width: 62px;
        height: 29px;
        padding: 0 9px;
        font-size: 10px;
    }

    .hm-grid {
        grid-template-columns: 1fr;
    }

    .hm-card-head {
        align-items: flex-start;
        gap: 14px;
        flex-direction: column;
    }
}

/* ══════════════════════════════════════════════════════════
   ONBOARDING OVERLAY — first-time welcome (modern home)
   ══════════════════════════════════════════════════════════ */

.onb-overlay {
    position: fixed;
    inset: 0;
    z-index: 9200;
    background: rgba(17,18,23,.52);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    transition: opacity .3s ease;
}

.onb-overlay--visible {
    opacity: 1;
}

.onb-overlay--out {
    opacity: 0;
    pointer-events: none;
}

.onb-card {
    width: min(440px, 100%);
    background: #fff;
    border-radius: 32px;
    overflow: hidden;
    box-shadow:
        inset 0 0 0 1px rgba(17,18,23,.06),
        0 32px 80px rgba(17,18,23,.22);
    transform: translateY(20px) scale(.96);
    transition: transform .36s cubic-bezier(.18,.89,.32,1.1);
}

.onb-overlay--visible .onb-card {
    transform: translateY(0) scale(1);
}

/* ── Header ── */
.onb-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 20px 14px;
    border-bottom: 1px solid rgba(17,18,23,.07);
}

.onb-header-logo {
    width: 36px;
    height: 36px;
    border-radius: 12px;
    background: #a8e76a;
    display: grid;
    place-items: center;
}

.onb-header-logo img {
    width: 22px;
    height: 22px;
    object-fit: contain;
}

.onb-close {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 0;
    background: rgba(17,18,23,.06);
    color: #8d919d;
    display: grid;
    place-items: center;
    cursor: pointer;
    transition: background .15s, color .15s;
}

.onb-close:hover {
    background: rgba(17,18,23,.1);
    color: #111217;
}

/* ── Body ── */
.onb-body {
    padding: 24px 24px 20px;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

/* Team avatar row */
.onb-av-row {
    display: flex;
    gap: -8px;
}

.onb-av {
    width: 44px;
    height: 44px;
    border-radius: 15px;
    background: #a8e76a;
    color: #111217;
    display: grid;
    place-items: center;
    font-family: 'Unbounded', sans-serif;
    font-size: 15px;
    font-weight: 900;
    border: 3px solid #fff;
    margin-left: -8px;
    flex-shrink: 0;
    overflow: hidden;
    padding: 0;
}
.onb-av img { width: 100%; height: 100%; object-fit: cover; border-radius: 12px; display: block; }

.onb-av:first-child { margin-left: 0; }

.onb-av--rest {
    background: #f4f4f3;
    color: #8e95a2;
    font-size: 12px;
    font-family: 'Onest', sans-serif;
    font-weight: 900;
}

.onb-title {
    font-family: 'Unbounded', sans-serif;
    font-size: 22px;
    font-weight: 900;
    color: #111217;
    letter-spacing: -.02em;
    line-height: 1.15;
    margin: 0;
}

.onb-desc {
    font-size: 14px;
    color: #6b7280;
    line-height: 1.6;
    margin: 0;
}

/* Role card */
.onb-role-card {
    background: #f9f9f8;
    border-radius: 18px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.onb-role-title {
    font-size: 12px;
    color: #8e95a2;
    font-weight: 700;
}

.onb-role-title strong {
    color: #111217;
    font-weight: 900;
}

.onb-access-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.onb-access-item {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 12.5px;
    font-weight: 700;
    color: #8e95a2;
}

.onb-access-item svg { flex-shrink: 0; opacity: .4; }

.onb-access-item--on {
    color: #2d5a1b;
}

.onb-access-item--on svg {
    opacity: 1;
    color: #3a8a1a;
}

/* ── Footer ── */
.onb-foot {
    padding: 0 24px 24px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.onb-start-btn {
    width: 100%;
    height: 52px;
    background: #111217;
    color: #fff;
    border: 0;
    border-radius: 16px;
    font-family: 'Onest', sans-serif;
    font-size: 15px;
    font-weight: 900;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: opacity .15s, transform .15s;
}

.onb-start-btn:hover {
    opacity: .88;
    transform: translateY(-1px);
}

.onb-team-btn {
    width: 100%;
    height: 44px;
    background: transparent;
    color: #8e95a2;
    border: 0;
    border-radius: 14px;
    font-family: 'Onest', sans-serif;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: color .15s, background .15s;
}

.onb-team-btn:hover {
    color: #111217;
    background: #f4f4f3;
}
