/**
 * Home + Sales executive dashboards.
 */

.erp-dash-welcome {
    border: 1px solid var(--border-subtle);
    border-radius: 1.1rem;
    background: var(--surface);
    box-shadow: 0 8px 28px rgba(15, 23, 42, 0.04);
}

.erp-dash-welcome__title {
    margin: 0;
    font-size: 1.35rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--text-primary);
}

.erp-dash-welcome__meta {
    color: var(--text-muted);
    font-size: 0.9375rem;
}

.erp-dash-kpi {
    height: 100%;
    border: 1px solid var(--border-subtle);
    border-radius: 1rem;
    background: var(--surface);
    text-decoration: none;
    color: inherit;
    display: block;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

a.erp-dash-kpi:hover {
    border-color: color-mix(in srgb, var(--brand-teal) 45%, var(--border-subtle));
    box-shadow: 0 10px 24px rgba(0, 122, 99, 0.08);
    transform: translateY(-1px);
    color: inherit;
}

.erp-dash-kpi__icon {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 0.75rem;
    background: linear-gradient(135deg, #00CFA3, #007A63);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.erp-dash-kpi__label {
    color: var(--text-muted);
    font-size: 0.8125rem;
    font-weight: 600;
}

.erp-dash-kpi__value {
    color: var(--text-primary);
    font-size: 1.35rem;
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.2;
}

.erp-dash-kpi.is-empty .erp-dash-kpi__value {
    color: var(--text-muted);
    font-size: 1rem;
    font-weight: 600;
}

.erp-dash-panel {
    height: 100%;
    border: 1px solid var(--border-subtle);
    border-radius: 1rem;
    background: var(--surface);
}

.erp-dash-panel__title {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-primary);
}

.erp-dash-empty {
    min-height: 8.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 0.35rem;
    color: var(--text-muted);
    padding: 1.25rem;
}

.erp-dash-empty i {
    font-size: 1.35rem;
    color: var(--brand-teal);
}

.erp-dash-list a {
    color: var(--text-primary);
    text-decoration: none;
}

.erp-dash-list a:hover {
    color: var(--brand-teal-dark);
}

.erp-dash-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    background: color-mix(in srgb, var(--brand-teal-light) 70%, white);
    color: var(--brand-teal-dark);
}

.erp-search-type {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 3.6rem;
    padding: 0.1rem 0.4rem;
    border-radius: 0.35rem;
    font-size: 0.625rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    background: var(--surface-muted);
    color: var(--text-muted);
}

.erp-search-type--module {
    background: color-mix(in srgb, var(--brand-teal) 16%, transparent);
    color: var(--brand-teal-dark);
}

.erp-search-type--page {
    background: color-mix(in srgb, var(--brand-secondary) 14%, transparent);
    color: var(--brand-secondary);
}

.erp-search-type--record {
    background: var(--surface-muted);
    color: var(--text-secondary);
}

.search-result-item {
    display: flex;
    align-items: center;
    gap: 0.65rem;
}

.search-result-item__copy {
    min-width: 0;
    flex: 1 1 auto;
}

.search-result-item__group {
    display: block;
    font-size: 0.75rem;
    color: var(--text-muted);
}

[data-theme-mode="dark"] .erp-dash-kpi__icon i,
[data-theme-mode="dark"] .erp-dash-welcome,
[data-theme-mode="dark"] .erp-dash-panel,
[data-theme-mode="dark"] .erp-dash-kpi {
    color: var(--text-primary);
}

[data-theme-mode="dark"] .erp-dash-chip {
    background: color-mix(in srgb, var(--brand-teal) 22%, transparent);
    color: var(--brand-teal-light);
}

[data-theme-mode="dark"] .erp-search-type--module {
    color: var(--brand-teal-light);
}

[data-theme-mode="dark"] .alert-widget-tone,
[data-theme-mode="dark"] .erp-dash-panel .bg-light {
    background: var(--surface-muted) !important;
    color: var(--text-secondary);
}

.erp-trial-banner {
    background: var(--brand-teal-dark, #007A63);
    color: #fff;
}

.erp-trial-banner__icon {
    background: var(--surface, #fff);
    color: var(--brand-dark, #07152F);
}

.erp-trial-banner__meta {
    color: rgba(255, 255, 255, 0.82);
}

.erp-trial-banner__upgrade.btn-primary {
    background: var(--surface, #fff) !important;
    border-color: var(--surface, #fff) !important;
    color: var(--brand-dark, #07152F) !important;
}

.erp-trial-banner__upgrade.btn-primary:hover,
.erp-trial-banner__upgrade.btn-primary:focus {
    background: var(--surface-muted, #F1F5F9) !important;
    border-color: var(--surface-muted, #F1F5F9) !important;
    color: var(--brand-dark, #07152F) !important;
}

[data-theme-mode="dark"] .erp-trial-banner {
    background: var(--brand-teal-dark, #007A63);
    color: #fff;
}

[data-theme-mode="dark"] .erp-trial-banner__upgrade.btn-primary {
    background: var(--surface, #0F172A) !important;
    border-color: var(--border-subtle, #cbd5e1) !important;
    color: var(--text-primary, #F1F5F9) !important;
}

@media (max-width: 575.98px) {
    .erp-dash-welcome__title {
        font-size: 1.15rem;
    }

    .erp-dash-kpi__value {
        font-size: 1.2rem;
    }
}
