/* dashboard.css: dashboard-only styles */

.stat-card.stat-safe {
    border-left-color: var(--safe);
}

.stat-hint {
    margin: 4px 0 0;
    font-size: 0.78rem;
    color: var(--text-muted);
}

.dash-grid {
    display: grid;
    grid-template-columns: 3fr 2fr;
    gap: 16px;
    align-items: start;
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 12px;
    margin-bottom: 12px;
}

.panel-header h2 {
    margin: 0;
}

.panel-link {
    font-size: 0.9rem;
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
}

.panel-link:hover {
    text-decoration: underline;
}

/* ----- Priority alerts ----- */
.alert-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.alert-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
}

.alert-item:last-child {
    border-bottom: none;
}

.alert-name {
    font-weight: 600;
}

.alert-meta {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 2px;
}

.alert-reason {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 2px;
}

.alert-right {
    text-align: right;
    flex-shrink: 0;
}

.alert-days {
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 4px;
}

.alert-score {
    display: block;
    margin-top: 4px;
    font-size: 0.78rem;
    color: var(--text-muted);
}

/* ----- Inventory overview ----- */
.overview-title {
    margin: 18px 0 8px;
    font-size: 0.95rem;
}

.overview-title:first-of-type {
    margin-top: 0;
}

.status-bar {
    display: flex;
    height: 14px;
    border-radius: 999px;
    overflow: hidden;
    background: #e2e8f0;
}

.status-bar span {
    display: block;
    height: 100%;
}

.seg-expired {
    background: var(--expired);
}

.seg-critical {
    background: var(--critical);
}

.seg-warning {
    background: var(--warning);
}

.seg-safe {
    background: var(--safe);
}

.legend {
    list-style: none;
    margin: 12px 0 0;
    padding: 0;
}

.legend li {
    display: flex;
    justify-content: space-between;
    padding: 5px 0;
    font-size: 0.9rem;
}

.dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-right: 8px;
}

.mini-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.mini-table td,
.mini-table th {
    padding: 7px 0;
    border-bottom: 1px solid var(--border);
    text-align: left;
}

.mini-table th {
    font-size: 0.75rem;
    text-transform: uppercase;
    color: var(--text-muted);
}

.mini-table td:not(:first-child),
.mini-table th:not(:first-child) {
    text-align: right;
}

.facts {
    display: flex;
    gap: 24px;
    margin-top: 16px;
    font-size: 0.9rem;
    color: var(--text-muted);
    flex-wrap: wrap;
}

.facts strong {
    display: block;
    font-size: 1.15rem;
    color: var(--text);
}

@media (max-width: 1100px) {
    .dash-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .alert-item {
        flex-direction: column;
        align-items: flex-start;
    }

    .alert-right {
        text-align: left;
    }
}