/* ============================================
   RESPONSIVE STYLES FOR 1366x768 AND SMALLER
   ============================================ */

/* PI Card Name Labels */
.pi-card__title {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.pi-card__name {
    font-size: 0.65rem;
    font-weight: 500;
    color: var(--gray-500);
    text-transform: uppercase;
    letter-spacing: 0.03em;
    line-height: 1.2;
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dark .pi-card__name {
    color: var(--gray-400);
}

/* For 1366x768 and similar laptop screens */
@media (max-width: 1400px) {
    .summary-stats-row {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: var(--space-4);
    }

    .summary-stat-card {
        min-height: 140px !important;
        padding: var(--space-6) !important;
    }

    .summary-stat-card__value {
        font-size: 2.75rem !important;
    }

    .pi-cards-row {
        flex-wrap: wrap !important;
        overflow-x: visible !important;
    }

    .pi-card {
        flex: 1 1 calc(33.333% - var(--space-4)) !important;
        min-width: 160px !important;
        max-width: none !important;
    }
}

/* For smaller screens (tablets, small laptops) */
@media (max-width: 1024px) {
    .summary-stats-row {
        grid-template-columns: 1fr 1fr !important;
    }

    .summary-stat-card__value {
        font-size: 2.5rem !important;
    }

    .pi-card {
        flex: 1 1 calc(50% - var(--space-4)) !important;
        min-width: 140px !important;
    }
}

/* For mobile screens */
@media (max-width: 768px) {
    .summary-stats-row {
        grid-template-columns: 1fr !important;
    }

    .summary-stat-card {
        min-height: 120px !important;
        padding: var(--space-5) !important;
    }

    .summary-stat-card__value {
        font-size: 2.25rem !important;
    }

    .pi-card {
        flex: 1 1 100% !important;
        min-width: unset !important;
    }

    /* Fix sidebar - completely hide on mobile */
    .sidebar {
        display: none !important;
        position: fixed !important;
        left: -200px !important;
        width: 0 !important;
        visibility: hidden !important;
        pointer-events: none !important;
    }

    /* Remove sidebar margin from app */
    .app {
        margin-left: 0 !important;
    }

    /* Mobile sidebar overlay */
    @media (max-width: 768px) {
        .sidebar.sidebar--open {
            display: flex !important;
            position: fixed !important;
            left: 0 !important;
            top: 0 !important;
            width: 64px !important;
            height: 100vh !important;
            visibility: visible !important;
            pointer-events: auto !important;
            z-index: 1000;
            background: linear-gradient(180deg, #1e293b 0%, #0f172a 100%);
            box-shadow: 4px 0 20px rgba(0, 0, 0, 0.5);
        }
    }
}

/* Hamburger Menu Button */
.menu-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    padding: 0;
    background: transparent;
    border: none;
    color: #fff;
    cursor: pointer;
    margin-right: 12px;
    border-radius: 8px;
}

@media (max-width: 768px) {
    .menu-toggle {
        display: flex !important;
    }
}