.email-dashboard-header {
    background: linear-gradient(120deg, #1f3c88 0%, #3568d4 58%, #38a3a5 100%);
    min-height: 250px;
}

.email-dashboard-header .page-header-subtitle {
    color: rgba(255, 255, 255, .72);
    margin-top: .35rem;
}

.email-dashboard-period {
    color: #fff;
    background: rgba(255, 255, 255, .12);
    border: 1px solid rgba(255, 255, 255, .2);
    border-radius: .75rem;
    padding: .75rem 1rem;
    font-size: .85rem;
    backdrop-filter: blur(4px);
}

.email-dashboard .card {
    border: 0;
    box-shadow: 0 .15rem 1.25rem rgba(31, 45, 61, .08);
}

.email-dashboard .filter-card {
    border-radius: .85rem;
}

.email-dashboard .filter-card label {
    color: #4a5568;
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.metric-card {
    overflow: hidden;
    position: relative;
    border-radius: .8rem;
}

.metric-card::before {
    background: #dde4ed;
    content: "";
    height: 4px;
    left: 0;
    position: absolute;
    right: 0;
    top: 0;
}

.metric-card.metric-primary::before { background: #3568d4; }
.metric-card.metric-success::before { background: #20a66a; }
.metric-card.metric-info::before { background: #14a3b8; }
.metric-card.metric-danger::before { background: #e24c4b; }

.metric-card .card-body {
    min-height: 150px;
    padding: 1.25rem 1.35rem;
}

.metric-icon {
    align-items: center;
    background: #edf2f7;
    border-radius: .65rem;
    color: #60758b;
    display: flex;
    font-size: 1rem;
    height: 36px;
    justify-content: center;
    position: absolute;
    right: 1.2rem;
    top: 1.2rem;
    width: 36px;
}

.metric-primary .metric-icon { background: #e9effc; color: #3568d4; }
.metric-success .metric-icon { background: #e8f7ef; color: #188454; }
.metric-info .metric-icon { background: #e4f7fa; color: #138b9c; }
.metric-danger .metric-icon { background: #fceceb; color: #d03d3c; }

.metric-label {
    color: #718096;
    font-size: .78rem;
    font-weight: 700;
    letter-spacing: .02em;
    margin-bottom: .35rem;
    padding-right: 2.8rem;
    text-transform: uppercase;
}

.metric-value {
    color: #213547;
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: -.035em;
    line-height: 1.15;
}

.metric-caption {
    color: #8492a6;
    font-size: .76rem;
    margin-top: .55rem;
}

.secondary-kpis .metric-card .card-body { min-height: 136px; }
.text-purple { color: #7c5cc4 !important; }

.chart-card .card-header,
.email-dashboard > div > .card > .card-header,
.email-dashboard .row .card-header {
    background: #fff;
    border-bottom: 1px solid #edf1f5;
    color: #304156;
    font-weight: 700;
    padding: 1rem 1.25rem;
}

.dashboard-chart {
    height: 330px;
    position: relative;
    width: 100%;
}

.log-summary-card { border-left: 4px solid #e24c4b !important; }
.log-summary-icon {
    align-items: center;
    background: #fdebea;
    border-radius: .7rem;
    color: #cf3f3e;
    display: flex;
    flex: 0 0 auto;
    font-size: 1.1rem;
    height: 44px;
    justify-content: center;
    margin-right: 1rem;
    width: 44px;
}
.log-summary-title { color: #304156; font-size: .86rem; font-weight: 700; margin-bottom: .2rem; }
.log-summary-values { color: #6c7d90; font-size: .8rem; }
.log-summary-values span { color: #c5ced8; margin: 0 .4rem; }

.dashboard-table thead th {
    background: #f8fafc;
    border-bottom: 1px solid #e9eef5;
    border-top: 0;
    color: #718096;
    font-size: .69rem;
    font-weight: 700;
    letter-spacing: .035em;
    padding: .85rem 1rem;
    text-transform: uppercase;
    white-space: nowrap;
}

.dashboard-table td {
    border-color: #eef2f6;
    color: #44546a;
    font-size: .8rem;
    padding: .8rem 1rem;
    vertical-align: middle;
}

.dashboard-table td small {
    color: #8a98aa;
    display: block;
    margin-top: .15rem;
}

.rate-pill,
.status-badge {
    background: #edf2f7;
    border-radius: 1rem;
    color: #53657a;
    display: inline-block;
    font-size: .69rem;
    font-weight: 700;
    padding: .25rem .5rem;
    white-space: nowrap;
}

.rate-good { background: #e5f6ed; color: #187c50; }
.rate-bad { background: #fdebea; color: #c33d3c; }
.status-bounced, .status-error { background: #fdebea; color: #c33d3c; }
.status-skipped, .status-limit { background: #fff3d8; color: #9a6810; }

.issue-table td:nth-child(2) {
    max-width: 310px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.empty-state {
    color: #8a98aa !important;
    padding: 2rem !important;
    text-align: center !important;
}

.dashboard-loading {
    align-items: center;
    color: #fff;
    display: flex;
    flex-direction: column;
    font-size: .9rem;
    gap: .75rem;
    justify-content: center;
    min-height: 220px;
}

.dashboard-loading i { font-size: 2rem; }

@media (max-width: 767.98px) {
    .email-dashboard-period { font-size: .72rem; }
    .dashboard-chart { height: 280px; }
    .metric-card .card-body { min-height: 132px; }
}
