/**
 * Dashboard report tiles.
 *
 * Panel pages only load Filament's compiled component styles, so the tile
 * layout ships as a static stylesheet registered on the panel.
 */

.dashboard-tiles {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.dashboard-tiles__heading {
    font-size: 0.875rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    color: #475569;
    margin-bottom: 0.25rem;
    user-select: none;
}

html.dark .dashboard-tiles__heading {
    color: #94a3b8;
}

.dashboard-tiles__grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 0.5rem;
}

@media (min-width: 640px) {
    .dashboard-tiles__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (min-width: 1024px) {
    .dashboard-tiles__grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (min-width: 1280px) {
    .dashboard-tiles__grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

.dashboard-tile {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 10rem;
    padding: 0.75rem;
    background-color: #faf5e8;
    border: 1px solid #e8e0cf;
    border-radius: 0.75rem;
    box-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    color: inherit;
    text-decoration: none;
    transition: box-shadow 0.15s ease-in-out, transform 0.15s ease-in-out;
}

.dashboard-tile:hover {
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    transform: translateY(-2px);
}

.dashboard-tile:focus-visible {
    outline: 2px solid #1a3a3a;
    outline-offset: 2px;
}

html.dark .dashboard-tile {
    background-color: #0f172a;
    border-color: #1e293b;
}

.dashboard-tile__title {
    font-size: 0.875rem;
    font-weight: 600;
    line-height: 1.25;
    color: #334155;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

html.dark .dashboard-tile__title {
    color: #e2e8f0;
}

.dashboard-tile__subtitle {
    font-size: 0.75rem;
    line-height: 1.25;
    color: #94a3b8;
    margin-top: 0.125rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dashboard-tile__main {
    display: flex;
    align-items: baseline;
    gap: 0.25rem;
    margin-top: 1rem;
    margin-bottom: 0.75rem;
}

.dashboard-tile__value {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1;
    letter-spacing: -0.025em;
}

.dashboard-tile__unit {
    font-size: 0.75rem;
    font-weight: 500;
    color: #94a3b8;
}

.dashboard-tile--positive .dashboard-tile__value {
    color: #25653a;
}

.dashboard-tile--negative .dashboard-tile__value {
    color: #ac0808;
}

.dashboard-tile--neutral .dashboard-tile__value {
    color: #1a2733;
}

html.dark .dashboard-tile--positive .dashboard-tile__value {
    color: #4ade80;
}

html.dark .dashboard-tile--negative .dashboard-tile__value {
    color: #f87171;
}

html.dark .dashboard-tile--neutral .dashboard-tile__value {
    color: #e2e8f0;
}

.dashboard-tile__footer {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
    margin-top: auto;
    padding-top: 0.5rem;
    border-top: 1px solid #e8e0cf;
}

html.dark .dashboard-tile__footer {
    border-color: #1e293b;
}

.dashboard-tile__sub {
    display: flex;
    justify-content: space-between;
    gap: 0.5rem;
    font-size: 0.75rem;
}

.dashboard-tile__sub-label {
    color: #6b7280;
    white-space: nowrap;
}

.dashboard-tile__sub-value {
    color: #334155;
    font-weight: 500;
    text-align: right;
    overflow: hidden;
    text-overflow: ellipsis;
}

html.dark .dashboard-tile__sub-value {
    color: #cbd5e1;
}

.dashboard-tile__sub-value--positive {
    color: #16a34a;
    font-weight: 500;
}

.dashboard-tile__sub-value--negative {
    color: #dc2626;
    font-weight: 500;
}

html.dark .dashboard-tile__sub-value--positive {
    color: #4ade80;
}

html.dark .dashboard-tile__sub-value--negative {
    color: #f87171;
}

.dashboard-tile__timeframe {
    font-size: 0.6875rem;
    color: #6b7280;
    padding-top: 0.375rem;
    border-top: 1px solid #e8e0cf;
    user-select: none;
}

html.dark .dashboard-tile__timeframe {
    border-color: #1e293b;
}
