/* Application custom styles (loaded globally after the Metronic theme).
   Prefer adding rules here instead of inline style="" attributes in Blade views. */

/* --- Mobile horizontal-scroll fix ---
   Off-canvas panels (cart, user, etc.) are parked at right:-395px.
   On mobile this let the page scroll sideways and exposed them.
   Lock page-level horizontal scrolling; panels still slide in via their toggle. */
html, body {
    overflow-x: hidden;
    max-width: 100%;
}

/* Safety net for wide tables not wrapped in .table-responsive:
   keep them scrollable inside their card instead of being clipped. */
@media (max-width: 991.98px) {
    .card .card-body {
        overflow-x: auto;
    }
}

/* Shared elevation for resource cards (workers, worksites, ...)
   so every card grid renders with a consistent shadow. */
.card-elevated {
    box-shadow: 0 0 30px 0 rgba(82, 63, 105, 0.05), 0 4px 12px 0 rgba(0, 0, 0, 0.08) !important;
}

/* Dashboard header: worksite filter dropdown.
   Mobile: full-width on its own line (avoids horizontal overflow).
   Desktop: grows to fill the row so the select sits inline with the
   action buttons, keeping at least 350px. */
.worksite-filter-wrap {
    width: 100%;
}

@media (min-width: 992px) {
    .worksite-filter-wrap {
        flex: 0 0 350px;
        width: 350px;
    }
}

/* Shared filter bar: let the selects + action buttons wrap onto
   multiple lines on mobile instead of overflowing the viewport. */
.filter-controls {
    row-gap: .5rem;
}

/* Dashboard KPI stat cards. */
.dashboard-stat-card {
    min-height: 80px;
}

.dashboard-stat-icon {
    height: 32px;
    line-height: 32px;
}
