﻿.widget-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.07);
    padding: 1.25rem 1.5rem;
    width: 100%;
    min-height: 160px;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    border-top: 4px solid #0078d4;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
    cursor: default;
}

    .widget-card:hover {
        box-shadow: 0 6px 20px rgba(0, 120, 212, 0.15);
        transform: translateY(-2px);
    }

.widget-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1;
    min-height: 120px;
}

.widget-spinner {
    width: 28px;
    height: 28px;
    border: 3px solid #e0e0e0;
    border-top-color: #0078d4;
    border-radius: 50%;
    animation: widget-spin 0.8s linear infinite;
}

@keyframes widget-spin {
    to {
        transform: rotate(360deg);
    }
}

.widget-header {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.widget-icon-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: #e6f2fc;
    border-radius: 8px;
    flex-shrink: 0;
}

    .widget-icon-wrap .icon {
        width: 1.25rem;
        height: 1.25rem;
        color: #0078d4;
    }

.person-icon {
    mask-image: url("../images/icons/person.svg");
}

.widget-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: #555;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.widget-body {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.widget-metric {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
}

.widget-metric-value {
    font-size: 2.25rem;
    font-weight: 700;
    color: #1a1a2e;
    line-height: 1;
}

.widget-metric-label {
    font-size: 0.85rem;
    color: #888;
}

.widget-badge-row {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.widget-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    background: #e6f5ec;
    border-radius: 20px;
    padding: 0.2rem 0.65rem;
}

.widget-badge-value {
    font-size: 0.85rem;
    font-weight: 700;
    color: #1a7f37;
}

.widget-badge-label {
    font-size: 0.75rem;
    color: #3a6b47;
}

/* --- Dashboard layout --- */

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1.25rem;
    padding: 0.5rem 0;
}

.dashboard-grid-item {
    display: flex;
    align-items: stretch;
}

    .dashboard-grid-item > * {
        width: 100%;
    }

.dashboard-grid-loading {
    padding: 2rem 0;
    color: #888;
}

.widget-unknown {
    border-top-color: #aaa;
    color: #888;
    font-size: 0.85rem;
    justify-content: center;
    align-items: center;
}

/* --- Dashboard page header --- */

.dashboard-header {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid #E8F4F8;
}

    .dashboard-header h2 {
        margin: 0;
        font-size: 1.4rem;
        font-weight: 700;
        color: #1a1a2e;
    }

    .dashboard-header .icon {
        width: 1.5rem;
        height: 1.5rem;
        color: #0078d4;
        opacity: 1;
    }

.data-histogram-icon {
    mask-image: url("../images/icons/data-histogram.svg");
}

/* --- Widget: ContactVerification --- */

.widget-card--verification {
    border-top-color: #6b5ce7;
}

.widget-icon-wrap--verification {
    background: #ede9fc;
}

    .widget-icon-wrap--verification .icon {
        color: #6b5ce7;
    }

.check2-circle-icon {
    mask-image: url("../images/icons/check2-circle.svg");
}

.widget-badge--neutral {
    background: #f0f0f0;
}

    .widget-badge--neutral .widget-badge-value {
        color: #444;
    }

    .widget-badge--neutral .widget-badge-label {
        color: #666;
    }

.widget-badge--info {
    background: #e6f2fc;
}

    .widget-badge--info .widget-badge-value {
        color: #0078d4;
    }

    .widget-badge--info .widget-badge-label {
        color: #1a5f9e;
    }

.widget-badge--warning {
    background: #fff4e0;
}

    .widget-badge--warning .widget-badge-value {
        color: #b87200;
    }

    .widget-badge--warning .widget-badge-label {
        color: #8a5700;
    }

.widget-badge--success {
    background: #e6f5ec;
}

    .widget-badge--success .widget-badge-value {
        color: #1a7f37;
    }

    .widget-badge--success .widget-badge-label {
        color: #3a6b47;
    }

/* --- Widget: AvailableData --- */

.widget-card--available-data {
    border-top-color: #00897b;
}

.widget-icon-wrap--available-data {
    background: #e0f2f0;
}

    .widget-icon-wrap--available-data .icon {
        color: #00897b;
    }

.file-arrow-down-icon {
    mask-image: url("../images/icons/file-arrow-down.svg");
}
