/* ============================================
   dashboard.css — Dashboard modul
   ============================================ */

/* CSS Reset for this module */
.dash-wrap * {
    all: revert;
    box-sizing: border-box;
}

.dash-wrap {
    width: 1200px;
    box-sizing: border-box;
}

/* Dashboard grid */
.dash-wrap .dash-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 20px;
    margin-bottom: 24px;
}

/* Dashboard card */
.dash-wrap .dash-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 20px;
    display: flex;
    flex-direction: column;
    min-height: 200px;
}

.dash-wrap .dash-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.dash-wrap .dash-card-header span {
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
}

.dash-wrap .dash-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.dash-wrap .dash-icon.d-blue {
    background: rgba(59, 130, 246, .12);
    color: #3b82f6;
}

.dash-wrap .dash-icon.d-purple {
    background: rgba(168, 85, 247, .12);
    color: #a855f7;
}

.dash-wrap .dash-icon.d-red {
    background: rgba(239, 68, 68, .12);
    color: #ef4444;
}

.dash-wrap .dash-icon.d-green {
    background: rgba(34, 197, 94, .12);
    color: #22c55e;
}

.dash-wrap .dash-icon.d-orange {
    background: rgba(249, 115, 22, .12);
    color: #f97316;
}

/* Dashboard card value */
.dash-wrap .dash-card-value {
    font-size: 42px;
    font-weight: 700;
    color: var(--text);
    line-height: 1;
    margin-bottom: 8px;
}

/* Dashboard list */
.dash-wrap .dash-list {
    margin-top: auto;
}

.dash-wrap .dash-list-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid var(--border);
}

.dash-wrap .dash-list-item:last-child {
    border-bottom: none;
}

.dash-wrap .dash-list-label {
    font-size: 12px;
    color: var(--text2);
    display: flex;
    align-items: center;
    gap: 6px;
}

.dash-wrap .dash-list-val {
    font-size: 12px;
    font-weight: 600;
    color: var(--text);
}

/* Dashboard card subtitle */
.dash-wrap .dash-card-sub {
    font-size: 11px;
    color: var(--text3);
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
}

/* Dashboard bar */
.dash-wrap .dash-bar-bg {
    background: var(--surface2);
    border-radius: 4px;
    height: 8px;
    overflow: hidden;
}

.dash-wrap .dash-bar-fill {
    height: 100%;
    border-radius: 4px;
    transition: width .3s ease;
}

/* Dashboard refresh button */
.dash-wrap .nb-refresh-btn {
    background: none;
    border: none;
    color: var(--text2);
    cursor: pointer;
    padding: 4px 8px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
}

.dash-wrap .nb-refresh-btn:hover {
    background: var(--surface2);
    color: var(--text);
}

.dash-wrap .nb-spin-icon {
    transition: transform .3s;
}

.dash-wrap .nb-refresh-btn.spinning .nb-spin-icon {
    animation: spin 1s linear infinite;
}

/* Dashboard stats */
.dash-wrap .dash-stat {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 0;
}

.dash-wrap .dash-stat-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.dash-wrap .dash-stat-value {
    font-size: 20px;
    font-weight: 700;
    color: var(--text);
}

.dash-wrap .dash-stat-label {
    font-size: 11px;
    color: var(--text3);
}

/* Chart container for PO dynamics */
.dash-wrap .dash-chart {
    width: 1200px;
    height: 150px;
    margin: 16px 0;
    display: flex;
    align-items: flex-end;
    gap: 4px;
}

.dash-wrap .dash-chart-bar {
    flex: 1;
    background: var(--accent);
    border-radius: 4px 4px 0 0;
    min-height: 4px;
    transition: height .3s ease;
}

.dash-wrap .dash-chart-bar.negative {
    background: var(--red);
}

/* Top recruiters */
.dash-wrap .dash-recruiter {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
}

.dash-wrap .dash-recruiter:last-child {
    border-bottom: none;
}

.dash-wrap .dash-recruiter-rank {
    font-size: 11px;
    color: var(--text3);
    width: 24px;
}

.dash-wrap .dash-recruiter-name {
    flex: 1;
    font-size: 13px;
    color: var(--text);
}

.dash-wrap .dash-recruiter-count {
    font-size: 12px;
    font-weight: 600;
    color: var(--accent2);
    background: var(--accent-soft2);
    padding: 2px 8px;
    border-radius: 10px;
}

/* Missing capacities highlight */
.dash-wrap .dash-missing {
    color: var(--red);
}

.dash-wrap .dash-missing-icon {
    color: var(--red);
    margin-right: 4px;
}

/* Empty state */
.dash-wrap .dash-empty {
    text-align: center;
    padding: 40px;
    color: var(--text3);
    font-size: 13px;
}

/* Animation for loading */
@keyframes dash-pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

.dash-wrap .dash-loading {
    animation: dash-pulse 1.5s ease-in-out infinite;
}