/* ============================================================
   Dashboard — стили главной страницы
   ============================================================ */

/* --------------------------------------------------------
   Круги «Ваша загрузка»
   -------------------------------------------------------- */
.dash-circles {
    display: flex;
    align-items: flex-start;
    gap: var(--space-8);
    padding: var(--space-5) var(--space-4);
    margin-bottom: var(--space-5);
    background: var(--bg-surface);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-lg);
    flex-wrap: wrap;
}

.dash-circle {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    min-width: 100px;
}

.dash-circle-ring {
    width: 88px;
    height: 88px;
    border-radius: 50%;
    background: conic-gradient(
        var(--border-default) 0,
        var(--bg-subtle) 0
    );
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    transition: background 300ms ease;
}

.dash-circle-ring::after {
    content: '';
    position: absolute;
    inset: 8px;
    border-radius: 50%;
    background: var(--bg-surface);
    transition: background 200ms ease;
}

.dash-circle-inner {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.dash-circle-value {
    font-size: 24px;
    font-weight: var(--fw-semibold);
    color: var(--text-primary);
    letter-spacing: -0.02em;
    line-height: 1;
    font-variant-numeric: tabular-nums;
}

.dash-circle-label {
    font-size: 13px;
    font-weight: var(--fw-medium);
    color: var(--text-primary);
    text-align: center;
}

.dash-circle-hint {
    font-size: 11px;
    color: var(--text-tertiary);
    text-align: center;
    line-height: 1.3;
}

.dash-circle.is-empty .dash-circle-value {
    color: var(--text-tertiary);
}

.dash-circle.is-empty .dash-circle-hint {
    color: var(--text-tertiary);
}

.dash-circle.has-overdue .dash-circle-hint {
    color: var(--color-danger-text);
    font-weight: var(--fw-medium);
}

/* --------------------------------------------------------
   Кастомный тултип для кольца
   -------------------------------------------------------- */
.dash-tooltip {
    position: fixed;
    z-index: var(--z-tooltip, 700);
    padding: 8px 12px;
    background: var(--text-primary, #0f1419);
    color: var(--text-inverse, #ffffff);
    border-radius: var(--radius-md, 7px);
    font-size: 12px;
    line-height: 1.4;
    box-shadow: 0 8px 24px rgba(15, 20, 25, 0.18), 0 2px 6px rgba(15, 20, 25, 0.12);
    pointer-events: none;
    opacity: 0;
    transition: opacity 120ms ease, transform 120ms ease;
    transform: translateY(-2px);
    max-width: 240px;
    white-space: nowrap;
}

.dash-tooltip.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Стрелочка вниз */
.dash-tooltip::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: -5px;
    width: 0;
    height: 0;
    margin-left: -5px;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 5px solid var(--text-primary, #0f1419);
}

/* Если тултип перевёрнут вниз (открыт под кольцом) — стрелку вверх */
.dash-tooltip.is-below::after {
    bottom: auto;
    top: -5px;
    border-top: none;
    border-bottom: 5px solid var(--text-primary, #0f1419);
}

.dash-tooltip-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 2px 0;
}

.dash-tooltip-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.dash-tooltip-text {
    font-variant-numeric: tabular-nums;
}

/* --------------------------------------------------------
   Нижний блок: 2 колонки
   -------------------------------------------------------- */
.dash-bottom {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-4);
    align-items: stretch;
}

@media (max-width: 900px) {
    .dash-bottom {
        grid-template-columns: 1fr;
    }
}

.dash-card-fixed {
    display: flex;
    flex-direction: column;
    height: 520px;
    min-height: 0;
    overflow: hidden;
}

.dash-card-fixed .card-header {
    flex-shrink: 0;
}

/* --------------------------------------------------------
   Список отсутствующих
   -------------------------------------------------------- */
.dash-absent-list {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
}

.dash-absent-row {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-3) var(--space-5);
    border-bottom: 1px solid var(--border-subtle);
}

.dash-absent-row:last-child {
    border-bottom: none;
}

.dash-absent-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--accent-subtle);
    color: var(--accent-text);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: var(--fw-semibold);
    letter-spacing: 0.02em;
    text-transform: uppercase;
    flex-shrink: 0;
}

.dash-absent-body {
    flex: 1;
    min-width: 0;
}

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

.dash-absent-sub {
    font-size: 11px;
    color: var(--text-tertiary);
    margin-top: 2px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dash-absent-reason {
    font-size: 10px;
    font-weight: var(--fw-medium);
    padding: 2px 8px;
    border-radius: var(--radius-sm);
    flex-shrink: 0;
    white-space: nowrap;
}

.dash-absent-reason.is-vacation {
    background: var(--color-success-bg);
    color: var(--color-success-text);
}

.dash-absent-reason.is-trip {
    background: var(--color-info-bg);
    color: var(--color-info-text);
}

.dash-absent-reason.is-sick {
    background: var(--color-danger-bg);
    color: var(--color-danger-text);
}

.dash-absent-reason.is-other {
    background: var(--bg-subtle);
    color: var(--text-tertiary);
}

.dash-absent-dates {
    font-size: 11px;
    color: var(--text-tertiary);
    font-variant-numeric: tabular-nums;
    flex-shrink: 0;
    white-space: nowrap;
    margin-left: 4px;
}

/* --------------------------------------------------------
   Пустое состояние
   -------------------------------------------------------- */
.dash-empty {
    padding: 40px 20px;
    text-align: center;
    color: var(--text-tertiary);
    font-size: 13px;
}

.dash-empty svg {
    display: block;
    margin: 0 auto 8px;
    width: 40px;
    height: 40px;
    opacity: 0.5;
}