/* ==========================================================================
   Dashboard.css — styles specific to the Dashboard module screens.
   ========================================================================== */

.dash-toprow {
    display: flex;
    gap: 9px;
    align-items: center
}

/* hero KPI cards */
.dash-kpi-grid {
    display: grid;
    grid-template-columns: repeat(4,1fr);
    gap: 14px;
    margin-bottom: 14px
}

.dash-kpi-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 15px;
    padding: 16px 17px;
    box-shadow: var(--shadow);
    position: relative;
    overflow: hidden
}

.dash-kpi-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 13px
}

.dash-kpi-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-2)
}

.dash-kpi-icon {
    width: 30px;
    height: 30px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px
}

.dash-kpi-value {
    font-family: var(--font-mono);
    font-weight: 600;
    font-size: 25px;
    letter-spacing: -.02em;
    line-height: 1;
    color: var(--text)
}

.dash-kpi-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 11px;
    gap: 8px
}

.dash-kpi-delta {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-size: 11.5px;
    font-weight: 700;
    font-family: var(--font-mono)
}

    .dash-kpi-delta.up {
        color: var(--green)
    }

    .dash-kpi-delta.down {
        color: var(--danger)
    }

/* secondary stat tiles */
.dash-stat-grid {
    display: grid;
    grid-template-columns: repeat(6,1fr);
    gap: 14px;
    margin-bottom: 14px
}

.dash-stat-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 13px;
    padding: 13px 15px;
    box-shadow: var(--shadow)
}

.dash-stat-label {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-2);
    margin-bottom: 7px;
    display: flex;
    align-items: center;
    gap: 5px
}

    .dash-stat-label .dot {
        width: 6px;
        height: 6px;
        border-radius: 50%
    }

.dash-stat-value {
    font-family: var(--font-mono);
    font-weight: 600;
    font-size: 19px;
    letter-spacing: -.01em;
    color: var(--text)
}

.dash-stat-sub {
    font-size: 11px;
    color: var(--text-3);
    margin-top: 3px
}

/* two-column rows */
.dash-row-2col {
    display: grid;
    grid-template-columns: 1.6fr 1fr;
    gap: 14px;
    margin-bottom: 14px
}

/* collections chart */
.dash-chart-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 6px
}

.dash-chart-title {
    margin: 0;
    font-size: 15px;
    font-weight: 700;
    color: var(--text)
}

.dash-chart-sub {
    margin: 4px 0 0;
    font-size: 12px;
    color: var(--text-3)
}

.dash-chart-legend {
    display: flex;
    gap: 14px;
    font-size: 11.5px;
    font-weight: 600
}

.dash-chart-legend-item {
    display: flex;
    align-items: center;
    gap: 5px;
    color: var(--text-2)
}

.dash-legend-swatch {
    width: 9px;
    height: 9px;
    border-radius: 3px;
    display: inline-block
}

.dash-chart-value-row {
    display: flex;
    align-items: baseline;
    gap: 10px;
    margin: 6px 0 14px
}

.dash-chart-value {
    font-family: var(--font-mono);
    font-weight: 600;
    font-size: 26px;
    color: var(--text)
}

.dash-chart-value-sub {
    font-size: 12px;
    color: var(--green);
    font-weight: 700
}

/* donut */
.dash-donut-wrap {
    display: flex;
    align-items: center;
    gap: 16px
}

.dash-donut-svg-wrap {
    position: relative;
    width: 128px;
    height: 128px;
    flex: 0 0 auto
}

.dash-donut-center {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center
}

    .dash-donut-center .val {
        font-family: var(--font-mono);
        font-weight: 600;
        font-size: 20px;
        line-height: 1;
        color: var(--text)
    }

    .dash-donut-center .lbl {
        font-size: 10px;
        color: var(--text-3);
        font-weight: 600
    }

.dash-donut-legend {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 10px
}

.dash-donut-legend-row {
    display: flex;
    align-items: center;
    gap: 8px
}

    .dash-donut-legend-row .lbl {
        font-size: 12px;
        font-weight: 600;
        flex: 1;
        color: var(--text)
    }

    .dash-donut-legend-row .pct {
        font-family: var(--font-mono);
        font-size: 12px;
        font-weight: 600;
        color: var(--text-2)
    }

/* field officer routes */
.dash-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 15px
}

.dash-section-title-group {
    display: flex;
    align-items: center;
    gap: 9px
}

.dash-link-btn {
    font-size: 12px;
    font-weight: 700;
    color: var(--primary);
    background: none;
    border: none;
    cursor: pointer;
    font-family: inherit;
    display: inline-flex;
    align-items: center;
    gap: 3px;
    text-decoration: none
}

.dash-route-list {
    display: flex;
    flex-direction: column;
    gap: 11px
}

.dash-route-row {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 11px 12px;
    border: 1px solid var(--border);
    border-radius: 11px;
    background: var(--surface-2)
}

    .dash-route-row:hover {
        border-color: var(--border-strong)
    }

.dash-route-initials {
    width: 34px;
    height: 34px;
    border-radius: 9px;
    background: linear-gradient(135deg,#C5613B,#D9982F);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 700;
    font-size: 11px;
    font-family: var(--font-mono);
    flex: 0 0 auto
}

.dash-route-name-wrap {
    flex: 0 0 132px;
    min-width: 0
}

.dash-route-name {
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--text)
}

.dash-route-sub {
    font-size: 11px;
    color: var(--text-3);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis
}

.dash-route-progress {
    flex: 1;
    min-width: 0
}

.dash-route-progress-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 5px
}

.dash-route-progress-label {
    font-size: 11px;
    color: var(--text-2);
    font-weight: 600
}

.dash-route-progress-next {
    font-size: 11px;
    color: var(--text-3)
}

.dash-route-bar-track {
    height: 6px;
    background: var(--surface-3);
    border-radius: 6px;
    overflow: hidden
}

.dash-route-bar-fill {
    height: 100%;
    border-radius: 6px
}

.dash-route-status {
    flex: 0 0 auto;
    font-size: 10.5px;
    font-weight: 700;
    padding: 3px 9px;
    border-radius: 20px
}

/* approvals */
.dash-approvals-list {
    display: flex;
    flex-direction: column;
    gap: 9px;
    flex: 1
}

.dash-approval-row {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 9px 0;
    border-bottom: 1px solid var(--border)
}

.dash-approval-icon {
    width: 30px;
    height: 30px;
    border-radius: 8px;
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px
}

.dash-approval-title {
    font-size: 12.5px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--text)
}

.dash-approval-sub {
    font-size: 11px;
    color: var(--text-3)
}

.dash-approval-amount {
    font-family: var(--font-mono);
    font-size: 12.5px;
    font-weight: 600;
    color: var(--text)
}

.dash-review-btn {
    margin-top: auto;
    height: 36px;
    border: 1px solid var(--border);
    background: transparent;
    border-radius: 9px;
    font-family: inherit;
    font-size: 12.5px;
    font-weight: 700;
    color: var(--text-2);
    cursor: pointer;
    width: 100%
}

    .dash-review-btn:hover {
        background: var(--surface-2)
    }

/* recent transactions */
.dash-txn-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 19px 12px
}

.dash-txn-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12.5px
}

    .dash-txn-table thead tr {
        color: var(--text-3);
        text-align: left;
        font-size: 10.5px;
        letter-spacing: .04em
    }

    .dash-txn-table th {
        font-weight: 700;
        padding: 8px 12px;
        background: var(--surface-2)
    }

        .dash-txn-table th:first-child {
            padding-left: 19px
        }

        .dash-txn-table th:last-child {
            padding-right: 19px
        }

        .dash-txn-table th.num {
            text-align: right
        }

    .dash-txn-table td {
        padding: 10px 12px
    }

        .dash-txn-table td:first-child {
            padding-left: 19px
        }

        .dash-txn-table td:last-child {
            padding-right: 19px
        }

    .dash-txn-table tbody tr {
        border-top: 1px solid var(--border)
    }

        .dash-txn-table tbody tr:hover {
            background: var(--surface-2)
        }

.dash-txn-member {
    display: flex;
    align-items: center;
    gap: 9px
}

.dash-txn-avatar {
    width: 26px;
    height: 26px;
    border-radius: 7px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 700;
    font-family: var(--font-mono)
}

.dash-txn-name {
    font-weight: 600;
    color: var(--text)
}

.dash-txn-type-badge {
    font-size: 11px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 6px
}

.dash-txn-center {
    color: var(--text-2)
}

.dash-txn-amount {
    text-align: right;
    font-family: var(--font-mono);
    font-weight: 600;
    color: var(--text)
}

.dash-txn-time {
    text-align: right;
    color: var(--text-3)
}

.dash-chart-svg {
    width: 100%;
    height: 200px;
    overflow: visible
}

.dash-donut-svg {
    transform: rotate(-90deg)
}

.badge-pill-count {
    font-size: 11px;
    font-weight: 700;
    padding: 2px 9px;
    border-radius: 20px;
    font-family: var(--font-mono)
}

/* activity feed */
.dash-activity-item {
    display: flex;
    gap: 12px
}

.dash-activity-rail {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 0 0 auto
}

.dash-activity-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    margin-top: 4px
}

.dash-activity-line {
    width: 2px;
    flex: 1;
    background: var(--border);
    margin: 3px 0
}

.dash-activity-body {
    padding-bottom: 16px
}

.dash-activity-text {
    font-size: 12.5px;
    line-height: 1.4;
    color: var(--text)
}

.dash-activity-time {
    font-size: 11px;
    color: var(--text-3);
    margin-top: 2px
}

@media (max-width:1200px) {
    .dash-kpi-grid {
        grid-template-columns: repeat(2,1fr)
    }

    .dash-stat-grid {
        grid-template-columns: repeat(3,1fr)
    }

    .dash-row-2col {
        grid-template-columns: 1fr
    }
}

@media (max-width:576px) {
    .dash-kpi-grid {
        grid-template-columns: 1fr
    }

    .dash-stat-grid {
        grid-template-columns: repeat(2,1fr)
    }
}
