/* CRM-inspired dashboard chrome — uses tokens from theme.css */

.dashboard-shell {
    margin: -1rem -1.5rem 0;
    padding-bottom: 2rem;
}

@media (min-width: 641px) {
    .dashboard-shell {
        margin: -1.1rem -2rem 0 -2rem;
    }
}

.dash-app-header {
    background: linear-gradient(135deg, #1e3a5f 0%, #0f2847 50%, #0c1929 100%);
    color: #f8fafc;
    padding: 1rem 1.25rem 1.25rem;
    border-radius: 0 0 1rem 1rem;
    box-shadow: 0 4px 24px rgba(15, 23, 42, 0.18);
}

.dash-app-header__top {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}

.dash-app-header__brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.dash-app-header__logo {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 0.65rem;
    background: linear-gradient(145deg, var(--color-primary-teal) 0%, #0f5132 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 0.85rem;
    letter-spacing: -0.02em;
    color: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.dash-app-header__title {
    font-size: 1.35rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin: 0;
    line-height: 1.2;
}

.dash-app-header__subtitle {
    margin: 0.15rem 0 0;
    font-size: 0.8rem;
    color: rgba(248, 250, 252, 0.72);
}

.dash-app-header__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
}

.dash-pill-group {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    background: rgba(255, 255, 255, 0.08);
    padding: 0.2rem;
    border-radius: 999px;
}

.dash-pill {
    display: inline-block;
    padding: 0.35rem 0.9rem;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 500;
    color: rgba(248, 250, 252, 0.85);
    text-decoration: none;
    border: none;
    background: transparent;
    transition: background 0.15s ease, color 0.15s ease;
}

.dash-pill:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.12);
}

.dash-pill--active {
    background: rgba(255, 255, 255, 0.95);
    color: #0f2847;
}

.dash-pill--active:hover {
    color: #0f2847;
    background: #fff;
}

.btn-dash-outline {
    border: 1px solid rgba(255, 255, 255, 0.45);
    color: #fff;
    background: rgba(255, 255, 255, 0.06);
    font-size: 0.8rem;
    font-weight: 500;
    padding: 0.4rem 1rem;
    border-radius: 0.5rem;
    text-decoration: none;
    transition: background 0.15s ease, border-color 0.15s ease;
    cursor: pointer;
}

.btn-dash-outline:hover {
    background: rgba(255, 255, 255, 0.14);
    border-color: rgba(255, 255, 255, 0.65);
    color: #fff;
}

.dashboard-body {
    padding: 1.5rem 1.25rem 0;
}

@media (min-width: 992px) {
    .dashboard-body {
        padding: 1.75rem 1.5rem 0;
    }
}

.kpi-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

@media (min-width: 992px) {
    .kpi-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 1rem;
    }
}

.kpi-tile {
    border-radius: 0.85rem;
    padding: 1rem 1.1rem;
    color: #fff;
    box-shadow: 0 6px 20px rgba(15, 23, 42, 0.12);
    min-height: 5.5rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.kpi-tile--link {
    text-decoration: none;
    color: #fff;
    transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.kpi-tile--link:hover {
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.2);
}

.kpi-tile__label {
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    opacity: 0.92;
    line-height: 1.3;
}

.kpi-tile__value {
    font-size: 1.75rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1;
}

.kpi-tile__hint {
    font-size: 0.7rem;
    opacity: 0.85;
    margin-top: 0.35rem;
}

.kpi-tile--violet {
    background: linear-gradient(145deg, #5b21b6 0%, #4c1d95 100%);
}

.kpi-tile--ocean {
    background: linear-gradient(145deg, #1d4ed8 0%, #1e40af 100%);
}

.kpi-tile--teal {
    background: linear-gradient(145deg, #0d9488 0%, #0f766e 100%);
}

.kpi-tile--green {
    background: linear-gradient(145deg, #16a34a 0%, #15803d 100%);
}

.dash-card {
    background: var(--color-surface);
    border-radius: 0.85rem;
    border: 1px solid rgba(203, 213, 225, 0.85);
    box-shadow: 0 4px 20px rgba(15, 23, 42, 0.06);
    overflow: hidden;
    height: 100%;
}

.dash-card__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.85rem 1.1rem;
    border-bottom: 1px solid var(--color-border);
    background: linear-gradient(180deg, #fff 0%, #f8fafc 100%);
}

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

.dash-card__legend {
    font-size: 0.7rem;
    color: var(--color-text-muted);
}

.dash-card__body {
    padding: 1rem 1.1rem 1.15rem;
}

.dash-chart-h {
    min-height: 11rem;
}

.dash-chart-svg {
    width: 100%;
    height: auto;
    display: block;
}

.dash-donut-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
    min-height: 10rem;
}

.dash-donut-legend {
    list-style: none;
    padding: 0;
    margin: 0;
    font-size: 0.78rem;
    color: var(--color-text-muted);
}

.dash-donut-legend li {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin-bottom: 0.35rem;
}

.dash-dot {
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 50%;
    flex-shrink: 0;
}

.dash-sidebar .dash-card__body {
    padding: 1rem;
}

.dash-form-label {
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: var(--color-text-muted);
    margin-bottom: 0.35rem;
}

.dash-help-card {
    margin-top: 1rem;
    padding: 1rem;
    border-radius: 0.75rem;
    background: linear-gradient(145deg, #ecfeff 0%, #e0f2fe 100%);
    border: 1px solid #bae6fd;
    font-size: 0.82rem;
    color: var(--color-text-muted);
}

.dash-help-card strong {
    color: var(--color-text);
}

.dash-action-grid .btn {
    border-radius: 0.5rem;
    font-weight: 500;
}

.dash-disclaimer {
    border-left: 3px solid #f59e0b;
    background: #fffbeb;
}

.dash-footer-banner {
    margin: 2rem 1.25rem 0;
    padding: 0.65rem 1rem;
    text-align: center;
    font-size: 0.78rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.95);
    background: linear-gradient(90deg, #4338ca 0%, #312e81 45%, #1e3a8a 100%);
    border-radius: 0.5rem;
    box-shadow: 0 4px 16px rgba(30, 58, 138, 0.25);
}

@media (min-width: 641px) {
    .dash-footer-banner {
        margin-left: 1.5rem;
        margin-right: 1.5rem;
    }
}
