/**
 * Dashboard Charts and Quick Actions Styles
 * (c) Adrian Ranta. All rights reserved. Unauthorised use, reproduction and or distribution is strictly prohibited.
 */

/* ===== Quick Actions Bar ===== */
.dashboard-quick-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.quick-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    background: #fff;
    color: #475569;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.quick-action-btn:hover {
    background: #f1f5f9;
    border-color: #94a3b8;
    color: #1e293b;
}

.quick-action-btn svg {
    flex-shrink: 0;
}

/* ===== Dashboard Charts Row ===== */
.dashboard-charts-row {
    display: flex;
    gap: 16px;
    margin-top: 16px;
    flex-wrap: wrap;
}

.dashboard-chart-card {
    flex: 1;
    min-width: 260px;
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
    border: 1px solid #e9ecef;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.dashboard-chart-card h3 {
    margin: 0 0 16px 0;
    font-size: 14px;
    font-weight: 600;
    color: #1e293b;
}

/* ===== Drag Handle (IMP-19) ===== */
.chart-drag-handle {
    cursor: grab;
    opacity: 0.4;
    transition: opacity 0.2s ease;
    display: inline-block;
    vertical-align: middle;
    margin-right: 6px;
}

.chart-drag-handle:hover {
    opacity: 1;
}

.chart-drag-handle:active {
    cursor: grabbing;
}

.tile-drag-handle:active {
    cursor: grabbing;
}

/* ===== SortableJS States (IMP-19) ===== */
.sortable-ghost {
    opacity: 0.3;
    background: #e8edf5;
}

.sortable-chosen {
    box-shadow: 0 4px 16px rgba(115, 102, 239, 0.25);
}

.sortable-drag {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    transform: scale(1.02);
}

/* ===== Donut Chart (Asset Status) ===== */
.donut-chart-container {
    display: flex;
    align-items: center;
    gap: 20px;
}

.donut-chart {
    position: relative;
    width: 120px;
    height: 120px;
    flex-shrink: 0;
}

.donut-chart svg {
    width: 120px;
    height: 120px;
    transform: rotate(-90deg);
}

.donut-chart .donut-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

.donut-chart .donut-center .donut-total {
    font-size: 22px;
    font-weight: 700;
    color: #1e293b;
    line-height: 1;
}

.donut-chart .donut-center .donut-label {
    font-size: 11px;
    color: #94a3b8;
}

.donut-legend {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.donut-legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #475569;
}

.donut-legend-swatch {
    width: 10px;
    height: 10px;
    border-radius: 2px;
    flex-shrink: 0;
}

.donut-legend-count {
    font-weight: 600;
    color: #1e293b;
    margin-left: auto;
    padding-left: 12px;
}

/* ===== Bar Charts (Tickets & Age) ===== */
.bar-chart-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.bar-chart-item {
    display: flex;
    align-items: center;
    gap: 10px;
}

.bar-chart-label {
    width: 70px;
    font-size: 12px;
    font-weight: 500;
    color: #64748b;
    text-align: right;
    flex-shrink: 0;
}

.bar-chart-track {
    flex: 1;
    height: 22px;
    background: #f1f5f9;
    border-radius: 4px;
    overflow: hidden;
    position: relative;
}

.bar-chart-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.4s ease;
    min-width: 0;
}

.bar-chart-value {
    width: 32px;
    font-size: 13px;
    font-weight: 600;
    color: #1e293b;
    text-align: right;
    flex-shrink: 0;
}

/* ===== No Data State ===== */
.chart-no-data {
    color: #94a3b8;
    text-align: center;
    padding: 30px 0;
    font-size: 13px;
}

/* ===== Responsive ===== */
@media (max-width: 900px) {
    .dashboard-charts-row {
        flex-direction: column;
    }
    .dashboard-chart-card {
        min-width: 0;
    }
}
