/* LaundryLink Central Custom Styles & Cross-Device Mobile Architecture */

:root {
    --safe-area-bottom: env(safe-area-inset-bottom, 0px);
    --safe-area-top: env(safe-area-inset-top, 0px);
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    overflow-x: hidden;
    min-height: 100dvh;
}

/* Custom Scrollbars */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: #0f172a;
}
::-webkit-scrollbar-thumb {
    background: #334155;
    border-radius: 9999px;
}
::-webkit-scrollbar-thumb:hover {
    background: #475569;
}

/* Hide scrollbars for swipeable pill bars and horizontal lists */
.no-scrollbar::-webkit-scrollbar {
    display: none;
}
.no-scrollbar {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* Smooth Touch Scrolling on iOS & Mobile Web */
.smooth-scroll-x {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
}

/* Responsive Table Wrapper with Accessible Scrolling Context */
.table-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    max-inline-size: 100%;
    overscroll-behavior-x: contain;
}

.table-wrapper:focus-visible {
    outline: 2px solid #3b82f6;
    outline-offset: -2px;
}

/* Text & Display Utilities */
.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Native Date/Month/Time Picker Dark Theme Adjustments */
input[type="date"]::-webkit-calendar-picker-indicator,
input[type="month"]::-webkit-calendar-picker-indicator,
input[type="datetime-local"]::-webkit-calendar-picker-indicator,
input[type="time"]::-webkit-calendar-picker-indicator {
    filter: invert(0.8);
    cursor: pointer;
}

/* Touch-friendly adjustments for mobile */
@media (max-width: 640px) {
    /* Prevent double-tap zoom on actionable buttons and tabs */
    button, a, input, select {
        touch-action: manipulation;
    }

    /* Modals should not exceed viewport height on small screens */
    .modal-card {
        max-height: calc(100dvh - 2rem);
        max-width: calc(100vw - 1.5rem);
    }
}

/* === MODERN DECOMPRESSED METRICS SYSTEM (CENTRAL) === */
.metrics-kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}
.metrics-card-clean {
    background: #0f172a;
    border: 1px solid #1e293b;
    border-radius: 1rem;
    padding: 1.125rem 1.25rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 96px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
    cursor: default;
}
.metrics-card-clean:hover {
    border-color: #334155;
}
.metrics-section-heading {
    font-size: 0.8125rem;
    font-weight: 600;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin: 1.25rem 0 0.625rem 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.metrics-comp-card {
    background: #0b0f19;
    border: 1px solid rgba(30, 41, 59, 0.8);
    border-radius: 0.75rem;
    padding: 0.875rem 1rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 96px;
    transition: border-color 0.15s ease;
    cursor: default;
}
.metrics-comp-card:hover {
    border-color: #334155;
}
.calendar-totals-bar-central {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 0.875rem;
    background: rgba(11, 15, 25, 0.7);
    border: 1px solid rgba(30, 41, 59, 0.8);
    border-radius: 0.75rem;
    padding: 1rem 1.25rem;
}

/* Micro-Typography Classes for Compact Metric Cards & Dashboards */
.text-2xs {
    font-size: 0.6875rem !important; /* 11px */
    line-height: 0.875rem !important;
}
.text-3xs {
    font-size: 0.625rem !important;  /* 10px */
    line-height: 0.75rem !important;
}
