﻿.widget-link {
    display: block;
    height: 100%;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
}

    .widget-link .widget-card {
        height: 100%;
        cursor: pointer;
    }

.widget-item-link {
    text-decoration: none;
    color: inherit;
    cursor: pointer;
}

    .widget-item-link:hover {
        opacity: 0.82;
    }

.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;
    overflow: hidden;
}

    .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;
}

.dashboard-tile-content {
    flex: 1;
    overflow: auto;
    min-height: 0;
    word-break: break-word;
    overflow-wrap: break-word;
}

    .dashboard-tile-content > *:first-child {
        margin-top: 0;
    }

    .dashboard-tile-content > *:last-child {
        margin-bottom: 0;
    }

.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: BPCount --- */

.widget-card--bpcount {
    border-top-color: #f9a825;
}

    .widget-card--bpcount:hover {
        box-shadow: 0 6px 20px rgba(249, 168, 37, 0.2);
    }

.widget-icon-wrap--bpcount {
    background: #fff8e1;
}

    .widget-icon-wrap--bpcount .icon {
        color: #f9a825;
    }

/* --- Widget: OurData --- */

.widget-card--our-data {
    border-top-color: #00897b;
}

.widget-icon-wrap--our-data {
    background: #e0f2f0;
}

    .widget-icon-wrap--our-data .icon {
        color: #00897b;
    }

.file-arrow-down-icon {
    mask-image: url("../images/icons/file-arrow-down.svg");
}

.cloud-upload-icon {
    mask-image: url("../images/icons/cloud-upload.svg");
}

/* --- Widget: ExternalData --- */

.widget-card--external-data {
    border-top-color: #1976d2;
}

.widget-icon-wrap--external-data {
    background: #e3f0fc;
}

    .widget-icon-wrap--external-data .icon {
        color: #1976d2;
    }

.cloud-download-icon {
    mask-image: url("../images/icons/cloud-download.svg");
}


/* --- Widget: GetStarted --- */

.widget-card--get-started {
    border-top-color: #7cb342;
}

    .widget-card--get-started:hover {
        box-shadow: 0 6px 20px rgba(124, 179, 66, 0.2);
    }

.widget-icon-wrap--get-started {
    background: #f1f8e9;
}

    .widget-icon-wrap--get-started .icon {
        color: #7cb342;
    }

/* --- Widget: Bonus --- */

.widget-card--bonus {
    border-top-color: #f9a825;
}

    .widget-card--bonus:hover {
        box-shadow: 0 6px 20px rgba(249, 168, 37, 0.2);
    }

.widget-icon-wrap--bonus {
    background: #fff8e1;
}

    .widget-icon-wrap--bonus .icon {
        color: #f9a825;
    }

/* --- Widget: Invitation --- */

.widget-card--invitation {
    border-top-color: #d81b60;
}

    .widget-card--invitation:hover {
        box-shadow: 0 6px 20px rgba(216, 27, 96, 0.2);
    }

.widget-icon-wrap--invitation {
    background: #fce4ec;
}

    .widget-icon-wrap--invitation .icon {
        color: #d81b60;
    }

/* --- Widget: Testsystem --- */

.widget-card--testsystem {
    border-top-color: #5b8dba;
}

    .widget-card--testsystem:hover {
        box-shadow: 0 6px 20px rgba(91, 141, 186, 0.2);
    }

.widget-icon-wrap--testsystem {
    background: #e8f0f7;
}

    .widget-icon-wrap--testsystem .icon {
        color: #5b8dba;
    }
