/* ==================== ПАНЕЛЬ СТАТИСТИКИ «ВРЕМЯ / ДЕНЬГИ» ==================== */

/* ---- Кольцевые диаграммы: цвета фона и активных дуг ---- */
.stats-ring-money-bg { stroke: var(--color-panel-bg, #f5f3f0); }
.stats-ring-money     { stroke: var(--color-stats-ring-money, #ec4899); }
.stats-ring-time-bg   { stroke: var(--color-panel-bg, #f5f3f0); }
.stats-ring-time      { stroke: var(--color-stats-ring-time, #f59e0b); }

/* ---- Контейнер панели (в шапке) ---- */
.desktop-stats-panel {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
    background: transparent;
    border: none;
    border-radius: 0;
    padding: 0;
    cursor: pointer;
    user-select: none;
    height: 100%;
    position: relative;
}

.desktop-stats-panel:hover {
    background: transparent;
}

/* ---- Кольцевые диаграммы (на весь 60x60, без отступов) ---- */
.desktop-stats-rings {
    position: relative;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin: 0;
    padding: 0;
}

.desktop-stats-rings svg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.desktop-stats-rings-center {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0;
}

/* ---- Огонь + число в центре колец ---- */
.desktop-stats-fire-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1px;
}

.desktop-stats-fire-row .stats-fire-icon {
    color: var(--color-button-text-orange);
    width: 18px;
    height: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.desktop-stats-fire-row .stats-fire-icon i {
    width: 12px;
    height: 12px;
}

.desktop-stats-fire-row .stats-streak-number {
    font-size: 14px;
    font-weight: 800;
    line-height: 1;
    color: var(--color-text-secondary, #6b7280);
}

/* ---- Инфо справа от колец: время сверху, деньги снизу ---- */
.desktop-stats-info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 1px;
    min-width: 0;
}

.desktop-stats-time-row {
    font-size: 13px;
    font-weight: 700;
    line-height: 1.2;
    color: var(--color-text-secondary, #6b7280);
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 3px;
}

.desktop-stats-time-row .stats-label-icon {
    width: 12px;
    height: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--color-text-secondary, #6b7280);
    flex-shrink: 0;
}

.desktop-stats-time-row .stats-label-icon i {
    width: 12px;
    height: 12px;
}

.desktop-stats-money-row {
    font-size: 13px;
    font-weight: 700;
    line-height: 1.2;
    color: var(--color-text-secondary, #6b7280);
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 3px;
}

.desktop-stats-money-row .stats-money-icon {
    width: 12px;
    height: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--color-text-secondary, #6b7280);
    flex-shrink: 0;
}

.desktop-stats-money-row .stats-money-icon i {
    width: 12px;
    height: 12px;
}

/* ---- Pull-tab (язычок) ---- */
.desktop-stats-pull-tab {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 16px;
    height: 16px;
    color: var(--color-text-secondary, #6b7280);
    cursor: pointer;
    transition: color 0.15s;
    border: none;
    background: transparent;
    padding: 0;
    position: absolute;
    right: 0;
    bottom: 2px;
}

.desktop-stats-pull-tab:hover {
    color: var(--color-text, #1f2933);
}

.desktop-stats-pull-tab i {
    width: 12px;
    height: 12px;
    transition: transform 0.2s ease;
}

.desktop-stats-pull-tab.open i {
    transform: rotate(180deg);
}

/* ---- Расширенная панель (выпадающая) ---- */
.desktop-stats-expanded {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 220px;
    background: var(--color-panel-bg, #fff);
    border: 1px solid var(--color-border, #dee2e6);
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    padding: 10px;
    z-index: 10060;
    flex-direction: column;
    gap: 5px;
}

.desktop-stats-expanded.open {
    display: flex;
}

/* Строки в расширенной панели */
.desktop-stats-row {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    line-height: 1.3;
    color: var(--color-text-primary, #1f2937);
}

.desktop-stats-row .stats-icon {
    flex: 0 0 auto;
    width: 14px;
    height: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--color-text-secondary, #6b7280);
}

.desktop-stats-row .stats-icon.stats-icon-fire {
    color: #f97316;
}

.desktop-stats-separator {
    height: 1px;
    background: var(--color-border, #dee2e6);
    margin: 2px 0;
}

.stats-value-plan {
    color: var(--color-text-secondary, #6b7280);
}

.stats-value-overplan {
    color: var(--color-button-text-lightgreen, #19a64a);
}

/* ---- Стрик-календарь ---- */
.desktop-stats-view-streak {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.desktop-stats-streak-header {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 600;
    color: var(--color-text, #1f2933);
}

.desktop-stats-streak-days {
    display: flex;
    flex-wrap: wrap;
    gap: 3px;
}

.desktop-stats-streak-day {
    width: 12px;
    height: 12px;
    border-radius: 3px;
    background: var(--color-hover, #f0f0f0);
    border: 1px solid var(--color-border, #e2e8f0);
}

.desktop-stats-streak-day.active {
    background: var(--color-button-text-orange, #f97316);
    border-color: var(--color-button-text-orange, #f97316);
}

.desktop-stats-streak-day.today {
    border-color: var(--color-button-text-orange, #f97316);
}

.desktop-stats-streak-day.empty {
    opacity: 0.5;
}

.desktop-stats-streak-info {
    font-size: 11px;
    color: var(--color-text-secondary, #6b7280);
    margin-top: 2px;
}

/* ---- Кнопка обновить ---- */
.desktop-stats-refresh-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border: none;
    background: transparent;
    color: var(--color-text-secondary, #6b7280);
    cursor: pointer;
    border-radius: 6px;
    transition: background 0.15s, color 0.15s;
}

.desktop-stats-refresh-btn:hover {
    background: var(--color-hover, #f0f0f0);
    color: var(--color-text, #1f2933);
}

.desktop-stats-refresh-btn i {
    width: 14px;
    height: 14px;
}
