/* /Components/AppDashboard.razor.rz.scp.css */
.db[b-em8msu24pc] {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0.25rem 0.15rem 2rem;
    color: #0f172a;
}

.db-loader[b-em8msu24pc] {
    margin-bottom: 1rem;
    border-radius: 999px;
}

.db-alert[b-em8msu24pc] {
    margin-bottom: 1rem;
}

/* AI Lead Actions — main dashboard notification (uses db-card base) */
.db-ai-card[b-em8msu24pc] {
    margin-bottom: 1.35rem;
}

.db-ai-card--attention[b-em8msu24pc] {
    border-color: #93c5fd;
    background: linear-gradient(135deg, #eff6ff 0%, #ffffff 60%);
    box-shadow: 0 0 0 1px rgba(59, 130, 246, 0.08), 0 8px 24px rgba(59, 130, 246, 0.1);
}

.db-ai-card__head[b-em8msu24pc] {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.85rem 1rem;
}

.db-ai-card__title-row[b-em8msu24pc] {
    display: flex;
    align-items: flex-start;
    gap: 0.85rem;
    min-width: 0;
    flex: 1 1 16rem;
}

.db-ai-card__icon[b-em8msu24pc] {
    flex-shrink: 0;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #dbeafe;
    color: #1d4ed8;
    font-size: 1.2rem;
}

.db-ai-card--attention .db-ai-card__icon[b-em8msu24pc] {
    background: #2563eb;
    color: #fff;
}

.db-ai-card__lead[b-em8msu24pc] {
    margin: 0.2rem 0 0;
    color: #64748b;
    font-size: 0.875rem;
    line-height: 1.4;
}

.db-ai-card__btns[b-em8msu24pc] {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.65rem 0.85rem;
}

.db-ai-card__breakdown[b-em8msu24pc] {
    margin: 0 0 0.85rem;
    padding-left: 1.15rem;
    color: #475569;
    font-size: 0.875rem;
    line-height: 1.45;
}

.db-ai-card__warn[b-em8msu24pc] {
    margin: 0 0 0.85rem;
    display: inline-block;
    padding: 0.35rem 0.65rem;
    border-radius: 8px;
    background: #fff7ed;
    border: 1px solid #fed7aa;
    color: #9a3412;
    font-size: 0.8rem;
    font-weight: 600;
}

.db-ai-card__metrics[b-em8msu24pc] {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 0.65rem;
}

.db-ai-card__metric[b-em8msu24pc] {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    padding: 0.7rem 0.75rem;
    border-radius: 12px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    min-width: 0;
}

.db-ai-card__metric-label[b-em8msu24pc] {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #64748b;
    line-height: 1.2;
}

.db-ai-card__metric-value[b-em8msu24pc] {
    font-size: 1.35rem;
    font-weight: 800;
    color: #0f172a;
    line-height: 1.1;
}

@media (max-width: 900px) {
    .db-ai-card__metrics[b-em8msu24pc] {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 560px) {
    .db-ai-card__metrics[b-em8msu24pc] {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* Hero */
.db-hero[b-em8msu24pc] {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem 1.5rem;
    margin-bottom: 1.25rem;
}

.db-hero__title[b-em8msu24pc] {
    margin: 0;
    font-size: clamp(1.55rem, 2.2vw, 1.85rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.15;
    color: #0f172a;
}

.db-hero__sub[b-em8msu24pc] {
    margin: 0.28rem 0 0;
    color: #64748b;
    font-size: 0.95rem;
}

.db-hero__actions[b-em8msu24pc] {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 0.65rem;
}

.db-datechip[b-em8msu24pc] {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    height: 2.55rem;
    padding: 0 0.9rem;
    border-radius: 12px;
    background: #fff;
    border: 1px solid #e6edf5;
    color: #1e293b;
    font-size: 0.9rem;
    font-weight: 650;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.db-datechip i[b-em8msu24pc] {
    color: #64748b;
    flex-shrink: 0;
    font-size: 0.95rem;
}

.db-date-hit[b-em8msu24pc] {
    position: relative;
    display: inline-flex;
    align-items: center;
    margin: 0;
    cursor: pointer;
    font-weight: 650;
    color: #1e293b;
}

.db-date-hit .db-date-input[b-em8msu24pc] {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    opacity: 0;
    cursor: pointer;
    border: 0;
    padding: 0;
    min-width: 0;
    background: transparent;
}

.db-date-sep[b-em8msu24pc] {
    color: #94a3b8;
    font-weight: 600;
    user-select: none;
}

.db-date-all[b-em8msu24pc] {
    margin-right: 0.35rem;
    padding-right: 0.55rem;
    border-right: 1px solid #e2e8f0;
    color: #0f172a;
    font-weight: 700;
    white-space: nowrap;
}

.db-date-placeholder[b-em8msu24pc] {
    color: #94a3b8;
    font-weight: 600;
}

.db-date-hit:hover span[b-em8msu24pc] {
    color: #2563eb;
}

.db-datechip.is-filtered[b-em8msu24pc] {
    border-color: #93c5fd;
    background: #eff6ff;
}

.db-date-clear[b-em8msu24pc] {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.4rem;
    height: 1.4rem;
    margin-left: 0.2rem;
    padding: 0;
    border: none;
    border-radius: 999px;
    background: #dbeafe;
    color: #1d4ed8;
    cursor: pointer;
}

.db-date-clear i[b-em8msu24pc] {
    color: inherit;
    font-size: 0.65rem;
}

.db-date-clear:hover[b-em8msu24pc] {
    background: #bfdbfe;
}

.db-add[b-em8msu24pc] {
    position: relative;
}

.db-add__btn[b-em8msu24pc] {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    height: 2.55rem;
    padding: 0 0.95rem;
    border: none;
    border-radius: 12px;
    background: #16a34a;
    color: #fff;
    font-size: 0.92rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 8px 18px rgba(22, 163, 74, 0.28);
}

.db-add__btn:hover[b-em8msu24pc] {
    background: #15803d;
}

.db-add__chev[b-em8msu24pc] {
    font-size: 0.72rem;
    margin-left: 0.1rem;
}

.db-add__backdrop[b-em8msu24pc] {
    position: fixed;
    inset: 0;
    z-index: 40;
    background: transparent;
}

.db-add__menu[b-em8msu24pc] {
    position: absolute;
    right: 0;
    top: calc(100% + 6px);
    z-index: 50;
    min-width: 11.5rem;
    padding: 6px;
    background: #fff;
    border: 1px solid #e6edf5;
    border-radius: 12px;
    box-shadow: 0 14px 32px rgba(15, 23, 42, 0.12);
}

.db-add__menu a[b-em8msu24pc] {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    border-radius: 8px;
    color: #0f172a;
    text-decoration: none;
    font-size: 0.88rem;
    font-weight: 650;
}

.db-add__menu a:hover[b-em8msu24pc] {
    background: #f0fdf4;
    color: #166534;
}

.db-btn-primary[b-em8msu24pc] {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.6rem 1rem;
    border-radius: 12px;
    background: #3b82f6;
    color: #fff !important;
    font-size: 0.9rem;
    font-weight: 700;
    text-decoration: none;
    box-shadow: 0 8px 20px rgba(59, 130, 246, 0.28);
    transition: background 0.15s ease, transform 0.15s ease;
}

.db-btn-primary:hover[b-em8msu24pc] {
    background: #2563eb;
    color: #fff !important;
    transform: translateY(-1px);
}

/* Metric cards */
.db-metrics[b-em8msu24pc] {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1rem;
    margin-bottom: 1.15rem;
}

.db-metric[b-em8msu24pc] {
    position: relative;
    background: #fff;
    border: 1px solid #e8eef5;
    border-radius: 16px;
    padding: 1rem 1.05rem 0.65rem;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03), 0 10px 28px rgba(15, 23, 42, 0.04);
    overflow: hidden;
    min-width: 0;
}

.db-metric__top[b-em8msu24pc] {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.65rem;
}

.db-metric__icon[b-em8msu24pc] {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: color-mix(in srgb, var(--m-color) 14%, #fff);
    color: var(--m-color);
    font-size: 1rem;
}

.db-metric__menu[b-em8msu24pc] {
    color: #94a3b8;
    font-size: 1.1rem;
    line-height: 1;
    letter-spacing: 0.05em;
}

.db-metric__label[b-em8msu24pc] {
    margin: 0;
    font-size: 0.82rem;
    font-weight: 600;
    color: #64748b;
}

.db-metric__value[b-em8msu24pc] {
    display: block;
    margin-top: 0.2rem;
    font-size: 1.75rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    color: #0f172a;
    line-height: 1.1;
}

.db-metric__trend[b-em8msu24pc] {
    margin-top: 0.35rem;
}

.db-metric__delta[b-em8msu24pc] {
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: #64748b;
}

.db-metric__delta.is-up[b-em8msu24pc] {
    color: #16a34a;
}

.db-metric__delta.is-down[b-em8msu24pc] {
    color: #dc2626;
}

.db-metric__delta.is-flat[b-em8msu24pc] {
    color: #64748b;
}

.db-spark[b-em8msu24pc] {
    display: block;
    width: calc(100% + 2.1rem);
    height: 36px;
    margin: 0.55rem -1.05rem -0.65rem;
}

.db-spark__line[b-em8msu24pc] {
    fill: none;
    stroke: var(--m-color);
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.db-spark__area[b-em8msu24pc] {
    fill: color-mix(in srgb, var(--m-color) 16%, transparent);
    stroke: none;
}

/* Cards / grid */
.db-main[b-em8msu24pc],
.db-lower[b-em8msu24pc] {
    display: grid;
    gap: 1rem;
    margin-bottom: 1rem;
}

.db-main[b-em8msu24pc] {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.db-lower[b-em8msu24pc] {
    grid-template-columns: 1.4fr 1fr;
}

.db-card[b-em8msu24pc] {
    background: #fff;
    border: 1px solid #e8eef5;
    border-radius: 16px;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03), 0 10px 28px rgba(15, 23, 42, 0.04);
    min-width: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.db-card__head[b-em8msu24pc] {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 1rem 1.15rem 0.35rem;
}

.db-card__title[b-em8msu24pc] {
    margin: 0;
    font-size: 1rem;
    font-weight: 750;
    color: #0f172a;
    letter-spacing: -0.01em;
}

.db-card__link[b-em8msu24pc] {
    font-size: 0.85rem;
    font-weight: 650;
    color: #3b82f6;
    text-decoration: none;
    white-space: nowrap;
}

.db-card__link:hover[b-em8msu24pc] {
    text-decoration: underline;
}

.db-card__body[b-em8msu24pc] {
    padding: 0.65rem 1.15rem 1.15rem;
    flex: 1 1 auto;
}

.db-card__body--scroll[b-em8msu24pc] {
    max-height: 340px;
    overflow-y: auto;
}

.db-card__body--chart[b-em8msu24pc] {
    position: relative;
}

.db-empty[b-em8msu24pc] {
    margin: 0.5rem 0 0;
    color: #94a3b8;
    font-size: 0.9rem;
}

.db-empty-state[b-em8msu24pc] {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    min-height: 180px;
    color: #94a3b8;
    text-align: center;
}

.db-empty-state i[b-em8msu24pc] {
    font-size: 1.75rem;
    color: #cbd5e1;
}

.db-empty-state p[b-em8msu24pc] {
    margin: 0;
    font-size: 0.92rem;
}

/* Pipeline */
.db-pipe[b-em8msu24pc] {
    list-style: none;
    margin: 0;
    padding: 0.25rem 0 0;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.db-pipe__row[b-em8msu24pc] {
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-areas:
        "meta pct"
        "track track";
    gap: 0.25rem 0.65rem;
    align-items: center;
}

.db-pipe__meta[b-em8msu24pc] {
    grid-area: meta;
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.75rem;
}

.db-pipe__label[b-em8msu24pc] {
    font-size: 0.9rem;
    font-weight: 600;
    color: #334155;
}

.db-pipe__count[b-em8msu24pc] {
    font-size: 0.85rem;
    font-weight: 700;
    color: #0f172a;
}

.db-pipe__track[b-em8msu24pc] {
    grid-area: track;
    height: 8px;
    border-radius: 999px;
    background: #f1f5f9;
    overflow: hidden;
}

.db-pipe__fill[b-em8msu24pc] {
    height: 100%;
    border-radius: 999px;
    min-width: 0;
    transition: width 0.35s ease;
}

.db-pipe__pct[b-em8msu24pc] {
    grid-area: pct;
    font-size: 0.8rem;
    font-weight: 650;
    color: #64748b;
    text-align: right;
}

/* Donut + legend */
.db-donut-wrap[b-em8msu24pc] {
    position: relative;
}

.db-donut-center[b-em8msu24pc] {
    position: absolute;
    top: 42%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    pointer-events: none;
}

.db-donut-center strong[b-em8msu24pc] {
    display: block;
    font-size: 1.25rem;
    font-weight: 800;
    color: #0f172a;
    line-height: 1.1;
}

.db-donut-center span[b-em8msu24pc] {
    font-size: 0.75rem;
    color: #94a3b8;
    font-weight: 600;
}

.db-legend[b-em8msu24pc] {
    list-style: none;
    margin: 0.75rem 0 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.db-legend li[b-em8msu24pc] {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 0.55rem;
    align-items: center;
    font-size: 0.86rem;
}

.db-legend__dot[b-em8msu24pc] {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.db-legend__name[b-em8msu24pc] {
    color: #475569;
    font-weight: 550;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.db-legend__pct[b-em8msu24pc] {
    color: #0f172a;
    font-weight: 700;
}

/* Activity feed */
.db-feed[b-em8msu24pc] {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.db-feed__item[b-em8msu24pc] {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 0.7rem;
    align-items: start;
    padding: 0.65rem 0.15rem;
    border-bottom: 1px solid #f1f5f9;
}

.db-feed__item:last-child[b-em8msu24pc] {
    border-bottom: 0;
}

.db-feed__avatar[b-em8msu24pc] {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
}

.db-feed__avatar.is-info[b-em8msu24pc] {
    background: #dcfce7;
    color: #16a34a;
}

.db-feed__avatar.is-success[b-em8msu24pc] {
    background: #dbeafe;
    color: #2563eb;
}

.db-feed__title[b-em8msu24pc] {
    margin: 0;
    font-size: 0.9rem;
    font-weight: 700;
    color: #0f172a;
}

.db-feed__desc[b-em8msu24pc] {
    margin: 0.15rem 0 0;
    font-size: 0.8rem;
    color: #64748b;
}

.db-feed__time[b-em8msu24pc] {
    font-size: 0.75rem;
    color: #94a3b8;
    font-weight: 600;
    white-space: nowrap;
}

/* Tasks */
.db-tasks[b-em8msu24pc] {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}

.db-tasks__item[b-em8msu24pc] {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    padding: 0.7rem 0.75rem;
    border-radius: 12px;
    background: #f8fafc;
    border: 1px solid #eef2f7;
}

.db-tasks__badge[b-em8msu24pc] {
    flex: 0 0 auto;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    padding: 0.2rem 0.5rem;
    border-radius: 999px;
    background: #fef3c7;
    color: #b45309;
}

.db-tasks__text[b-em8msu24pc] {
    margin: 0;
    font-size: 0.9rem;
    font-weight: 600;
    color: #334155;
    line-height: 1.4;
}

@media (max-width: 1100px) {
    .db-metrics[b-em8msu24pc] {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .db-main[b-em8msu24pc] {
        grid-template-columns: 1fr 1fr;
    }

    .db-main .db-card:last-child[b-em8msu24pc] {
        grid-column: 1 / -1;
    }
}

@media (max-width: 720px) {
    .db-metrics[b-em8msu24pc],
    .db-main[b-em8msu24pc],
    .db-lower[b-em8msu24pc] {
        grid-template-columns: 1fr;
    }

    .db-main .db-card:last-child[b-em8msu24pc] {
        grid-column: auto;
    }

    .db-hero__title[b-em8msu24pc] {
        font-size: 1.35rem;
    }
}
