/* ===================================
   UNIFIED NAVIGATION STYLES
   =================================== */

.main-navigation {
    background: linear-gradient(135deg, #4caf50 0%, #388e3c 100%);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    color: white;
    font-size: 20px;
    font-weight: 600;
}

.nav-logo {
    width: 15vw;
    object-fit: cover;
    border: 2px solid rgba(255,255,255,0.8);
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}

.nav-toggle span {
    display: block;
    width: 25px;
    height: 3px;
    background: white;
    border-radius: 2px;
    transition: all 0.3s ease;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-link {
    color: white;
    text-decoration: none;
    padding: 10px 20px;
    border-radius: 8px;
    transition: all 0.3s ease;
    font-weight: 500;
    border: 2px solid transparent;
}

.nav-link:hover {
    background: rgba(255, 255, 255, 0.15);
}

.nav-link.active {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.3);
}

.nav-user {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-left: 20px;
    margin-left: 20px;
    border-left: 1px solid rgba(255, 255, 255, 0.2);
}

.nav-user-name {
    color: white;
    font-weight: 500;
    font-size: 14px;
}

.nav-user-role {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.nav-logout {
    background: rgba(231, 76, 60, 0.9);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.nav-logout:hover {
    background: rgba(192, 57, 43, 1);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(231, 76, 60, 0.3);
}

/* ===================================
   RESPONSIVE DESIGN
   =================================== */

/* Tablet */
@media (max-width: 1024px) {
    .nav-container {
        padding: 0 16px;
    }
    
    .nav-link {
        padding: 8px 16px;
        font-size: 14px;
    }
    
    .nav-user {
        padding-left: 16px;
        margin-left: 16px;
    }
}

/* Mobile */
@media (max-width: 768px) {
    .nav-toggle {
        display: flex;
    }
    
    .nav-menu {
        position: fixed;
        top: 70px;
        right: -100%;
        width: 280px;
        height: calc(100vh - 70px);
        background: linear-gradient(135deg, #4caf50 0%, #2e7d32 100%);
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: 20px;
        box-shadow: -4px 0 12px rgba(0,0,0,0.2);
        transition: right 0.3s ease;
    }
    
    .nav-menu.show {
        right: 0;
    }
    
    .nav-link {
        width: 100%;
        text-align: left;
        padding: 12px 16px;
        margin-bottom: 8px;
    }
    
    .nav-user {
        flex-direction: column;
        align-items: stretch;
        padding: 20px 0 0 0;
        margin: 20px 0 0 0;
        border-left: none;
        border-top: 1px solid rgba(255, 255, 255, 0.2);
        gap: 12px;
    }
    
    .nav-user-name,
    .nav-user-role {
        text-align: center;
    }
    
    .nav-logout {
        width: 100%;
    }
    
    /* Adjust main content for fixed nav */
    body {
        padding-top: 0;
    }
    
    /* Make installation cards single column on mobile */
    .installations-grid.grid-view {
        grid-template-columns: 1fr !important;
    }
    
    .installations-grid.list-view .installation-card {
        padding: 16px !important;
    }
    
    /* Make filters stack vertically */
    .filters-group {
        flex-direction: column;
        gap: 12px;
    }
    
    .filter-item {
        width: 100%;
    }
    
    /* Stack pagination controls */
    .pagination-top {
        flex-direction: column;
        gap: 12px;
    }
    
    .pagination-info,
    .pagination-controls,
    .pagination-select {
        width: 100%;
        justify-content: center;
    }
    
    /* User management responsive */
    .users-grid {
        grid-template-columns: 1fr !important;
    }
    
    .page-header {
        flex-direction: column;
        gap: 16px;
        text-align: center;
    }
    
    .modal-content {
        width: 95%;
        padding: 20px;
    }
}

/* Small mobile */
@media (max-width: 480px) {
    .nav-brand span {
        display: none;
    }
    
    .stat-label {
        font-size: 11px;
    }
    
    .stat-value {
        font-size: 20px;
    }
    
    .installation-card {
        padding: 12px !important;
    }
    
    .card-title {
        font-size: 16px;
    }
}
